commands.py 文件源码

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

项目:SoftcatalaTelegramBot 作者: Softcatala 项目源码 文件源码
def admin_command(self, bot, update):
        user_id = update.message.from_user.id
        f_name = update.message.from_user.first_name
        if str(user_id) in allowed_users.values():
            bot.sendMessage(update.message.chat_id,parse_mode='Markdown',
                        text= f_name + ", sou administrador i podeu utilitzar les comandes:\n\n\U0001F4DD *Publicar* (crear esdeveniments, notícies, projectes i actualitzar paquets): /post\n\n\U0001F4C8 *Estadístiques* (resum estadístic i rebre el fitxer): /stats\n\n\U0001F5C3 *Baixar paquets* desats en local: /getfiles\n\n*\U0001F50D Comprovar els paquets* desats al servidor de Telegram amb ID de fitxer: /testfiles\n\n\u00A9 Softcatalà, 2016",
                        reply_markup=ReplyKeyboardHide())
        else:
            if function['production']:
                bot.sendMessage(update.message.chat_id,
                            text= str(f_name) + ", no teniu permisos per utilitzar aquesta ordre. Les ordres que teniu disponibles ara mateix són: /baixa /android /ios /tdesktop i /help.")
            else:
                bot.sendMessage(update.message.chat_id,
                            text= "Robot destinat a proves internes de Softcatalà. Si cerqueu el bot públic de Softcatalà el trobareu a @SoftcatalaBot.")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号