grammarnazibot.py 文件源码

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

项目:GrammarNaziBot 作者: SlavMetal 项目源码 文件源码
def main():
    updater = Updater(cfg['botapi_token'])
    dp = updater.dispatcher

    dp.add_handler(CommandHandler("start", start))
    dp.add_handler(CommandHandler("help", help))
    dp.add_handler(CommandHandler("ping", ping))

    # on no command
    dp.add_handler(MessageHandler(Filters.text & (~ Filters.forwarded), echo))  # Message is text and is not forwarded

    # log all errors
    dp.add_error_handler(error)

    # Start the Bot
    updater.start_polling()

    # Run the bot until process receives SIGINT, SIGTERM or SIGABRT
    updater.idle()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号