A bot to receive the ID of every Telegram chat.
Check out our bot here.
-
Clone the repository:
git clone https://github.com/yehuda-lev/Get_Chat_ID_Bot.git
-
Set up the environment variables:
-
Copy the
.env.examplefile:cp .env.example .env
-
Edit the
.envfile:-
Open the
.envfile in a text editor of your choice. -
Replace the placeholder values with your actual credentials. You can obtain these credentials from the following sources:
-
Telegram Credentials:
TELEGRAM_API_IDandTELEGRAM_API_HASH: Obtain from my.telegram.org.TELEGRAM_BOT_TOKEN: Create a new bot on BotFather.TG_GROUP_TOPIC_ID: ID of the Telegram group where the bot will operate.ADMINS: A comma-separated list of Telegram user IDs that will be granted admin privileges.LIMIT_SPAM: The number of messages that can be sent in a minute.
-
-
Save the
.envfile:- After editing, save the changes to the
.envfile.
- After editing, save the changes to the
-
By completing these steps, your environment variables will be properly configured for the project.
Clone the repository to your local machine. Then, build the Docker image using the following command:
If you want to rebuild the image, you can use the
--buildflag to force a rebuild: If you want to run the bot in the background, you can use the-dflag:
docker compose upThis project was created by @yehudalev.
