Spending lots of time on useless discord bots makes to make the pain go away

This commit is contained in:
2024-11-05 18:01:58 -06:00
parent 82c62658bb
commit 5a1158048d
10 changed files with 162 additions and 125 deletions

View File

@ -89,10 +89,13 @@ func main() {
dg.AddHandler(ready)
dg.AddHandler(interactionCreate)
processorManager := lib.NewMessageProcessorManager()
// Register processors
processorManager.RegisterProcessor(lib.ProcessHimbucks)
dg.AddHandler(func(s *discordgo.Session, m *discordgo.MessageCreate) {
if err := lib.ProcessMessage(s, m); err != nil {
log.Printf("Error processing message for himbucks: %v", err)
}
processorManager.ProcessMessage(s, m)
})
dg.Identify.Intents = discordgo.IntentsGuilds | discordgo.IntentsGuildMessages