stabilized command registering

This commit is contained in:
2024-02-22 09:32:40 +01:00
parent ca6a199244
commit cf5e81f65c
2 changed files with 18 additions and 9 deletions

View File

@@ -39,7 +39,6 @@ func main() {
fmt.Println("Discord session created")
}
discord.Identify.Intents = discordgo.IntentsGuildMessages | discordgo.IntentsGuilds | discordgo.IntentMessageContent
defer removeCommandFromAllGuilds(discord)
discord.AddHandler(ready)
discord.AddHandler(interactionCreate)
discord.AddHandler(messageCreate)
@@ -53,7 +52,6 @@ func main() {
signal.Notify(sc, syscall.SIGINT, syscall.SIGTERM, os.Interrupt)
<-sc
fmt.Println("\nShutting down...")
defer removeCommandFromAllGuilds(discord)
discord.Close()
}