简体   繁体   English

限制其他用户加入电报机器人

[英]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.

相关问题 Python Telegram Bot 仅适用于我,不适用于其他用户 - Python Telegram Bot works only for me, not for other users 如何在电报机器人中管理更多用户? - How to manage more users in a telegram bot? 电报机器人(pyTelegramBotAPI)不处理新用户加入组 - Telegram bot (pyTelegramBotAPI) does not handle new user joining group 如何在 python-telegram-bot 中接收来自用户的消息? - How can I receive messages from users in python-telegram-bot? 为什么带有 Webhook 的 Python 上的电报机器人不能像带有长轮询的机器人那样同时处理来自许多用户的消息? - Why telegram-bot on Python with Webhooks can't process messages from many users simultaneously unlike a bot with Long Polling? Python 电报机器人,如何为每个用户存储和显示用户数据? - Python telegram bot, how to store and show users data for each users? 从 Telegram 抓取用户失败 - Scraping users from Telegram failed 如何在电报聊天机器人中加入两个用户? - how can i join two users in a telegram chat bot? 可以同时处理多个用户的电报机器人 - python - telegram bot that can handle multiple users at the same time - python 如何通过 Telepot 在机器人电报中获取用户的位置和地点 - How to get users's location and Venue in a bot telegram by telepot
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM