How to make your own telegram bot accessible only by its owner?

I am developing a Telegram bot that should be available only to its owner (only the owner can add it to groups or see it in the search). Is it possible to achieve this through Telegram services (for example, BotFather), or should I check my code if the one who sends messages to the bot is the owner?

+8
telegram telegram-bot
source share
2 answers

You can do this in the setup, you need to check it yourself, just exit the program if .message.from.id does not match yours.

You can disconnect a group of associations through /setjoingroup , but you cannot invite a bot to a group.

+7
source share

You cannot do anything with BotFather. the only way to check it inside your code.

+3
source share

All Articles