All contributions are welcome! 🤗
NOTE: This document is made while keeping all types of contributors in mind. You may skip to Setup instructions if you're familiar with Git and GitHub.
- Follow this guide: https://docs.github.com/en/github/getting-started-with-github/set-up-git#setting-up-git
- For Linux: Python comes pre-installed on most linux distributions. If its not on yours, then you'll have to use your package manager to install it.
- For Windows: Install it from here: https://www.python.org/downloads/windows/
-
While signed in to github, click the
Fork
button at the top right corner of the page.When you fork a repo, a new copy of your own of that repo is created. You'll use this copy to make your changes.
-
After forking the repo, clone your fork to your local machine by:
git clone https://github.com/YOUR_USERNAME/bot
Well done! Now you have the code on your local system! ✌️
- Ping BotFather on Telegram
- Send
/start
- Send
/newbot
to create a new bot - You'll be prompted for a name and username for your bot, send them
- You'll get a bot API token similar to:
xxxxxxxxxx:xxx-xxxx_TE9i5t9Fm4Pf9lyopLvw7Gk4ag
- Install pip using your system's package manager:
-
Example for ubuntu:
sudo apt install python3-pip
-
Verify the installation by:
pip3 --version
-
Clone this repository and install python dependencies using:
pip3 install -r requirements.txt
-
Set two environment variables from your terminal namely,
export bot_name="<your bot's name that you presented to botfather>" export token="<token presented by botfather>"
-
Make a file
data_file.json
and write{}
in it -
Run the bot with:
python3 bot.py
-
Add the bot to a group and test if its working. If it works, then you're good to go. If it does not then try repeating the steps or googling your problem.
-
If you're still unable to get it working after step 6, ask for help on JODC's telegram channel.
-
cd
into the cloned project directory on your local machine and create a new branch bygit checkout -b "Branch-Name"
-
Make changes according to the issue.
-
Test the changes and if applicable take a screenshot of the chat.
-
After you're satisfied with the changes that you've done, add the changes with
git add
git add .
- Commit the changes using
git commit
git commit -m "A short message which briefly describes the changes you made"
- Push the changes to your fork on GitHub using
git push
git push -u origin "Branch-Name from step 1"
- Open your forked repo on GitHub and click the Pull request button to create a pull request. Describe a little about your changes and attach the screenshot you took here ✨
See this for help with pull requests.
TODO: Add PR templates
Feel free to open an issue for
- reporting a bug
- proposing a new feature
- proposing an enhancement in current feature
- proposing improvment in docs
- anything you think is missing
How to open an issue
- Open the bot repo on github: https://github.com/JIITODC/bot
- Click on the issues tab
- Click on the green colored New Issue button.
- Describe the issue so that it is easy for someone to understand it. See this for help with creating issues.
TODO: Add Issue templates