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:
4
main.go
4
main.go
@@ -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{})
|
||||
|
||||
Reference in New Issue
Block a user