def admin_command(self, bot, update):
chat_id = update.message.chat_id
admin_chat_id = config.get_state(_admin_key)
if not admin_chat_id:
config.save_state(_admin_key, chat_id)
config.save_secrets()
text = "You're admin now!"
elif chat_id == admin_chat_id:
text = "You already are admin!"
else:
bot.send_message(text="There can be only one!", chat_id=chat_id)
return
text += "\nHidden comamnds:\n/" + "\n/".join(admin_commands)
bot.send_message(text=text, chat_id=chat_id)
# Password protected commands
评论列表
文章目录