Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Commands = []*discordgo.ApplicationCommand{ { Name: "inspire", Description: "Summons Inspiration", }, } CommandHandlers = map[string]func(s *discordgo.Session, i *discordgo.InteractionCreate){ "inspire": func(s *discordgo.Session, i *discordgo.InteractionCreate) { bttp := util.NewBloopyClient() s.InteractionRespond(i.Interaction, &discordgo.InteractionResponse{ Type: discordgo.InteractionResponseChannelMessageWithSource, Data: &discordgo.InteractionResponseData{ Embeds: []*discordgo.MessageEmbed{ { Author: &discordgo.MessageEmbedAuthor{}, Image: &discordgo.MessageEmbedImage{ URL: bttp.Inspiro_api.GetInspiro(), }, }, }, }, }) }, } )
Functions ¶
func DirectMessageCreate ¶
func DirectMessageCreate(s *discordgo.Session, m *discordgo.MessageCreate)
Listens for target command in channels Responds in DM to user
func IsNotDMCommand ¶
Temporary method to check if command is relevant
func MessageCreate ¶
func MessageCreate(s *discordgo.Session, m *discordgo.MessageCreate)
This function will be called (due to AddHandler above) every time a new message is created on any channel that the authenticated bot has access to.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.