Contributions are always welcome, no matter how large or small!🙂
In order to contribute, you need to have an account on Github. Go to 👉 https://github.com to create an account.
- In order to contribute, you need to have Git (a version control software) installed in your machine.
- Refer this 👉 https://docs.github.com/en/github/getting-started-with-github/set-up-git#setting-up-git to install and setup Git 🚀.
-
Fork this repository using the button in the top-right corner of the page. Refer https://docs.github.com/en/github/getting-started-with-github/fork-a-repo for more details.
-
Having forked the repository, clone the repository to your local machine using the below command in the terminal :
$ git clone https://github.com/YOUR-GITHUB-USERNAME/bots
- Having cloned the copy to your local machine, enter into the
telegram-bot
directory using thecd
command.
$ cd bots/telegram-bot
- Great, you are now present in the source code of the project. You can take a look at the contents of the project using the
ls
command.
$ ls
- The Telegram Bot🤖 is written in Go. Thus, in order to install Go, follow the doc here 👉 https://golang.org/doc/install
- The bot uses MongoDB as its database. In order to install MongoDB, refer the guide here 👉 https://docs.mongodb.com/manual/installation/#mongodb-community-edition-installation-tutorials
- Ping Botfather on Telegram and make your instance of OSDC-Bot 🤖 bot by selecting
/newbot
from the options provided. - Copy the
TELEGRAM_TOKEN
provided by Botfather. - Make sure you have followed all the above steps and are in the
telegram-bot
directory. - If you have installed golang, run
go build .
- Wait ⏳
- Run
export TELEGRAM_TOKEN=<TELEGRAM_TOKEN>
- Now, run
./telegram-bot
. The bot would be running at the username provided by you on telegram. 🚀 - If you would like to make some changes and contribute to the bot, follow the steps below.
- Having cloned the copy to your local machine, enter into the
discord-bot
directory using thecd
command.
$ cd bots/discord-bot
- Great, you are now present in the source code of the project. You can take a look at the contents of the project using the
ls
command.
$ ls
- The Discord Bot🤖 is written in Node.js. Thus, in order to install Node.js, follow the doc here 👉 https://nodejs.org/en/
- Go to Discord Developer Portal and login with your Discord Account.
- Create a New Application.
- Click on Add Bot in the Bot section.
- You’ll get your Bot API token under the token title
- Export the Discord API Token you just got by running
export TOKEN_OSDC=<your-token>
in your terminal.
- Go to OAuth2 section in your application
- Select bot in the scopes menu and Administrator in bot permission menu.
- A Link will be generated in the scope menu, copy it and paste it in your browser URL tab.
- Select your test server in the drop down box...
- Run following commands from terminal
npm install
npm start
Having setup the bot and tested its working, if you want to contribute to it, follow the steps below :
- Make a new branch of the project using the
git checkout
command :
$ git checkout -b "Name-of-the-branch"
- Make changes according to the issue. Test the working of the changes.
- Add the changes to staging area using the
git add
command :
$ git add .
- Commit the changes made using the
git commit
commad :
$ git commit -m "Commit-message"
- Push the changes to your branch on Github using the
git push
command :
$ git push -u origin "Name-of-the-branch-from-step-1"
- Then, go to your forked repository and make a Pull Request 🎉. Refer this for more details.
- Egghead Course on How to Contribute to an Open Source Project on GitHub by Kent C. Dodds.
- Learn Git by Codecademy
- Github Learning Lab
- A Tour of Go
- Learn Go by Codecademy
- Gophercises
- Feel free to check out the
#jiit-lug
channel on IRC or on our Telegram channel. We are always happy to help out!