Skip to content

Commit

Permalink
creation successful
Browse files Browse the repository at this point in the history
  • Loading branch information
ShivangKakkar committed Sep 26, 2021
1 parent de4ef10 commit 12619d8
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions StringSessionBot/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,17 +96,20 @@ async def cancelled(msg):
elif "/restart" in msg.text:
await msg.reply("Restarted the Bot!", quote=True, reply_markup=InlineKeyboardMarkup(Data.generate_button))
return True
elif msg.text.startswith("/"): # Bot Commands
await msg.reply("Cancelled the generation process!", quote=True)
return True
else:
return False


@Client.on_message(filters.private & ~filters.forwarded & filters.command(['cancel', 'restart']))
async def formalities(_, msg):
if "/cancel" in msg.text:
await msg.reply("Cancelled all the Processes!", quote=True, reply_markup=InlineKeyboardMarkup(Data.generate_button))
return True
elif "/restart" in msg.text:
await msg.reply("Restarted the Bot!", quote=True, reply_markup=InlineKeyboardMarkup(Data.generate_button))
return True
else:
return False
# @Client.on_message(filters.private & ~filters.forwarded & filters.command(['cancel', 'restart']))
# async def formalities(_, msg):
# if "/cancel" in msg.text:
# await msg.reply("Cancelled all the Processes!", quote=True, reply_markup=InlineKeyboardMarkup(Data.generate_button))
# return True
# elif "/restart" in msg.text:
# await msg.reply("Restarted the Bot!", quote=True, reply_markup=InlineKeyboardMarkup(Data.generate_button))
# return True
# else:
# return False

0 comments on commit 12619d8

Please sign in to comment.