6

I have a telegram bot that messages on a group. I want the telegram bot to change its “name” from time to time - just like a user can. Is this possible? This means that when I see a message from the bot it can say “ABCbot”, but later it can say “DEFbot”. Let me know!

Carlos F
  • 893
  • 2
  • 12
  • 30

2 Answers2

13

Sorry but you can't change your telegram via bot but you can change it via @BotFather as you can see in this screenshot:

enter image description here

Go to @BotFather and send this command

/mybots

Then it will show list of your bots. Click on the bot you want change it's name and then click on Edit Name

GameO7er
  • 2,028
  • 1
  • 18
  • 33
  • 1
    Yes, I was hoping there would be an api-based way to do it. Strange that a bot can’t change its own name. – Carlos F Dec 12 '19 at 14:12
  • @CarlosF You gotta need to write a bot for that :) – j4hangir Oct 04 '20 at 13:42
  • @j4hangir. If the API allowed it, you could, but it doesn't, so you can't..... – boatcoder Jun 12 '22 at 07:04
  • @boatcoder https://stackoverflow.com/a/72594264/6387880 – j4hangir Jun 12 '22 at 17:02
  • I don't understand how `you can't` has been accepted as an answer. It obviously can be done on-the-fly as I wrote [here](https://stackoverflow.com/a/72594264/6387880) – j4hangir Jun 12 '22 at 17:04
  • It's simple. because he asked about Telegram Bot API not Telegram Client API. I wonder how you couldn't understand difference between these two concept. `Pure Python 3 MTProto API Telegram client library, for bots too! ` – GameO7er Jun 14 '22 at 19:34
-1

Use Telethon to do that:

await tc.send_message('@botfather', '/setname')
await tc.send_message('@botfather', bot)
await tc.send_message('@botfather', name)

tc is the instance of TelegramClient class.

j4hangir
  • 2,532
  • 1
  • 13
  • 14