Before running the bot, ensure you have the following:
- Python 3.7 or higher installed.
- A Telegram account.
- A Telegram bot token (see below for instructions).
- A
.envfile to store your environment variables (Refer .env.example)
- Open Telegram and search for the BotFather (Telegram's official bot for creating and managing bots).
- Start a chat with BotFather and use the
/newbotcommand. - Follow the instructions:
- Choose a name for your bot (e.g.,
MyTestBot). - Choose a username for your bot (must end with
bot, e.g.,MyTestBot_bot).
- Choose a name for your bot (e.g.,
- Once the bot is created, BotFather will provide you with a token. This token is your
TELEGRAM_BOT_TOKEN. Example token: 123456789:ABCdefGhIJKlmNoPQRstuVWXyz - Save this token for later use.
Okay - that's it. I used this most of the time to send alerts for my memecoins, and trading strategy. Alternatively, we can use Telebot and polling approach to receive real time message with commands.