Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 11 additions & 16 deletions cinderella/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@
💠 - /start: start the bot
💠 - /help: PM's you this message.
💠 - /help <module name>: PM's you info about that module.
💠 - /source: Information about my source.
💠 - /settings:
🔹 - in PM: will send you your settings for all supported modules.
🔹 - in a group: will redirect you to pm, with all that chat's settings.
{}
And the following:
""".format(dispatcher.bot.first_name, "" if not ALLOW_EXCL else "\nAll commands can either be used with / or !.\n")
Expand All @@ -58,8 +54,7 @@ def vercheck() -> str:


SOURCE_STRING = """
⚡I'm built in python3, using the python-telegram-bot library, and am fully opensource - you can find what makes me tick [here](https://github.com/Sur-vivor/CinderellaProBot)
⚡You Can Clone Me [Here](https://heroku.com/deploy?template=https://github.com/Sur-vivor/CinderellaProBot.git)
I'm built in python3, using the python-telegram-bot library, and am fully opensource - you can find what makes me tick [here](https://t.me/uvvauvvve)
"""


Expand All @@ -78,7 +73,7 @@ def vercheck() -> str:

START_IMG = os.environ.get('START_IMG', None)
if START_IMG is None:
img = "https://telegra.ph/file/511ad504656e712b88235.jpg"
img = "https://telegra.ph/file/429d7e0db3ed784560538.jpg"
else:
img = START_IMG

Expand Down Expand Up @@ -164,8 +159,8 @@ def start(bot: Bot, update: Update, args: List[str]):
else:
send_start(bot, update)
else:
update.effective_message.reply_text("Heya,{} Here..\nHow can I help you? 🙂".format(bot.first_name),reply_markup=InlineKeyboardMarkup(
[[InlineKeyboardButton(text="⚜️Help",url="t.me/{}?start=help".format(bot.username))]]))
update.effective_message.reply_text("Heya,{} Here..\nHow can I help you?".format(bot.first_name),reply_markup=InlineKeyboardMarkup(
[[InlineKeyboardButton(text="Help",url="t.me/{}?start=help".format(bot.username))]]))

def send_start(bot, update):
#Try to remove old message
Expand All @@ -179,8 +174,8 @@ def send_start(bot, update):
first_name = update.effective_user.first_name
text = PM_START_TEXT

keyboard = [[InlineKeyboardButton(text="🤝Help",callback_data="help_back"),InlineKeyboardButton(text="🛡Creator🛡",url="https://t.me/Surv_ivor")]]
keyboard += [[InlineKeyboardButton(text="🌐Connect Group", callback_data="main_connect"),InlineKeyboardButton(text="⚜️Add Me⚜️",url="t.me/{}?startgroup=true".format(bot.username))]]
keyboard = [[InlineKeyboardButton(text="Help",callback_data="help_back"),InlineKeyboardButton(text="Creator",url="https://t.me/FlyingKILI")]]
keyboard += [[InlineKeyboardButton(text="Connect Group", callback_data="main_connect"),InlineKeyboardButton(text="Add Me",url="t.me/{}?startgroup=true".format(bot.username))]]

update.effective_message.reply_photo(img, PM_START_TEXT.format(escape_markdown(first_name), escape_markdown(bot.first_name), OWNER_NAME, OWNER_ID),
reply_markup=InlineKeyboardMarkup(keyboard), disable_web_page_preview=True, parse_mode=ParseMode.MARKDOWN)
Expand Down Expand Up @@ -235,7 +230,7 @@ def help_button(bot: Bot, update: Update):
query.message.reply_text(text=text,
parse_mode=ParseMode.MARKDOWN,
reply_markup=InlineKeyboardMarkup(
[[InlineKeyboardButton(text="🚶🏻‍♂️Back🚶🏻‍♂️", callback_data="help_back")]]))
[[InlineKeyboardButton(text="Back", callback_data="help_back")]]))

elif prev_match:
curr_page = int(prev_match.group(1))
Expand Down Expand Up @@ -280,15 +275,15 @@ def get_help(bot: Bot, update: Update):

update.effective_message.reply_text("Contact me in PM to get the list of possible commands.",
reply_markup=InlineKeyboardMarkup(
[[InlineKeyboardButton(text="⚜️Help",url="t.me/{}?start=help".format(bot.username))],
[InlineKeyboardButton(text="🛡Contact Creator",url="https://t.me/Surv_ivor")]]))
[[InlineKeyboardButton(text="Help",url="t.me/{}?start=help".format(bot.username))],
[InlineKeyboardButton(text="Contact Creator",url="https://t.me/FlyingKILI")]]))
return

elif len(args) >= 2 and any(args[1].lower() == x for x in HELPABLE):
module = args[1].lower()
text = "Here is the available help for the *{}* module:\n".format(HELPABLE[module].__mod_name__) \
+ HELPABLE[module].__help__
send_help(chat.id, text, InlineKeyboardMarkup([[InlineKeyboardButton(text="🚶‍♂️Back🚶‍♂️", callback_data="help_back")]]))
send_help(chat.id, text, InlineKeyboardMarkup([[InlineKeyboardButton(text="Back", callback_data="help_back")]]))

else:
send_help(chat.id, HELP_STRINGS)
Expand Down Expand Up @@ -402,7 +397,7 @@ def get_settings(bot: Bot, update: Update):
text = "Click here to get this chat's settings, as well as yours."
msg.reply_text(text,
reply_markup=InlineKeyboardMarkup(
[[InlineKeyboardButton(text="⚙️Settings⚙️",
[[InlineKeyboardButton(text="Settings",
url="t.me/{}?start=stngs_{}".format(
bot.username, chat.id))]]))
else:
Expand Down