Documentation
¶
Index ¶
- Variables
- func AvatarHandler(e *handler.CommandEvent) error
- func BotInfoHandler(e *handler.CommandEvent) error
- func CreateEmbedFieldsForCategory(category CommandCategory) (fields []discord.EmbedField, err error)
- func CreateHandler() *handler.Mux
- func EightBallHandler(e *handler.CommandEvent) error
- func HelpHandler(e *handler.CommandEvent) error
- func HowGayHandler(e *handler.CommandEvent) error
- func HugHandler(e *handler.CommandEvent) error
- func InviteHandler(e *handler.CommandEvent) error
- func KissHandler(e *handler.CommandEvent) error
- func PPHandler(e *handler.CommandEvent) error
- func PingHandler(e *handler.CommandEvent) error
- func PlayHandler(e *handler.CommandEvent) error
- func ServerInfoHandler(e *handler.CommandEvent) error
- func ShipHandler(e *handler.CommandEvent) error
- func SlapHandler(e *handler.CommandEvent) error
- func UserInfoHandler(e *handler.CommandEvent) error
- type CommandCategory
Constants ¶
This section is empty.
Variables ¶
var CommandCategories = []CommandCategory{ GeneralCommands, FunCommands, InteractionCommands, MusicCommands, }
CommandCategories combines all command categories.
var Commands []discord.ApplicationCommandCreate
Commands contains all commands.
var FunCommands = CommandCategory{ Name: "Fun", Commands: []discord.ApplicationCommandCreate{ discord.SlashCommandCreate{ Name: "howgay", Description: "Schlatt simulator.", Options: []discord.ApplicationCommandOption{ discord.ApplicationCommandOptionUser{ Name: "user", Description: "The user to get the gayness of. Defaults to yourself.", Required: false, }, }, DMPermission: utils.NewFalse(), }, discord.SlashCommandCreate{ Name: "pp", Description: "Calculates the size of someone's fellow uhm... member.", Options: []discord.ApplicationCommandOption{ discord.ApplicationCommandOptionUser{ Name: "user", Description: "The user to get the pp size of. Defaults to yourself.", Required: false, }, }, DMPermission: utils.NewFalse(), }, discord.SlashCommandCreate{ Name: "8ball", Description: "Ask the magic 8ball a question. Come, come now, don't be shy.", Options: []discord.ApplicationCommandOption{ discord.ApplicationCommandOptionString{ Name: "question", Description: "The question to ask the 8ball. 100% accurate, I swear.", Required: true, }, }, DMPermission: utils.NewFalse(), }, discord.SlashCommandCreate{ Name: "ship", Description: "Who will be the next couple? 👀", Options: []discord.ApplicationCommandOption{ discord.ApplicationCommandOptionUser{ Name: "first", Description: "The first user to ship.", Required: true, }, discord.ApplicationCommandOptionUser{ Name: "second", Description: "The second user to ship.", Required: true, }, }, DMPermission: utils.NewFalse(), }, }, }
FunCommands contains all fun commands.
var GeneralCommands = CommandCategory{ Name: "General", Commands: []discord.ApplicationCommandCreate{ discord.SlashCommandCreate{ Name: "ping", Description: "Pong! Nice shot!", }, discord.SlashCommandCreate{ Name: "help", Description: "Here to help!", Options: []discord.ApplicationCommandOption{ discord.ApplicationCommandOptionString{ Name: "category", Description: "The category to get help for.", Required: false, Choices: []discord.ApplicationCommandOptionChoiceString{ { Name: "All", Value: "All", }, { Name: "General", Value: "General", }, { Name: "Fun", Value: "Fun", }, { Name: "Interaction", Value: "Interaction", }, { Name: "Music", Value: "Music", }, }, }, }, }, discord.SlashCommandCreate{ Name: "avatar", Description: "Get the avatar of a user.", Options: []discord.ApplicationCommandOption{ discord.ApplicationCommandOptionUser{ Name: "user", Description: "The user to get the avatar of. Defaults to yourself.", Required: false, }, discord.ApplicationCommandOptionBool{ Name: "server-specific", Description: "Whether to get the server-specific avatar of the user.", Required: false, }, }, DMPermission: utils.NewFalse(), }, discord.UserCommandCreate{ Name: "Avatar", DMPermission: utils.NewFalse(), }, discord.SlashCommandCreate{ Name: "botinfo", Description: "Get information about the bot.", }, discord.SlashCommandCreate{ Name: "serverinfo", Description: "Get information about the server.", DMPermission: utils.NewFalse(), }, discord.SlashCommandCreate{ Name: "userinfo", Description: "Get information about a user.", Options: []discord.ApplicationCommandOption{ discord.ApplicationCommandOptionUser{ Name: "user", Description: "The user to get the information of. Defaults to yourself.", Required: false, }, }, DMPermission: utils.NewFalse(), }, discord.UserCommandCreate{ Name: "Info", DMPermission: utils.NewFalse(), }, discord.SlashCommandCreate{ Name: "invite", Description: "Get the invite link for the bot.", }, }, }
GeneralCommands contains all general commands.
var InteractionCommands = CommandCategory{ Name: "Interactions", Commands: []discord.ApplicationCommandCreate{ discord.SlashCommandCreate{ Name: "kiss", Description: "Uhm yeah, I don't know what to say here.", Options: []discord.ApplicationCommandOption{ discord.ApplicationCommandOptionUser{ Name: "user", Description: "The user to kiss. Defaults to yourself.", Required: false, }, }, DMPermission: utils.NewFalse(), }, discord.UserCommandCreate{ Name: "Kiss", DMPermission: utils.NewFalse(), }, discord.SlashCommandCreate{ Name: "hug", Description: "Wuv you", Options: []discord.ApplicationCommandOption{ discord.ApplicationCommandOptionUser{ Name: "user", Description: "The user to hug. Defaults to yourself.", Required: false, }, }, DMPermission: utils.NewFalse(), }, discord.UserCommandCreate{ Name: "Hug", DMPermission: utils.NewFalse(), }, discord.SlashCommandCreate{ Name: "slap", Description: "Urusai or something, idk.", Options: []discord.ApplicationCommandOption{ discord.ApplicationCommandOptionUser{ Name: "user", Description: "The user to slap. Defaults to yourself.", Required: false, }, }, DMPermission: utils.NewFalse(), }, discord.UserCommandCreate{ Name: "Slap", DMPermission: utils.NewFalse(), }, }, }
InteractionCommands contains all interaction commands.
var MusicCommands = CommandCategory{ Name: "Music", Commands: []discord.ApplicationCommandCreate{ discord.SlashCommandCreate{ Name: "play", Description: "🎶 Play music from your favorite sites. Supports URLs and search queries.", Options: []discord.ApplicationCommandOption{ discord.ApplicationCommandOptionString{ Name: "query", Description: "The song to play. Can be a link or a search query.", Required: true, }, discord.ApplicationCommandOptionString{ Name: "position", Description: "The position in the queue to play the song at. Defaults to the end of the queue.", Required: false, Choices: []discord.ApplicationCommandOptionChoiceString{ { Name: "Start", Value: "Start", }, { Name: "End", Value: "End", }, }, }, }, DMPermission: utils.NewFalse(), }, }, }
MusicCommands contains all music commands.
Functions ¶
func AvatarHandler ¶
func AvatarHandler(e *handler.CommandEvent) error
AvatarHandler is the handler for the avatar command.
func BotInfoHandler ¶
func BotInfoHandler(e *handler.CommandEvent) error
BotInfoHandler is the handler for the botinfo command.
func CreateEmbedFieldsForCategory ¶
func CreateEmbedFieldsForCategory(category CommandCategory) (fields []discord.EmbedField, err error)
CreateEmbedFieldsForCategory creates embed fields for a command category.
func CreateHandler ¶
CreateHandler creates a new command handler for the bot.
func EightBallHandler ¶
func EightBallHandler(e *handler.CommandEvent) error
EightBallHandler is the handler for the 8ball command. It is certain. Or is it?
func HelpHandler ¶
func HelpHandler(e *handler.CommandEvent) error
HelpHandler is the handler for the help command.
func HowGayHandler ¶
func HowGayHandler(e *handler.CommandEvent) error
HowGayHandler is the handler for the howgay command. In case you still haven't figured it out, this is a very serious command. Please don't take it too seriously, love you all <3
func HugHandler ¶
func HugHandler(e *handler.CommandEvent) error
HugHandler is the handler for the hug command.
func InviteHandler ¶
func InviteHandler(e *handler.CommandEvent) error
InviteHandler is the handler for the invite command.
func KissHandler ¶
func KissHandler(e *handler.CommandEvent) error
KissHandler is the handler for the kiss command.
func PPHandler ¶
func PPHandler(e *handler.CommandEvent) error
PPHandler is the handler for the pp command. It handles a lot of pp. 'ery noice.
func PingHandler ¶
func PingHandler(e *handler.CommandEvent) error
PingHandler is the handler for the ping command.
func PlayHandler ¶
func PlayHandler(e *handler.CommandEvent) error
PlayHandler is the handler for the play command. Music? In Wavy? No way! (<- Copilot thought of that)
func ServerInfoHandler ¶
func ServerInfoHandler(e *handler.CommandEvent) error
ServerInfoHandler is the handler for the serverinfo command.
func ShipHandler ¶
func ShipHandler(e *handler.CommandEvent) error
ShipHandler is the handler for the ship command. Now kith.
func SlapHandler ¶
func SlapHandler(e *handler.CommandEvent) error
SlapHandler is the handler for the slap command.
func UserInfoHandler ¶
func UserInfoHandler(e *handler.CommandEvent) error
UserInfoHandler is the handler for the userinfo command.
Types ¶
type CommandCategory ¶
type CommandCategory struct { // Name of the category. Name string // Commands in the category. Commands []discord.ApplicationCommandCreate }
CommandCategory is a category of commands.