bot.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:ImgurPlus 作者: DcSoK 项目源码 文件源码
def main():
    #  define the updater
    updater = Updater(token=botconfig.bot_token)

    # define the dispatcher
    dp = updater.dispatcher

    # messages
    dp.add_handler(MessageHandler(~Filters.command, util.process_message, edited_updates=True))
    dp.add_handler(CommandHandler(('start'), commands.help_command))
    dp.add_handler(CommandHandler(('stats'), commands.stats_command))
    dp.add_handler(CommandHandler(('globalstats'), commands.global_stats_command))
    # handle errors
    dp.add_error_handler(error)

    updater.start_polling()
    updater.idle()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号