[英]Restrict other users from joining telegram bot
Suppose I created a telegram bot with the following info;假设我创建了一个带有以下信息的电报机器人;
botname: name11
username: user22
bot_token: XXXX
chat_id: YYYYY
I want to restrict other users from joining.我想限制其他用户加入。 Only myself (username: myself
) can join.只有我自己(用户名: myself
)可以加入。 Can this be done in telegram?这可以在电报中完成吗?
I am using python 3.7我正在使用 python 3.7
There is no such settings or functionality in Telegram bots(yet). Telegram 机器人中还没有这样的设置或功能。 You can put a simple checking in the first line of your handlers and only respond to the authorized UserIDs.您可以在处理程序的第一行进行简单检查,并且只响应授权的 UserID。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.