DemoHelper stores a queue of students waiting for demonstrators in their work.
The Discord Bot Reference Guide has a section on DemoHelper.
At the time of this writing, it's under section 6.
The reference guide can be found here: https://docs.scorpia.network/pdfs/discordbotreferenceguide.pdf
- Ensure that the following are installed:
- python3
- pip
- pipenv
- git
- Open the terminal and run the following
cd ~ git clone https://github.com/AberDiscordBotsTeam/demoHelperBot cd demoHelperBot pipenv install
- Go to the Discord Developer Portal (https://discord.com/developers/applications), create a new application, go to the bot tab, add a bot and then copy the token from that tab
- Rename
config.ini.TEMPLATE
toconfig.ini
and populate theDISCORD.token
andDISCORD.invite-url
variables - Use
pipenv run python3 -m demobot
to run the server - Navigate to the 0Auth2 tab and select bot from the scopes section, scroll down and select the bot permissions: View channels and Send Messages. Copy the link from the scopes section and paste it into your web browser and select the servers you want to add the bot to
Run the following
sudo nano /etc/systemd/system/DemoHelper.service
Then copy and paste the following into that file.
[Unit]
Description=DemoHelper
After=network.target
StartLimitIntervalSec=0
[Service]
Type=simple
Restart=always
RestartSec=1
User=<username>
WorkingDirectory=/home/<username>/demoHelperBot
ExecStart=/usr/bin/pipenv run python3 -m demobot
[Install]
WantedBy=multi-user.target
Then run the following
sudo systemctl daemon-reload
sudo systemctl start DemoHelper
- start the servicesudo systemctl status DemoHelper
- get the status of the servicesudo systemctl stop DemoHelper
- stop the servicesudo systemctl restart DemoHelper
- restart the servicesudo systemctl enable DemoHelper
//sudo systemctl disable DemoHelper
- enable//disable the service on boot of server.journalctl -ru DemoHelper.service
- view recent logs
pipenv update
to update dependenciesgit pull
to pull updates from the repositorysystemctl restart demoBot
to restart the service