Jump to content

VSChatBot - A Discord bot integration for VS servers


Capsup

Recommended Posts

Abandoned by author. No further support.
VSChatBot

Here's a Discord Bot for those of you who want to engage your community more by allowing them to see what goes on in-game, all from the safety of their favourite chat application, Discord!
I've been developing it in cooperation with the awesome community of RabbitTech, so a big shout-out to those guys (especially TechRabbit himself) for dealing with the silly bugs and giving feedback. 

Features

  • Send text messages from the General chat in-game, directly to a discord channel 
  • Send messages from the same Discord channel, directly to the General chat in-game 
  • Assuming storms are enabled, storm notifications will be sent when they approach, begin and end
  • Optional death messages
  • Optional server up/down messages
  • Various utility commands like !help, !time, !players and !lastseen

Installation

It's a discord client wrapped as a regular mod, so installing it is like any other regular VS server-side mod. 
You will, however, have to manually create a bot at https://discord.com/developers/applications

  1. Create a new application and name it something appropriate
  2. Go into the Bot tab and 'Add Bot'
  3. Optionally disallow 'public bot' which seems to be the default
  4. Go into the OAuth2 tab
  5. Scroll down and give it the 'bot' scope
  6. Scroll further down after clicking and add the 'send messages' text permission
  7. Scroll up again and copy the link that Discord has generated into a new browser window
  8. Add it to the respective server you want
  9. You should now see a bot connect to your Discord server
  10. Go back to the Bot tab and keep it open for when you need to copy your Bot token into the config file

Once this is done, you can take the vschatbot.zip and put into your mods folder.
On the first start-up, the mod will create a vschatbot.json config file in your ModConfig folder and then shut down. This needs to be filled otherwise the bot will not function.

The 3 mandatory fields are:

  • "Token" which is the token generated by the Discord application. Must be a string, so surrounded by "".
  • "ServerId" which is the id of the discord server you want it to connect to. Make sure this remains a number (so no "")!
  • "ChannelId" which is the id of the channel on the discord server you want it to send messages from in-game to, and take from. Make sure this remains a number!

ServerId and ChannelId are the identifiers given by Discord to your server and channel. You can find them directly in Discord if you enable developer mode and then right click -> 'copy id'.

Once these are filled, you can restart the server and you should see the following message as part of start-up in server-main.txt in your log files:

[Notification] vschatbot: connected to discord and ready!

If not, something went wrong, most likely during configuration of the Discord bot.

Contribute

Want more awesome Vintage Story content? Help me spend more time developing mods than enterprise software, by becoming a patron or donating straight to paypal!

Commands

The bot have several commands available, but all are out-of-game. They can be triggered by prefixing your message with ! or @mentioning the bot

  • !help [string] - shows all the available commands if sent with no arguments. If sent with argument, will show the command help of that particular command.
  • !players - shows all online players at the time
  • !time - shows the current time of the server and the current season. The time of the server respects the server config of additional days per month and more, so you will see dates like 35. March. This is to be expected and is how the game calendar works.
  • !lastseen [playername] - allows you to look up when the given playername was last seen online (only works after the bot has been installed obviously).
  • !stats [playername] - shows more detailed stats for an individual (only total play time + deaths atm, more coming as I develop my player stats mod)

Source Code
https://gitlab.com/vsmods-public/vschatbot

Releases
v1.2.0 (29/04/2020): https://gitlab.com/vsmods-public/vschatbot/-/releases/1.2.0
v1.1.1 (03/01/2020): https://gitlab.com/vsmods-public/vschatbot/-/releases/1.1.1

 

Edited by Capsup
  • Like 5
  • Amazing! 2
Link to comment
Share on other sites

14 minutes ago, Kai Effelsberg said:

Featured on "Vintage Story Online: Conquest of Blocks" (https://Discord.io/vintagestoryonline). Exactly what we where looking for for some time already. Thank you.

Glad you like it! We spent a couple weeks working on it and testing it out. Really changed how close the community is on the RabbitTech server

Link to comment
Share on other sites

On 11/23/2020 at 9:16 AM, Julius van Vern said:

Thanks for this great mod. He works perfectly. But on more please. Only 3 seconds per user, was send from the Bot. This should be manually adjustable or reduced to 2 seconds. Is it possible? Thank you :)

Hey, glad to hear it works for you!

