A Telegram bot that welcomes new users to a specific chat with a custom greeting message.
Good Bot is a Python package for creating a Telegram bot that automatically sends a welcome message to new users who join a specific chat or channel. The bot can be customized with a greeting message and supports the latest version of the Telegram API. Good Bot uses the python-telegram-bot
library to interact with the Telegram API.
To use Good Bot, you'll need to have Python 3 installed on your computer. Follow these steps to set up and run the bot:
-
Clone the repository and navigate to the project directory
git clone https://github.com/meechos/telegram_bot cd telegram_bot
-
Install the required packages using
poetry
poetry install
-
Create a new bot on Telegram and obtain its API token.
-
Find the ID of the chat where you want the bot to welcome new users.
-
Start the bot with the following command:
poetry run good_bot --bot_id <API_TOKEN> --chat_id <CHAT_ID> --greeting "Welcome to the chat, "
Replace <API_TOKEN>
with your bot's API token and <CHAT_ID>
with the ID of the chat where you want the bot to welcome new users. You can customize the greeting message by changing the value of the --greeting
option.
That's it! The bot will now automatically send a welcome message to new users who join the specified chat.