Created
August 30, 2018 19:30
-
-
Save slapglif/a82442110ed388803cfce8fb2a5a55d8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def main(): | |
try: | |
print("Listening to Telegram Channel...") | |
updater = Updater(token) | |
dp = updater.dispatcher | |
conv_handler = ConversationHandler( | |
entry_points=[CommandHandler('start', start)], | |
states={ | |
SIGNALS: [] | |
}, | |
fallbacks=[CommandHandler('cancel', cancel)] | |
) | |
dp.add_handler(conv_handler) | |
dp.add_error_handler(error) | |
updater.start_polling() | |
updater.idle() | |
except Exception as e: | |
log(e) | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment