Discord Configuration
WebHooks or Bot?
The plugin offers two integration with Discord: Webhooks, and a Bot.
You can use both.
Message on new Report
✅
✅
Message on new Comment
✅
✅
Update Report message automatically
❌
✅
Update Comment message automatically
❌
✅
Check a report from Discord
❌
✅
Add a comment to a report from Discord
❌
✅
Update a report from Discord (change status, archive...)
❌
✅
For cross-server users: only enable Discord integration in one backend server
How to setup WebHooks
Go to the Discord channel where you want to send the webhook, and create a new one. Then update the config like this and restart the server:

How to setup the Bot
Setting up the Bot is a little trickier, so follow carefully:
Go to https://discord.com/developers/applications/ Create a new application and give it a name (ReportsBot for example)
Now click to Bot, disable public bot, and click on "Reset Token". Then copy the generated token and paste it in the config like shown below:

Then in the config:

Now you can invite the bot in your server Go to the general page, and copy your application ID:

To invite the bot, open a new tab and paste this link https://discordapp.com/oauth2/authorize?scope=bot+applications.commands&client_id= Adding the application id you just copied to it
To make the process easier, you can just go to https://scarsz.me/authorize and paste (CTRL + V) the application ID in this page, and you will be redirected to Discord
Now add the bot to your server:

Just choose the desired server from the dropdown menu and click authorize
Enable developer mode on Discord
Open your Discord settings:

Then in advanced:

7. Copy your Guild ID
Right click on the Guild (Discord server) you just invited the bot and click "Copy Server ID"

Now paste it in the config:

Now choose the channels (or channel if you want) where you want the bot to send the new reports/comments messages and right click on them, then copy the ID

Now paste it in the config and configure to your liking:

You can use the same channel ID if you want
Restart the server and enjoy!
What commands does the bot have?
The Bot registers the command
/reports check <id>
And you can use it to check reports directly from Discord. The output will be something like this:

The message is configurable in the newly generated discord.yml file
While the bot requires the Manage Members permissions to run commands, it's still highly recommended that you give him access only to private channels
Last updated