A bot and server plugin to allow server logs to be sent to Discord channels, and for server commands to be run via the Discord bot.
EXILED 6.0.0++
DiscordIntegration.dll
and its dependencies from Plugin.tar.gz
.DiscordIntegration.dll
inside the EXILED Plugins
folder like any other plugin and its dependencies in the Plugins/dependencies
folder.DiscordIntegration.Bot
(Linux) or DiscordIntegration.Bot.exe
(Windows) file, and place it anywhere within the system running the SL server.Bot token is located on the Bot page under username, Do NOT share the token because people can control the bot if they get it.
Note that before generating the link, check that you have applications.commands scope.
Open the bot once to let it automatically generate config.json file. Remember to always wrap configs with quotation marks, even if it's not necessary for strings.
Fill out the bot's config for the bot token, discord server id, and channel IDs, then start the bot.
cd path/to/bot
replacing path/to/bot
with the path of where the extracted bot is located../DiscordIntegration.Bot
.Open your bot config.json
file.
Add role IDs and list every command they can execute. You can use .*
to permit to that role ID to use all game commands without restrictions.
"ValidCommands": {
"1": {
"953784342595915779": [
"di"
]
}
},
Command | Description | Arguments | Permission | Example |
---|---|---|---|---|
di playerlist | Gets the list of players in the server. | di.playerlist | di playerlist | |
di stafflist | Gets the list of staffers in the server. | di.stafflist | di stafflist |