Added ✨himbucks✨
This commit is contained in:
24
main.go
24
main.go
@ -43,12 +43,22 @@ var (
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "balance",
|
||||
Description: "Check your himbucks balance",
|
||||
},
|
||||
{
|
||||
Name: "leaderboard",
|
||||
Description: "View the himbucks leaderboard",
|
||||
},
|
||||
}
|
||||
|
||||
commandHandlers = map[string]func(s *discordgo.Session, i *discordgo.InteractionCreate){
|
||||
"ping": lib.HandleCommand("ping", 5*time.Second, command.PingCommand),
|
||||
"hs": lib.HandleCommand("hs", 10*time.Second, command.HsCommand),
|
||||
"markov": lib.HandleCommand("markov", 30*time.Second, command.MarkovCommand),
|
||||
"ping": lib.HandleCommand("ping", 5*time.Second, command.PingCommand),
|
||||
"hs": lib.HandleCommand("hs", 10*time.Second, command.HsCommand),
|
||||
"markov": lib.HandleCommand("markov", 30*time.Second, command.MarkovCommand),
|
||||
"balance": lib.HandleCommand("balance", 5*time.Second, command.BalanceCommand),
|
||||
"leaderboard": lib.HandleCommand("leaderboard", 5*time.Second, command.LeaderboardCommand),
|
||||
}
|
||||
)
|
||||
|
||||
@ -74,7 +84,13 @@ func main() {
|
||||
dg.AddHandler(ready)
|
||||
dg.AddHandler(interactionCreate)
|
||||
|
||||
dg.Identify.Intents = discordgo.IntentsGuilds
|
||||
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)
|
||||
}
|
||||
})
|
||||
|
||||
dg.Identify.Intents = discordgo.IntentsGuilds | discordgo.IntentsGuildMessages
|
||||
|
||||
err = dg.Open()
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user