1
0
mirror of https://github.com/mgerb/ServerStatus synced 2026-01-10 03:03:04 +00:00

Fix outdated broken bot

discordgo upgraded from 0.20.0 to 0.24.0 which fixed the bot starting with a websocket error and remaining offline. Additionally, the command prefix and MessageHandling commands have been replaced with Discord's newer slash commands.
This commit is contained in:
Ethorbit
2024-03-03 00:29:58 -08:00
committed by Mitchell Gerber
parent 12c20b928c
commit ed232fc785
4 changed files with 60 additions and 24 deletions

View File

@@ -22,13 +22,13 @@ func main() {
bot.Connect(config.Config.Token)
// add handlers
bot.AddHandler(serverstatus.MessageHandler)
bot.AddHandler(serverstatus.InteractionHandler)
//start websocket to listen for messages
bot.Start()
//start server status task
serverstatus.Start()
serverstatus.Start()
// Simple way to keep program running until CTRL-C is pressed.
<-make(chan struct{})