Documentation ¶
Index ¶
- type Bot
- func (bot *Bot) GetUserRolesID(guildid string, userid string) *[]string
- func (b *Bot) InitRegex()
- func (bot *Bot) OnMemberJoin(s *discordgo.Session, m *discordgo.GuildMemberAdd)
- func (bot *Bot) OnMemberRemove(s *discordgo.Session, m *discordgo.GuildMemberRemove)
- func (bot *Bot) OnMessageCreate(s *discordgo.Session, mc *discordgo.MessageCreate)
- func (bot *Bot) OnMessageDelete(s *discordgo.Session, md *discordgo.MessageDelete)
- func (bot *Bot) OnMessageUpdate(s *discordgo.Session, m *discordgo.MessageUpdate)
- func (bot *Bot) OnReactionAdd(s *discordgo.Session, ra *discordgo.MessageReactionAdd)
- func (bot *Bot) OnReady(s *discordgo.Session, r *discordgo.Ready)
- func (bot *Bot) Start()
- type HandlerFunc
- type Mux
- type Regex
- type Route
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bot ¶
type Bot struct { Session *discordgo.Session Token string `json:"token"` Version string Router *Mux Regex *Regex }
func GetInstance ¶
func GetInstance() *Bot
func (*Bot) GetUserRolesID ¶
func (*Bot) OnMemberJoin ¶
func (bot *Bot) OnMemberJoin(s *discordgo.Session, m *discordgo.GuildMemberAdd)
func (*Bot) OnMemberRemove ¶
func (bot *Bot) OnMemberRemove(s *discordgo.Session, m *discordgo.GuildMemberRemove)
func (*Bot) OnMessageCreate ¶
func (bot *Bot) OnMessageCreate(s *discordgo.Session, mc *discordgo.MessageCreate)
func (*Bot) OnMessageDelete ¶
func (bot *Bot) OnMessageDelete(s *discordgo.Session, md *discordgo.MessageDelete)
func (*Bot) OnMessageUpdate ¶
func (bot *Bot) OnMessageUpdate(s *discordgo.Session, m *discordgo.MessageUpdate)
func (*Bot) OnReactionAdd ¶
func (bot *Bot) OnReactionAdd(s *discordgo.Session, ra *discordgo.MessageReactionAdd)
type HandlerFunc ¶
type HandlerFunc func(*discordgo.Session, *structs.Config, *discordgo.Message, *discordgo.Context, []string)
HandlerFunc is the function signature required for a message route handler.
type Mux ¶
Mux is the main struct for all mux methods.
func (*Mux) InitRouter ¶
func (r *Mux) InitRouter()
type Route ¶
type Route struct { Pattern string // match pattern that should trigger this route handler Description string // short description of this route Help string // detailed help string for this route Run HandlerFunc // route handler function to call }
Route holds information about a specific message route handler
Click to show internal directories.
Click to hide internal directories.