toast
7e486cb8ce
All checks were successful
Build and push container image / build (push) Successful in 41s
51 lines
1.5 KiB
Go
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
|
|
}
|