Skip to content

Instantly share code, notes, and snippets.

@slapglif
Created August 30, 2018 19:30
Show Gist options
  • Save slapglif/a82442110ed388803cfce8fb2a5a55d8 to your computer and use it in GitHub Desktop.
Save slapglif/a82442110ed388803cfce8fb2a5a55d8 to your computer and use it in GitHub Desktop.
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