bot.py 文件源码

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

项目:voiceru_bot 作者: just806me 项目源码 文件源码
def settings_voice_message(bot: telegram.Bot, update: telegram.Update):
    chat_settings = bot_types.ChatSettings.from_db(db, update.message.chat, admin_id=update.message.from_user.id,
                                               admin_name=update.message.from_user.first_name)

    if not chat_settings.admin_only or chat_settings.admin_id == update.message.from_user.id:
        send_settings_voice_message(bot, update.message.chat_id)

    bot_types.Botan.track(
        uid=update.message.chat_id,
        message=update.message.to_dict(),
        name='settings.voice.get'
    )
    logging.info('Command settings: voice.', extra={
        'telegram': {
            'update': update.to_dict(),
            'chat_id': update.message.chat_id,
            'message_id': update.message.message_id,
        },
        'id': extentions.TextHelper.get_md5(str(update.message.chat_id) + str(update.message.message_id))
    })
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号