#Telegram bot API + chatGPT API (Python)
Create Telegram bot using chatGPT API
BotFather steps: (From Telegram find BotFather contact)
User:
*/start*
BotFather, [Feb 5, 2023 at 2:08:07 PM]:
I can help you create and manage Telegram bots. If you're new to the Bot API, please see the manual.
You can control me by sending these commands:
*/newbot* - create a new bot
...
User:, [Feb 5, 2023 at 2:08:40 PM]:
*/newbot*
BotFather, [Feb 5, 2023 at 2:08:40 PM]:
Alright, a new bot. How are we going to call it? Please choose a name for your bot.
User, [Feb 5, 2023 at 2:09:23 PM]:
*Dec_22_chatGPT*
BotFather, [Feb 5, 2023 at 2:09:23 PM]:
Good. Now let's choose a username for your bot. It must end in `bot`.
Like this, for example: TetrisBot or tetris_bot.
User, [Feb 5, 2023 at 2:10:14 PM]:
*chat_dec_22_bot*
BotFather, [Feb 5, 2023 at 2:10:14 PM]:
Done! Congratulations on your new bot. You will find it at t.me/chat_dec_22_bot. You can now add a description, about section and profile picture for your bot, see /help for a list of commands. By the way, when you've finished creating your cool bot, ping our Bot Support if you want a better username for it. Just make sure the bot is fully operational before you do this.
Use this token to access the HTTP API:
6185472765:PIbwepibvWEfvweurwEO$I#)$#$D
Keep your token secure and store it safely, it can be used by anyone to control your bot.
For a description of the Bot API, see this page: https://core.telegram.org/bots/apiCreate requirements and Dockerfile
Put Dockerfile into the same directory with run.sh and chatGPT_telegram_bot.py ifles
Last updated