Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( SlashCommands = []*discordgo.ApplicationCommand{ { Name: "lemokon", Description: "Configure LemoKon (Discord Kon)", Options: []*discordgo.ApplicationCommandOption{ { Type: discordgo.ApplicationCommandOptionSubCommand, Name: "summon", Description: "Register this channel as the destination of bot messages", }, }, }, } CommandsHandler = func(s *discordgo.Session, i *discordgo.InteractionCreate) { switch i.Data.Name { case "lemokon": switch i.Data.Options[0].Name { case "summon": if err := Options.SetChannelID(i.ChannelID); err != nil { respond(s, i, "Failed to set this channel as the destination of bot messages.") fmt.Printf("Failed to update options.ChannelID: %s\n", err) return } respond(s, i, "Successfully configured this channel as the destination of bot messages.") return } } respond(s, i, "Unknown command received.") } )
View Source
var (
Options = &DiscordKonOptions{}
)
Functions ¶
Types ¶
type DiscordKonOptions ¶
func (*DiscordKonOptions) Load ¶
func (o *DiscordKonOptions) Load() error
func (*DiscordKonOptions) SetChannelID ¶
func (o *DiscordKonOptions) SetChannelID(channelID string) error
func (DiscordKonOptions) TableName ¶
func (DiscordKonOptions) TableName() string
type DiscordRecording ¶
Click to show internal directories.
Click to hide internal directories.