Mods / Discord Bot
Tags:
#Utility
Author: bluelightning32
Side: Server
Created: Sep 5th 2021 at 11:27 PM
Last modified: Sep 10th 2021 at 5:29 AM
Downloads: 2301
Follow Unfollow 1
Author: bluelightning32
Side: Server
Created: Sep 5th 2021 at 11:27 PM
Last modified: Sep 10th 2021 at 5:29 AM
Downloads: 2301
Follow Unfollow 1
Latest release (for Vintage Story 1.15.5, outdated):
discordbot.zip
1-click install
Note that Th3Essentials has a superset of the functionality of Discord Bot. I recommend using it instead. Th3Essentials was released after I released this mod.
This is a server side Vintage Story mod that provides a Discord bridge. Features:
- Players join and leave messages are sent to Discord.
- Players death messages are sent to Discord.
- Messages from discord are sent to the game.
- Server startup and shutdown messages are sent to Discord.
- Discord messages from specific users can be ignored (useful for bots).
- Configurable log scraping to Discord. By default this is used for temporal storm messages.
- In game player groups can be configured to connect to different Discord channels.
- Individual features can be enabled or disabled through the config file.
Installation
- Put the
discordbot.zipfile in theModsfolder on the server-side only. - Start the server to create a default
ModConfig/discordbot.jsonfile in your VS config folder. Note that until the correct login information is added to the config file, you will see errors in the server log about 'The server sent close 4004: "Authentication failed.'" - Create a discord application for your server. The application name will become the bot's username.
- Click on the Bot tab of the application, then click Add Bot.
- On the Bot tab, copy the token (you can use the Copy button). Paste that token between the quotes in the
DiscordTokenfield indiscordbot.json. Note that the client secret on the OAuth2 tab is different from the token and cannot be used as a substitue for the token. - Give the bot permissions to interact with your server on the OAuth2 tab. First click the bot checkbox under scopes, then check Send Messages below.
- Go to the generated URL shown at the end of the scopes section. Select the server to add your bot to.
- In Discord, right click the channel the Bot should listen to, and select Copy ID in the context menu. Paste that channel into the
DefaultChannel/DiscordChannelfield ofdiscordbot.json. The channel id should not be surrounded by quotes. - Restart the server for the mod settings to take effect.
Per group channels
The text from specifc in game groups can be redirected to their own discord channel. In-game groups are connected to the default channel, unless it has a channel override. This is configured through the
ChannelOverrides section in discordbot.json. The default config has a sample no-op entry that you may edit or delete. The name of the group in-game is the key for the entries in the dict. DiscordChannel is the id of the Discord channel to connect the in-game group to.Server start/stop, death messages, log scrapes, etc. are only sent to the default channel.
| Mod Version | Mod Identifier | For Game version | Downloads | Released | Changelog | Download | 1-click mod install* |
|---|---|---|---|---|---|---|---|
| 1.0.4 | discordbot | 528 | Sep 10th 2021 at 5:29 AM | discordbot.zip | 1-click install | ||
|
Sometimes the Discord connection was closed before the shutdown message finished getting sent, which would result in the shutdown message not showing up in Discord. This change instead waits for the shutdown message to be sent before proceeding with the shutdown sequence. | |||||||
| 1.0.3 | discordbot | 412 | Sep 10th 2021 at 12:53 AM | discordbot.zip | 1-click install | ||
|
Updated the player name regular expression to avoid duplicating the username in Discord for players without the supporter addon. | |||||||
| 1.0.2 | discordbot | 443 | Sep 7th 2021 at 7:26 AM | discordbot.zip | 1-click install | ||
|
Fix running the mod on Windows servers. | |||||||
| 1.0.1 | discordbot | 466 | Sep 5th 2021 at 11:48 PM | discordbot.zip | 1-click install | ||
|
Fix hang on server shutdown. | |||||||
| 1.0.0 | discordbot | 452 | Sep 5th 2021 at 11:28 PM | Empty | discordbot.zip | 1-click install | |
When you log in using your dicord bot it says in my channel My chararecter name joined. Say hi :) Then shows the class and then next to it it shows a little face portrait of my character next to it which I thought was a nice touch. It had stop working awhile back but is now working again as of today.. I may have to move toward the other one also but Heres hoping that one does the same thing..
I actually switched to using Th3Essentials on my server. I'm not aware of anything that my mod has that Th3Essentials is missing. I'm not sure what you mean by "little pictures it gives inside Discord".
Have you tried Th3Essentials?
Will you be updating this for 1.20.3 I knows its not
Th3Essentials
But I love the little pictures it gives inside Discord and its a really nice easy bot..mod..
It works in 1.20.3 but gives an error.
I dont use github so thought I would post this here for error in 1.20.3 stable.
Exception one of more errors occured. (The server responded with a 50013: Missing Permissions)
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task'1.GetResultCore(Boolean waitCompletionNotification)
at DiscordBot.Bot.Connect() in C:users\Billy|RiderProjects\DiscordBot\src\Bot.cs:line 123
Please update..... Would appriciate it:)
I released v1.0.1 to fix a hang on shutdown. If it's only stalling for a couple seconds on shutdown, but that may be normal.
As for for the start up error, please file a bug in github. Include the error message and which platform you're running it on. Honestly, I've only tested the bot on Linux so far.
every time i try and set up the config for the bot to work, it keeps giving me the failed to start system discordbot.discordbotmod. and it still hangs when for a second when closing down the server