This repository is for an University project of the Ferdinand Porsche FernFH. It uses discordjs to interact with Discord.
This Bot needs nodejs and npm to work properly. npm is included in nodejs.
You need to setup some Things before you can use this Bot. Everything you need to know is described in the first half of this Article. But it also shows you how to write an Bot in Python.
To use that Bot for your Applikation you have to generate an auth.json file where you have to set Following attributes:
{
"token": "Token_from_the_Bot",
"channelid": 'the_ChannelId_where_the_Bot_should_answer'
}for use with the Mysql Database you have to generate a file that's named mysql.json in the root directory. This file must have this structure:
{
"host" : "******",
"port" : ******,
"username" : "********",
"password" : "******",
"database" : "******"
}The Bot writes periodically all Courses that where created in the WebApplication. This courses are send into the Channel that is mentioned in the auth.json File. Every Discord user can register or cancel via Discord for an course. This can be done with simple commands. Every command has to beginn with an ! and then the wanted command_name some of the Commands can pass threw arguments this can be done when the command seperated with an space between command_name and argument for Example !details 1
| Command | What it does |
|---|---|
| ping | returns how long the message needs to be processed by the Server |
| intro | the bot greets you ^^ |
| anmelden [coursenumber] | sign in for the Course |
| abmelden [coursenumber] | sign out for the Course |
| details [coursenumber] | sends you an private Message with the Details of the course |
