This repository has been archived on 2024-05-11. You can view files and clone it, but cannot push or open issues or pull requests.
Corn-Utility/commandStore.go
toast 7e486cb8ce
All checks were successful
Build and push container image / build (push) Successful in 41s
Add functional ban records
2023-10-23 18:36:40 +11:00

51 lines
1.5 KiB
Go

package main
import "github.com/disgoorg/disgo/discord"
/*
This file is used to store the commands for the bot
and will be sent to Discord API on startup
If you came here expecting to see code for the commands,
they are in events/interaction.go
*/
var FALSE = false
func commandsJSON() (commandList []discord.ApplicationCommandCreate) {
commandList = []discord.ApplicationCommandCreate{
discord.SlashCommandCreate{
Name: "host-stats",
Description: "Host statistics like OS, CPU Usage, etc",
},
discord.SlashCommandCreate{
Name: "repository",
Description: "A casual button that forwards you to the bot's repository",
},
discord.SlashCommandCreate{
Name: "config",
Description: "View or change the bot's configuration",
DMPermission: &FALSE,
Options: []discord.ApplicationCommandOption{
discord.ApplicationCommandOptionChannel{
Name: "ban-records",
Description: "Set a channel that will be used to display ban records via Google Sheets",
Required: false,
ChannelTypes: []discord.ChannelType{
discord.ChannelTypeGuildText,
discord.ChannelTypeGuildForum,
discord.ChannelTypeGuildPublicThread,
discord.ChannelTypeGuildPrivateThread,
},
},
discord.ApplicationCommandOptionString{
Name: "google-spreadsheet-id",
Description: "Set the ID of the Google Spreadsheet that will be used to display ban records",
Required: false,
},
},
},
}
return commandList
}