mirror of
https://github.com/Rongronggg9/SlashBot.git
synced 2025-02-06 17:23:28 +08:00
[M] Move starting code to main
This commit is contained in:
parent
4e156ae91e
commit
98b8cb3da6
13
SlashBot.py
13
SlashBot.py
@ -110,10 +110,11 @@ def reply(update, context):
|
||||
update.effective_message.reply_text(text, parse_mode='Markdown')
|
||||
|
||||
|
||||
updater = Updater(token=Token, use_context=True)
|
||||
delUsername = re.compile('@' + updater.bot.username, re.I)
|
||||
dp = updater.dispatcher
|
||||
dp.add_handler(MessageHandler(Filters.regex(parser), reply))
|
||||
if __name__ == '__main__':
|
||||
updater = Updater(token=Token, use_context=True)
|
||||
delUsername = re.compile('@' + updater.bot.username, re.I)
|
||||
dp = updater.dispatcher
|
||||
dp.add_handler(MessageHandler(Filters.regex(parser), reply))
|
||||
|
||||
updater.start_polling()
|
||||
updater.idle()
|
||||
updater.start_polling()
|
||||
updater.idle()
|
||||
|
Loading…
Reference in New Issue
Block a user