I'm not entirely sure what you're asking though? I can't think of anything that only happens every x seconds, could you elaborate a little bit on what that might be? I'm not entirely sure what it is you want made configurable.

On 11/23/2020 at 2:53 PM, Digitalr said:

Bot not sends messages about temporal storms. Game chat, server start/stop, player login/disconnect - all OK.

Storm notifications enabled in config.

 

Hit me up on Discord at Capsup#8250 and we can try to debug it together, if you're interested. It works for others. :)

Edited by Capsup
Link to comment
Share on other sites

Updated the OP with some more information about the commands that the bot makes available. I don't believe I've mentioned these anywhere except for people asking directly. It still works with v1.14.2

Still interested in hearing about feedback and feature requests. We have only encountered the bot becoming sort of unstable, once, on the RabbitTech server, but a simple restart of the server fixed it. I've seen it running on a few servers, and so far I haven't heard of any bugs encountered. The two posters from above never got back to me, so I'm not sure if they managed to fix their issues.

Link to comment
Share on other sites

3 hours ago, Sypher Tendervine said:

Hey caps, is there any documentation for variable handlers like {strength}? If I deleted it in my config I totally would've forgotten it was there. 😧

Hey Sypher,

I haven't had any requests for this sort of functionality, so I just added this on a whim last time when releasing. So there is only that one replacement.

  • Like 1
Link to comment
Share on other sites

12:54:31 [Server Notification] Entering runphase LoadGame
Version: ??????????????? ?????? artEA#8001 v1.14.0 (Stable)01/10/2021 12:54:31: Critical error occurred
System.NullReferenceException: Object reference not set to an instance of an object
  at DSharpPlus.DiscordClient.SendMessageAsync (DSharpPlus.Entities.DiscordChannel channel, System.String content, System.Boolean tts, DSharpPlus.Entities.DiscordEmbed embed) [0x00006] in <73bf8d85ff3e42158583ab7e0be5fd9f>:0
  at vschatbot.src.DiscordWatcher.sendDiscordMessage (System.String message, DSharpPlus.Entities.DiscordEmbed embed) [0x00001] in <0dd8f803229d46d8922633b2f9b3fa75>:0
  at vschatbot.src.DiscordWatcher.Event_ServerStartup () [0x0000d] in <0dd8f803229d46d8922633b2f9b3fa75>:0
  at Vintagestory.Server.ServerEventAPI.OnServerStage (Vintagestory.API.Server.EnumServerRunPhase runPhase) [0x00025] in <785327a3fe2e4d2ebe5e223bef6e3faa>:0
  at Vintagestory.Server.ServerSystemModHandler.OnBeginGameReady (_wTXE2v1LflyYDnwkuDFOLi4HPJm savegame) [0x00000] in <785327a3fe2e4d2ebe5e223bef6e3faa>:0
  at Vintagestory.Server.ServerMain.EnterRunPhase (Vintagestory.API.Server.EnumServerRunPhase runPhase) [0x0009a] in <785327a3fe2e4d2ebe5e223bef6e3faa>:0
  at Vintagestory.Server.ServerMain.Launch () [0x002b4] in <785327a3fe2e4d2ebe5e223bef6e3faa>:0
  at ?????????????????????????????????????????.????????????????????????????????????????? () [0x000ce] in <46462d398d354fd8929b482784f4efa0>:0
  at _eVFDVqwXngafMmcD9boVPO86iWx._hbMghNVJIKTGI5zBx3SuxRG1XDI (System.Threading.ThreadStart ) [0x00007] in <785327a3fe2e4d2ebe5e223bef6e3faa>:0
-------------------------------
Crash written to file at "/home/server/data/Logs/server-crash.txt"

Unhandled Exception occurred
Version: ??????????????? ?????? artEA#8001 v1.14.0 (Stable)01/10/2021 12:54:42: Critical error occurred
System.NullReferenceException: Object reference not set to an instance of an object
  at DSharpPlus.DiscordClient.Dispose () [0x00056] in <73bf8d85ff3e42158583ab7e0be5fd9f>:0
  at DSharpPlus.DiscordClient.Finalize () [0x00000] in <73bf8d85ff3e42158583ab7e0be5fd9f>:0
-------------------------------
Crash written to file at "/home/server/data/Logs/client-crash.txt"

