Welcome to Dev-Automators-Telegram-Bot β a community-driven Telegram bot project!
This bot is designed to greet users with a warm welcome and serve as a foundation for adding new, useful commands. We encourage open-source contributions to expand its capabilities while ensuring that all content remains legal, professional, and free from slang or inappropriate language.
- Greeting Users: The bot welcomes users as they join or interact.
- Extensible Commands: Community members can propose and add new commands.
- Open Source Collaboration: Follow our contribution guidelines to enhance the bot!
To get started, fork this repository on GitHub and then clone it to your local system.
Click the "Fork" button on this repo to create your own copy.
Open a terminal and run the following command:
git clone https://github.com/<your-username>/Dev-Automators-Telegram-Bot.git
cd Dev-Automators-Telegram-Bot
To run this bot, you'll need a bot token from Telegram's BotFather.
- Open BotFather in Telegram.
- Start a chat and send the command
/newbot
. - Follow the prompts to set a name and username for your bot.
- Once created, BotFather will provide you with a bot token in this format:
123456789:ABCDEFghijklmnopqrstuvwxyz
- Save this token, as you will need it to run the bot.
Once you have your bot token, create a .env
file in the project directory (Dev-Automators-Telegram-Bot
folder) and paste your bot token like this:
BOT_TOKEN=123456789:ABCDEFghijklmnopqrstuvwxyz
This ensures that your bot token remains secure and isn't exposed in the source code.
Run the following command to install all dependencies:
pip install -r requirements.txt
If your bot uses webhooks, you'll need to expose your local server to the internet using Ngrok.
-
Sign Up:
Visit: Ngrok Signup -
Email Verification & Details:
After verifying your Gmail, you'll be prompted to enter some details. Use the following:- How would you describe yourself? β Student / Hobbyist (Building for fun)
- What are you interested in using ngrok for? β Testing Webhooks on local
- Are you using ngrok for? β Development
-
Continue:
Click the Continue button to proceed.
-
Choose Your Platform:
- For Windows users: Download for Windows
- For macOS users: Download for macOS
- For Linux users: Download for Linux
-
Download the Zip File:
Under the Installation section of the ngrok dashboard, click on the Download tab. A ZIP file will begin downloading. -
Extract the File:
Extract the ZIP file. You will find a single file namedngrok
(orngrok.exe
on Windows). -
Move the File:
Cut and paste thengrok
file into your bot project's folder (Dev-Automators-Telegram-Bot
folder). -
Launch Ngrok:
Open the Ngrok application from your project folder.
- Find Your Auth Token:
Go back to your Ngrok dashboard (Ngrok Dashboard) and locate the command under the configuration section. It will look similar to:ngrok config add-authtoken <token>
- Apply the Token:
Copy this command, paste it into the Ngrok terminal, and press Enter. (This is a one-time setup process.)
- Open a Tunnel:
In your terminal, run the following command:The 5000 port is set as the default. If your Flask (or similar) server is running on a different port, replacengrok http 5000
5000
with the correct port number:(Replacengrok http <PORT>
<PORT>
with the port your local server is using.)
By following these steps, you'll successfully set up Ngrok to expose your local development server. π
To contribute, please follow our standard open-source workflow:
Always work on a new branch for your contribution.
git checkout -b add-new-command
Please review our CONTRIBUTORS.md for detailed instructions and the expected format for your contributions.
- Update or add command functionality in the code.
- Append your contribution in the designated file (see below in the CONTRIBUTORS.md).
git add .
git commit -m "Added new command: [Your Command Name] -> by [Your Name] - [Your Roll Number]"
git push origin add-new-command
Go to your fork on GitHub and open a pull request to merge your changes into the main repository.
- Be Professional: All contributions must be legal and free from slang or inappropriate language.
- Follow the Format: Adhere to the guidelines provided in CONTRIBUTORS.md for adding your details or new commands.
- Communication: If you encounter any issues or have questions, please ask in the group.
Happy contributing and happy coding! π
β DevInnovators Team