mid day commit
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
package commands
|
||||
|
||||
import "github.com/disgoorg/disgo/discord"
|
||||
import (
|
||||
"github.com/disgoorg/disgo/discord"
|
||||
"github.com/disgoorg/json"
|
||||
)
|
||||
|
||||
func getPingCommand() discord.SlashCommandCreate {
|
||||
return discord.SlashCommandCreate{
|
||||
@@ -9,6 +12,41 @@ func getPingCommand() discord.SlashCommandCreate {
|
||||
}
|
||||
}
|
||||
|
||||
func getSyncCommand() discord.SlashCommandCreate {
|
||||
perms := json.NewNullable(discord.PermissionManageChannels)
|
||||
|
||||
return discord.SlashCommandCreate{
|
||||
Name: "sync",
|
||||
Description: "Register/remove a channel to sync.",
|
||||
DefaultMemberPermissions: &perms,
|
||||
Options: []discord.ApplicationCommandOption{
|
||||
discord.ApplicationCommandOptionSubCommand{
|
||||
Name: "register",
|
||||
Description: "Register a channel for logging",
|
||||
Options: []discord.ApplicationCommandOption{
|
||||
discord.ApplicationCommandOptionChannel{
|
||||
Name: "channel",
|
||||
Description: "Channel to register",
|
||||
Required: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
discord.ApplicationCommandOptionSubCommand{
|
||||
Name: "remove",
|
||||
Description: "Remove a channel from logging",
|
||||
Options: []discord.ApplicationCommandOption{
|
||||
discord.ApplicationCommandOptionChannel{
|
||||
Name: "channel",
|
||||
Description: "Channel to remove",
|
||||
Required: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
var Commands = []discord.ApplicationCommandCreate{
|
||||
getPingCommand(),
|
||||
getSyncCommand(),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user