Before you can start your own bot, you need to set up your own Discord-Bot and to generate your Moodle credentials. The following steps will guide you through this process. Then you will create the
Because there is already a good instruction out there about how to set up a new discord bot, please follow all the steps described in this article.
The important points are:
- Save the token from step 7 (section 1). You will need it later for the environment variables (
- Give the bot all Text Permissions
For this step, you need an existing Moodle account (that can be yours). This account needs access to all courses you want to receive notifications from.
We created an online tool, to make it as simple as possible for you: Open fmdb.tjarbo.me and fill out the form to generate all required environment variables. Note, that no data will be stored or send to any other server than the submitted moodle server! Your credentials will be send to the official API of your moodle instance to receive a new token. You need the displayed results for the next step.
Right now, SSO is not official supported ☹️ We need to figure out how to implement this authentication method. Lernraum Berlin ? -> Click here
This file contains the initial and background configuration of your FMDB. Create a new file
.env on your system and copy and paste the template from this page. There you can also find a description about each variable. Make sure that:
- You have entered the Discord token you saved from the first step.
- You have entered the Moodle values from the last step.
NODE_ENVis set to
- You changed
JWT_SECRETto a very strong value !!! (You can use a password generator for this)
Now you are ready to setup your own fmdb! You can choose between