diff --git a/internal/pkg/commands/commands.go b/internal/pkg/commands/commands.go index 572e2f1..e119a95 100644 --- a/internal/pkg/commands/commands.go +++ b/internal/pkg/commands/commands.go @@ -374,9 +374,8 @@ func RegisterCommands(s *discordgo.Session, cfg *config.Config) { }, }, { - Name: "level", - Description: "Get your current level and XP", - DefaultMemberPermissions: &[]int64{discordgo.PermissionViewChannel}[0], + Name: "level", + Description: "Get your current level and XP", Options: []*discordgo.ApplicationCommandOption{ { Name: "user", @@ -387,9 +386,8 @@ func RegisterCommands(s *discordgo.Session, cfg *config.Config) { }, }, { - Name: "mcstatus", - Description: "Get the status of the Minecraft server", - DefaultMemberPermissions: &[]int64{discordgo.PermissionViewChannel}[0], + Name: "mcstatus", + Description: "Get the status of the Minecraft server", Options: []*discordgo.ApplicationCommandOption{ { Name: "server_ip", @@ -451,6 +449,34 @@ func RegisterCommands(s *discordgo.Session, cfg *config.Config) { }, }, }, + { + Name: "coinflip", + Description: "Flip a coin", + }, + { + Name: "randomnumber", + Description: "Generate a random number", + Options: []*discordgo.ApplicationCommandOption{ + { + Name: "max", + Description: "Maximum number to generate", + Type: discordgo.ApplicationCommandOptionInteger, + Required: true, + }, + }, + }, + { + Name: "chooser", + Description: "Choose a random item from a list", + Options: []*discordgo.ApplicationCommandOption{ + { + Name: "items", + Description: "List of items to choose from, seperated by commas", + Type: discordgo.ApplicationCommandOptionString, + Required: true, + }, + }, + }, } commands := make([]*discordgo.ApplicationCommand, len(Commands)) diff --git a/main.go b/main.go index 3c20267..39044bc 100644 --- a/main.go +++ b/main.go @@ -73,12 +73,20 @@ func main() { commands.GiveawayCommand(s, i) case "edit": commands.EditCommand(s, i) + case "level": + commands.LevelCommand(s, i) case "mcstatus": commands.MinecraftStatusCommand(s, i) case "ban": moderation.BanCommand(s, i) case "unban": moderation.UnbanCommand(s, i) + case "coinflip": + commands.CoinFlipCommand(s, i) + case "randomnumber": + commands.RandomNumberCommand(s, i) + case "chooser": + commands.ChooserCommand(s, i) } } })