Documentation ¶
Index ¶
- func CreditsEmbed(botName, url string, color int, usesMutantStandard bool, ...) *discordgo.MessageEmbed
- func ImageEmbed(title string, url string, image string, footer string, color int) *discordgo.MessageEmbed
- func TextEmbed(title, name, text, url, footer string, color int) *discordgo.MessageEmbed
- type Bot
- func (b *Bot) AddCommand(key string, value func(Bot, *discordgo.MessageCreate, []string), prefix bool)
- func (b Bot) MessageCreate(session *discordgo.Session, message *discordgo.MessageCreate)
- func (b *Bot) New(name, prefix, token string, color int) error
- func (b *Bot) ReadyEvent(session *discordgo.Session, rdy *discordgo.Ready)
- func (b Bot) String() string
- type Contributor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreditsEmbed ¶
func CreditsEmbed(botName, url string, color int, usesMutantStandard bool, artists ...Contributor) *discordgo.MessageEmbed
CreditsEmbed is used for accreditation of all people involved in making the bot possible. or at least, most of them.
func ImageEmbed ¶
func ImageEmbed(title string, url string, image string, footer string, color int) *discordgo.MessageEmbed
ImageEmbed returns an embeded image.
Types ¶
type Bot ¶
type Bot struct { Color int Name string Prefix string Mentioned func(Bot, *discordgo.MessageCreate, []string) Confused func(Bot, *discordgo.MessageCreate, []string) Self *discordgo.User Session *discordgo.Session // contains filtered or unexported fields }
Bot is a representation of a discord chatbot.
func (*Bot) AddCommand ¶
func (b *Bot) AddCommand(key string, value func( Bot, *discordgo.MessageCreate, []string), prefix bool)
AddCommand adds a Command to a Bot.
func (Bot) MessageCreate ¶
func (b Bot) MessageCreate(session *discordgo.Session, message *discordgo.MessageCreate)
MessageCreate occurs every time the bot recieves a message. this is the heart and soul of your discord bot, MessageCreate is run every time your bot can read a message in a channel. I
func (*Bot) New ¶
New initializes a new Bot.
- Name is the name of your bot.
- Prefix is what must be prepended to a command to inform your bot that this message is a command.
- Token is your bot token.
- Color designates what color an embed should have by default.
func (*Bot) ReadyEvent ¶
ReadyEvent occurs when the bot recieves a ready event.