[ERROR] FATAL UNHANDLED EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object
  at DSharpPlus.DiscordClient.Dispose () [0x00056] in <73bf8d85ff3e42158583ab7e0be5fd9f>:0
  at DSharpPlus.DiscordClient.Finalize () [0x00000] in <73bf8d85ff3e42158583ab7e0be5fd9f>:0
Unknown command line option: '--arch=32'

 

:((

Link to comment
Share on other sites

2 hours ago, momai Alex said:

12:54:31 [Server Notification] Entering runphase LoadGame
Version: ??????????????? ?????? artEA#8001 v1.14.0 (Stable)01/10/2021 12:54:31: Critical error occurred
System.NullReferenceException: Object reference not set to an instance of an object
  at DSharpPlus.DiscordClient.SendMessageAsync (DSharpPlus.Entities.DiscordChannel channel, System.String content, System.Boolean tts, DSharpPlus.Entities.DiscordEmbed embed) [0x00006] in <73bf8d85ff3e42158583ab7e0be5fd9f>:0
  at vschatbot.src.DiscordWatcher.sendDiscordMessage (System.String message, DSharpPlus.Entities.DiscordEmbed embed) [0x00001] in <0dd8f803229d46d8922633b2f9b3fa75>:0
  at vschatbot.src.DiscordWatcher.Event_ServerStartup () [0x0000d] in <0dd8f803229d46d8922633b2f9b3fa75>:0
  at Vintagestory.Server.ServerEventAPI.OnServerStage (Vintagestory.API.Server.EnumServerRunPhase runPhase) [0x00025] in <785327a3fe2e4d2ebe5e223bef6e3faa>:0
  at Vintagestory.Server.ServerSystemModHandler.OnBeginGameReady (_wTXE2v1LflyYDnwkuDFOLi4HPJm savegame) [0x00000] in <785327a3fe2e4d2ebe5e223bef6e3faa>:0
  at Vintagestory.Server.ServerMain.EnterRunPhase (Vintagestory.API.Server.EnumServerRunPhase runPhase) [0x0009a] in <785327a3fe2e4d2ebe5e223bef6e3faa>:0
  at Vintagestory.Server.ServerMain.Launch () [0x002b4] in <785327a3fe2e4d2ebe5e223bef6e3faa>:0
  at ?????????????????????????????????????????.????????????????????????????????????????? () [0x000ce] in <46462d398d354fd8929b482784f4efa0>:0
  at _eVFDVqwXngafMmcD9boVPO86iWx._hbMghNVJIKTGI5zBx3SuxRG1XDI (System.Threading.ThreadStart ) [0x00007] in <785327a3fe2e4d2ebe5e223bef6e3faa>:0
-------------------------------
Crash written to file at "/home/server/data/Logs/server-crash.txt"

Unhandled Exception occurred
Version: ??????????????? ?????? artEA#8001 v1.14.0 (Stable)01/10/2021 12:54:42: Critical error occurred
System.NullReferenceException: Object reference not set to an instance of an object
  at DSharpPlus.DiscordClient.Dispose () [0x00056] in <73bf8d85ff3e42158583ab7e0be5fd9f>:0
  at DSharpPlus.DiscordClient.Finalize () [0x00000] in <73bf8d85ff3e42158583ab7e0be5fd9f>:0
-------------------------------
Crash written to file at "/home/server/data/Logs/client-crash.txt"

[ERROR] FATAL UNHANDLED EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object
  at DSharpPlus.DiscordClient.Dispose () [0x00056] in <73bf8d85ff3e42158583ab7e0be5fd9f>:0
  at DSharpPlus.DiscordClient.Finalize () [0x00000] in <73bf8d85ff3e42158583ab7e0be5fd9f>:0
Unknown command line option: '--arch=32'

 

:((

 

I'm assuming you don't see the message 

[Notification] vschatbot: connected to discord and ready!

before that error?
In that case, is your configuration actually correct?

Also, I think a race condition can occur here if your network is too slow in comparison to server startup, the VS server itself will attempt to send a 'ready' message to Discord before the bot has actually connected. Anyways, I added a simple check so it just discards the message at that point. Will be included in the next release.

Link to comment
Share on other sites

The server worked and then crashed. And all the following times did not rise until I removed the mod. I tried to redo the configuration, reissued the token. And Installed a new version of the mod. Crash anyway
Very surprisingly it crashed on a running server. Those. the mod was working and suddenly stopped.

Link to comment
Share on other sites

Created a new discord bot. Issued permission to read messages. Added to the server. Mod loads without config. With the config, this is such a crash

 

artEA#8001 v1.14.0 (Stable)01/14/2021 11:22:59: Critical error occurred
System.NullReferenceException: Object reference not set to an instance of an object
  at DSharpPlus.DiscordClient.SendMessageAsync (DSharpPlus.Entities.DiscordChannel channel, System.String content, System.Boolean tts, DSharpPlus.Entities.DiscordEmbed embed) [0x00006] in <73bf8d85ff3e42158583ab7e0be5fd9f>:0
  at vschatbot.src.DiscordWatcher.sendDiscordMessage (System.String message, DSharpPlus.Entities.DiscordEmbed embed) [0x00001] in <0dd8f803229d46d8922633b2f9b3fa75>:0
  at vschatbot.src.DiscordWatcher.Event_ServerStartup () [0x0000d] in <0dd8f803229d46d8922633b2f9b3fa75>:0
  at Vintagestory.Server.ServerEventAPI.OnServerStage (Vintagestory.API.Server.EnumServerRunPhase runPhase) [0x00025] in <785327a3fe2e4d2ebe5e223bef6e3faa>:0
  at Vintagestory.Server.ServerSystemModHandler.OnBeginGameReady (_wTXE2v1LflyYDnwkuDFOLi4HPJm savegame) [0x00000] in <785327a3fe2e4d2ebe5e223bef6e3faa>:0
  at Vintagestory.Server.ServerMain.EnterRunPhase (Vintagestory.API.Server.EnumServerRunPhase runPhase) [0x0009a] in <785327a3fe2e4d2ebe5e223bef6e3faa>:0
  at Vintagestory.Server.ServerMain.Launch () [0x002b4] in <785327a3fe2e4d2ebe5e223bef6e3faa>:0
  at ?????????????????????????????????????????.????????????????????????????????????????? () [0x000ce] in <46462d398d354fd8929b482784f4efa0>:0
  at _eVFDVqwXngafMmcD9boVPO86iWx._hbMghNVJIKTGI5zBx3SuxRG1XDI (System.Threading.ThreadStart ) [0x00007] in <785327a3fe2e4d2ebe5e223bef6e3faa>:0
-------------------------------
Crash written to file at "/home/server/data/Logs/server-crash.txt"

Unhandled Exception occurred
Version: ??????????????? ?????? artEA#8001 v1.14.0 (Stable)01/14/2021 11:23:09: Critical error occurred
System.NullReferenceException: Object reference not set to an instance of an object
  at DSharpPlus.DiscordClient.Dispose () [0x00056] in <73bf8d85ff3e42158583ab7e0be5fd9f>:0
  at DSharpPlus.DiscordClient.Finalize () [0x00000] in <73bf8d85ff3e42158583ab7e0be5fd9f>:0
-------------------------------
Crash written to file at "/home/server/data/Logs/client-crash.txt"

[ERROR] FATAL UNHANDLED EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object
  at DSharpPlus.DiscordClient.Dispose () [0x00056] in <73bf8d85ff3e42158583ab7e0be5fd9f>:0
  at DSharpPlus.DiscordClient.Finalize () [0x00000] in <73bf8d85ff3e42158583ab7e0be5fd9f>:0

 

 

Object reference not set to an instance of an object

  

On 1/10/2021 at 6:42 PM, Capsup said:

 

I'm assuming you don't see the message 



[Notification] vschatbot: connected to discord and ready!

before that error?
In that case, is your configuration actually correct?

Also, I think a race condition can occur here if your network is too slow in comparison to server startup, the VS server itself will attempt to send a 'ready' message to Discord before the bot has actually connected. Anyways, I added a simple check so it just discards the message at that point. Will be included in the next release.

The problem is that the server is crashing. Absolutely. Every time (Although everything worked fine recently.

Edited by momai Alex
Link to comment
Share on other sites

Hey @Capsup we get the following CrashReport, after crashing the server caused by the Discord Mod. Can you please check, what happend here? Thank you :)

 

-------------------------------
Version: v1.14.5 (Stable)1/18/2021 6:49:16 AM: Critical error occurred
System.NullReferenceException: Object reference not set to an instance of an object.
   at DSharpPlus.DiscordClient.SendMessageAsync(DiscordChannel channel, String content, Boolean tts, DiscordEmbed embed)
   at vschatbot.src.DiscordWatcher.sendDiscordMessage(String message, DiscordEmbed embed) in C:\source\civcraft\vsmods\mods-dll\vschatbot\src\DiscordWatcher.cs:line 244
   at vschatbot.src.DiscordWatcher.Event_ServerShutdown() in C:\source\civcraft\vsmods\mods-dll\vschatbot\src\DiscordWatcher.cs:line 216
   at Vintagestory.Server.ServerEventAPI.OnServerStage(EnumServerRunPhase runPhase)
   at Vintagestory.Server.ServerSystemModHandler.OnBeginShutdown()
   at Vintagestory.Server.ServerMain.EnterRunPhase(EnumServerRunPhase runPhase)
   at Vintagestory.Server.ServerMain.Stop(String reason)
   at ‮‭‏‬‫‮‎‫‏‬‍‍‭‌‫‍‫‮‎‭‎‪‏‌‮‭‮‭‮‭‍‮._dkdtGIYBc54jrhL1MsbExekePPDA(Object , EventArgs )
   at VSPlatform.XPlatImplWin.ConsoleCtrlCheck(CtrlTypes ctrlType)
-------------------------------

 

Link to comment
Share on other sites

  • 2 weeks later...

Several of my players requested a delay to the joined server notification if its possible? For instance if you join my server it pops on discord "blank player connected" however the player is still in the process of joining & wont actually be in the game for about 10 more seconds.

Maybe this is something i can delay in the discord bot itself

Link to comment
Share on other sites

I am also getting a crash after following all the setup instructions on a new server:

Version: v1.14.7 (Stable)02/04/2021 00:20:06: Critical error occurred
System.NullReferenceException: Object reference not set to an instance of an object
  at DSharpPlus.DiscordClient.SendMessageAsync (DSharpPlus.Entities.DiscordChannel channel, System.String content, System.Boolean tts, DSharpPlus.Entities.DiscordEmbed embed) [0x00006] in <73bf8d85ff3e42158583ab7e0be5fd9f>:0 
  at vschatbot.src.DiscordWatcher.sendDiscordMessage (System.String message, DSharpPlus.Entities.DiscordEmbed embed) [0x00001] in <0dd8f803229d46d8922633b2f9b3fa75>:0 
  at vschatbot.src.DiscordWatcher.Event_ServerStartup () [0x0000d] in <0dd8f803229d46d8922633b2f9b3fa75>:0 
  at Vintagestory.Server.ServerEventAPI.OnServerStage (Vintagestory.API.Server.EnumServerRunPhase runPhase) [0x00025] in <fdc28645804142d4991a7de4219c3f69>:0 
  at Vintagestory.Server.ServerSystemModHandler.OnBeginGameReady (_LfucH98MPtkaEcaY7E8e5wFkxZ2 savegame) [0x00000] in <fdc28645804142d4991a7de4219c3f69>:0 
  at Vintagestory.Server.ServerMain.EnterRunPhase (Vintagestory.API.Server.EnumServerRunPhase runPhase) [0x0009a] in <fdc28645804142d4991a7de4219c3f69>:0 
  at Vintagestory.Server.ServerMain.Launch () [0x002b4] in <fdc28645804142d4991a7de4219c3f69>:0 
  at ‎‬‫‏‏‌‮‍‏‪‮‭‬‮‮‮‫‮‏‫‍‮‮.‍‫‫‪‬‬‎‍‭‍‬‍‮‌‍‫‭‍‍‮ () [0x000ce] in <d324d8606a174c4ea08d93683f0f93e3>:0 
  at _NdjU5BXvKkfOW2d88pNMbEAjE1q._QN2fpVgRVBDOLs27GIkkdMlxeKf (System.Threading.ThreadStart ) [0x00007] in <fdc28645804142d4991a7de4219c3f69>:0 
-------------------------------

Link to comment
Share on other sites

16 hours ago, CJHKnight2 said:

I am also getting a crash after following all the setup instructions on a new server:

Version: v1.14.7 (Stable)02/04/2021 00:20:06: Critical error occurred
System.NullReferenceException: Object reference not set to an instance of an object
  at DSharpPlus.DiscordClient.SendMessageAsync (DSharpPlus.Entities.DiscordChannel channel, System.String content, System.Boolean tts, DSharpPlus.Entities.DiscordEmbed embed) [0x00006] in <73bf8d85ff3e42158583ab7e0be5fd9f>:0 
  at vschatbot.src.DiscordWatcher.sendDiscordMessage (System.String message, DSharpPlus.Entities.DiscordEmbed embed) [0x00001] in <0dd8f803229d46d8922633b2f9b3fa75>:0 
  at vschatbot.src.DiscordWatcher.Event_ServerStartup () [0x0000d] in <0dd8f803229d46d8922633b2f9b3fa75>:0 
  at Vintagestory.Server.ServerEventAPI.OnServerStage (Vintagestory.API.Server.EnumServerRunPhase runPhase) [0x00025] in <fdc28645804142d4991a7de4219c3f69>:0 
  at Vintagestory.Server.ServerSystemModHandler.OnBeginGameReady (_LfucH98MPtkaEcaY7E8e5wFkxZ2 savegame) [0x00000] in <fdc28645804142d4991a7de4219c3f69>:0 
  at Vintagestory.Server.ServerMain.EnterRunPhase (Vintagestory.API.Server.EnumServerRunPhase runPhase) [0x0009a] in <fdc28645804142d4991a7de4219c3f69>:0 
  at Vintagestory.Server.ServerMain.Launch () [0x002b4] in <fdc28645804142d4991a7de4219c3f69>:0 
  at ‎‬‫‏‏‌‮‍‏‪‮‭‬‮‮‮‫‮‏‫‍‮‮.‍‫‫‪‬‬‎‍‭‍‬‍‮‌‍‫‭‍‍‮ () [0x000ce] in <d324d8606a174c4ea08d93683f0f93e3>:0 
  at _NdjU5BXvKkfOW2d88pNMbEAjE1q._QN2fpVgRVBDOLs27GIkkdMlxeKf (System.Threading.ThreadStart ) [0x00007] in <fdc28645804142d4991a7de4219c3f69>:0 
-------------------------------

Are you using latest version? dm me your vschat config please I can compare against mine.

Link to comment
Share on other sites

On 2/3/2021 at 10:20 PM, locutus said:

Several of my players requested a delay to the joined server notification if its possible? For instance if you join my server it pops on discord "blank player connected" however the player is still in the process of joining & wont actually be in the game for about 10 more seconds.

Maybe this is something i can delay in the discord bot itself

Try this modifitacoin of this mod Release Join message fix · EvilToasterDBU/vschatbot (github.com)

My friend and I are gradually improving the functionality of the bot in our release. 

For this version need update config, just delete old and configurate after first launch.

Edited by Evil Toaster
Link to comment
Share on other sites

@Evil Toaster So I downloaded the VSchatbot test 1.1.14 and looked at the vschatbot.json config file. So what is a ConsoleChannelId?? I have my Token, ServerId and ChannelId:

  "Token": "token",
  "ServerId": 11111111111,
  "ChannelId": 222222222222,
  "ConsoleChannelId": 33333333333, <--------???

Link to comment
Share on other sites

3 hours ago, CJHKnight2 said:

@Evil Toaster So I downloaded the VSchatbot test 1.1.14 and looked at the vschatbot.json config file. So what is a ConsoleChannelId?? I have my Token, ServerId and ChannelId:

  "Token": "token",
  "ServerId": 11111111111,
  "ChannelId": 222222222222,
  "ConsoleChannelId": 33333333333, <--------???

Oh sorry. Forgot to remove this line in this release. It is not used. 

Link to comment
Share on other sites

@Evil Toaster Still getting a server crash with V1.1.4 test:

Version: v1.14.7 (Stable)02/04/2021 00:20:06: Critical error occurred
System.NullReferenceException: Object reference not set to an instance of an object
  at DSharpPlus.DiscordClient.SendMessageAsync (DSharpPlus.Entities.DiscordChannel channel, System.String content, System.Boolean tts, DSharpPlus.Entities.DiscordEmbed embed) [0x00006] in <73bf8d85ff3e42158583ab7e0be5fd9f>:0 
  at vschatbot.src.DiscordWatcher.sendDiscordMessage (System.String message, DSharpPlus.Entities.DiscordEmbed embed) [0x00001] in <0dd8f803229d46d8922633b2f9b3fa75>:0 
  at vschatbot.src.DiscordWatcher.Event_ServerStartup () [0x0000d] in <0dd8f803229d46d8922633b2f9b3fa75>:0 
  at Vintagestory.Server.ServerEventAPI.OnServerStage (Vintagestory.API.Server.EnumServerRunPhase runPhase) [0x00025] in <fdc28645804142d4991a7de4219c3f69>:0 
  at Vintagestory.Server.ServerSystemModHandler.OnBeginGameReady (_LfucH98MPtkaEcaY7E8e5wFkxZ2 savegame) [0x00000] in <fdc28645804142d4991a7de4219c3f69>:0 
  at Vintagestory.Server.ServerMain.EnterRunPhase (Vintagestory.API.Server.EnumServerRunPhase runPhase) [0x0009a] in <fdc28645804142d4991a7de4219c3f69>:0 
  at Vintagestory.Server.ServerMain.Launch () [0x002b4] in <fdc28645804142d4991a7de4219c3f69>:0 
  at ‎‬‫‏‏‌‮‍‏‪‮‭‬‮‮‮‫‮‏‫‍‮‮.‍‫‫‪‬‬‎‍‭‍‬‍‮‌‍‫‭‍‍‮ () [0x000ce] in <d324d8606a174c4ea08d93683f0f93e3>:0 
  at _NdjU5BXvKkfOW2d88pNMbEAjE1q._QN2fpVgRVBDOLs27GIkkdMlxeKf (System.Threading.ThreadStart ) [0x00007] in <fdc28645804142d4991a7de4219c3f69>:0 
-------------------------------

Edited by CJHKnight2
Link to comment
Share on other sites

42 minutes ago, CJHKnight2 said:

@Evil Toaster Still getting a server crash with V1.1.4 test:

Version: v1.14.7 (Stable)02/04/2021 00:20:06: Critical error occurred
System.NullReferenceException: Object reference not set to an instance of an object
  at DSharpPlus.DiscordClient.SendMessageAsync (DSharpPlus.Entities.DiscordChannel channel, System.String content, System.Boolean tts, DSharpPlus.Entities.DiscordEmbed embed) [0x00006] in <73bf8d85ff3e42158583ab7e0be5fd9f>:0 
  at vschatbot.src.DiscordWatcher.sendDiscordMessage (System.String message, DSharpPlus.Entities.DiscordEmbed embed) [0x00001] in <0dd8f803229d46d8922633b2f9b3fa75>:0 
  at vschatbot.src.DiscordWatcher.Event_ServerStartup () [0x0000d] in <0dd8f803229d46d8922633b2f9b3fa75>:0 
  at Vintagestory.Server.ServerEventAPI.OnServerStage (Vintagestory.API.Server.EnumServerRunPhase runPhase) [0x00025] in <fdc28645804142d4991a7de4219c3f69>:0 
  at Vintagestory.Server.ServerSystemModHandler.OnBeginGameReady (_LfucH98MPtkaEcaY7E8e5wFkxZ2 savegame) [0x00000] in <fdc28645804142d4991a7de4219c3f69>:0 
  at Vintagestory.Server.ServerMain.EnterRunPhase (Vintagestory.API.Server.EnumServerRunPhase runPhase) [0x0009a] in <fdc28645804142d4991a7de4219c3f69>:0 
  at Vintagestory.Server.ServerMain.Launch () [0x002b4] in <fdc28645804142d4991a7de4219c3f69>:0 
  at ‎‬‫‏‏‌‮‍‏‪‮‭‬‮‮‮‫‮‏‫‍‮‮.‍‫‫‪‬‬‎‍‭‍‬‍‮‌‍‫‭‍‍‮ () [0x000ce] in <d324d8606a174c4ea08d93683f0f93e3>:0 
  at _NdjU5BXvKkfOW2d88pNMbEAjE1q._QN2fpVgRVBDOLs27GIkkdMlxeKf (System.Threading.ThreadStart ) [0x00007] in <fdc28645804142d4991a7de4219c3f69>:0 

-------------------------------

What OS is on the server? Have you tried other versions of the bot? For example, the version by Capsup.

Did the bot of this version work before? Does it crash again?

What configs? (Send me from to PM)

Edited by Evil Toaster
Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.