This is the code repository running at the heart of our cute little bot in our slack team.
This repo is divided into two parts
-
Server Part
Consisting of following two directories:
- slack_bot
- cse_slack_bot
-
Bot Features
This includes the directory bot_box
This part deals with the HTTP request-response cycle between our server and that of slack.
This is the main area of contribution. Here is the core code running to ensure the correct response of the bot.
-
Create a new virtualenv by typing the command:
$ virtualenv -p python3 <sample-env-name>
-
Activate that virtualenv by executing:
#make sure you are inside your virtualenv directory that is created in prev step then execute myvenv $ source bin/activate
-
Install the requirements by using the command in terminal:
(myenv)$ pip install -r requirements.txt
-
Create a .env file in the root of the project and obtain the api-keys listed in sample_dotenv file and copy them in .env
-
Run Django server. to check if everything is runing smooth, using the command:
(myenv)$ python manage.py runserver
Now you are ready to add some awesome features in this bot!
To test your feature there are few simple steps.
-
Run Django server using:
(myenv)$ python manage.py runserver
-
Open /index/ page in your browser.
-
to be continued......
Feel free to contribute