Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Command = &commands.YAGCommand{ CmdCategory: commands.CategoryFun, Name: "WouldYouRather", Aliases: []string{"wyr"}, Description: "Get presented with 2 options.", ArgSwitches: []*dcmd.ArgDef{ {Name: "raw", Help: "Raw output"}, }, RunFunc: func(data *dcmd.Data) (interface{}, error) { q1, q2, err := wouldYouRather() if err != nil { return nil, err } wyrDescription := fmt.Sprintf("**EITHER...**\n🇦 %s\n\n **OR...**\n🇧 %s", q1, q2) if data.Switches["raw"].Value != nil && data.Switches["raw"].Value.(bool) { return wyrDescription, nil } embed := &discordgo.MessageEmbed{ Description: wyrDescription, Author: &discordgo.MessageEmbedAuthor{ Name: "Would you rather...", URL: "https://either.io/", }, Footer: &discordgo.MessageEmbedFooter{ Text: fmt.Sprintf("Requested by: %s#%s", data.Author.Username, data.Author.Discriminator), }, Color: rand.Intn(16777215), } msg, err := common.BotSession.ChannelMessageSendEmbed(data.ChannelID, embed) if err != nil { return nil, err } common.BotSession.MessageReactionAdd(data.ChannelID, msg.ID, "🇦") err = common.BotSession.MessageReactionAdd(data.ChannelID, msg.ID, "🇧") if err != nil { return nil, err } return nil, nil }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.