Added sending himbucks

This commit is contained in:
2024-11-07 02:56:56 -06:00
parent 1c46b28752
commit be4f67218d
3 changed files with 158 additions and 4 deletions

22
main.go
View File

@ -55,15 +55,35 @@ var (
Name: "syncbucks",
Description: "Sync your himbucks balance with the database",
},
{
Name: "sendbucks",
Description: "Send himbucks to another user",
Options: []*discordgo.ApplicationCommandOption{
{
Type: discordgo.ApplicationCommandOptionUser,
Name: "user",
Description: "The user to send himbucks to",
Required: true,
},
{
Type: discordgo.ApplicationCommandOptionInteger,
Name: "amount",
Description: "Amount of himbucks to send",
Required: true,
MinValue: &[]float64{1}[0],
},
},
},
}
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),
"himbucks": lib.HandleCommand("himbucks", 5*time.Second, command.BalanceCommand),
"himbucks": lib.HandleCommand("himbucks", 5*time.Second, command.BalanceGetCommand),
"himboard": lib.HandleCommand("himboard", 5*time.Second, command.LeaderboardCommand),
"syncbucks": lib.HandleCommand("syncbucks", 1800*time.Second, command.BalanceSyncCommand),
"sendbucks": lib.HandleCommand("sendbucks", 1800*time.Second, command.BalanceSendCommand),
}
)