feedback.py 文件源码

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

项目:UnivaqBot 作者: giacomocerquone 项目源码 文件源码
def send_to_developers(bot, update):
    """Function to send feedback to developers"""

    feedback_user = (('<b>{}</b>\n\n <i>{} {}, {}</i>')
                     .format(update.message.text,
                             update.message.from_user.first_name,
                             update.message.from_user.last_name,
                             update.message.chat_id))

    for admin in os.environ['ADMIN'].split(' '):
        bot.sendMessage(admin, feedback_user, parse_mode='HTML')

    bot.sendMessage(update.message.chat_id, 'Grazie per la collaborazione, '
                                            'il messaggio è stato inviato agli sviluppatori.',
                    reply_markup=telegram.ReplyKeyboardRemove())

    return ConversationHandler.END
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号