【发布时间】:2020-12-12 21:14:54
【问题描述】:
我正在做一个机器人版主。我正在执行命令“禁止”。如果我通过输入/ban 回复某人的消息,bot 应该获取它的 id 并限制他。
我现在的代码:
@bot.messsage_handler(commands=['ban'])
def ban(message):
#here I should get the id of a user which I replied in Telegram
#then bot should restrict him.
PyTelegramBotApi
python 3.7
谢谢
【问题讨论】:
-
先到这里 - stackoverflow.com/help/how-to-ask。然后,当您尝试过自己并遇到特定问题时,请分享您的代码并就特定问题提出特定问题。 Stack Overflow 可以帮助您解决遇到的问题,而不是让您可以让其他人为您编写代码。
标签: python bots telegram telegram-bot py-telegram-bot-api