Documentation
¶
Index ¶
- type Command
- type DGPSession
- type MessageCreateData
- func (msg *MessageCreateData) Send(message string) (*discordgo.Message, error)
- func (msg *MessageCreateData) SendComplex(content *discordgo.MessageSend) (*discordgo.Message, error)
- func (msg *MessageCreateData) SendEmbed(embed *discordgo.MessageEmbed) (*discordgo.Message, error)
- func (msg *MessageCreateData) SendReply(content string) (*discordgo.Message, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command struct {
Name string
Aliases []string
IgnoreCaseSensitive bool
IgnoreRequirePrefix bool
HandlerFunc func(*MessageCreateData)
}
type DGPSession ¶
type DGPSession struct {
DGSession *discordgo.Session
CommandsCaseSensitive bool
RequirePrefix bool // Whether a message should be checked for CommandPrefix
CommandPrefix string // ignored if RequirePrefix false
Commands []*Command
}
func (*DGPSession) Close ¶
func (s *DGPSession) Close() error
func (*DGPSession) Notify ¶ added in v0.1.4
func (s *DGPSession) Notify(a ...interface{})
Notify wraps the channel notify code necessary for the bot into a method. Prints a using fmt.Println
func (*DGPSession) Open ¶
func (s *DGPSession) Open() error
Open sets intents to IntentsAllWithoutPrivileged, adds the command message handler, and opens the session
func (*DGPSession) RegisterCommand ¶
func (s *DGPSession) RegisterCommand(name string, aliases []string, ignoreCaseSensitive bool, ignoreRequirePrefix bool, handler func(*MessageCreateData)) (cmd *Command, e error)
type MessageCreateData ¶
type MessageCreateData struct {
DGPSession *DGPSession
DGSession *discordgo.Session
Message *discordgo.MessageCreate
Command string
Args []string
Content string
ChannelID string
AuthorID string
GuildID string
}
func (*MessageCreateData) Send ¶
func (msg *MessageCreateData) Send(message string) (*discordgo.Message, error)
func (*MessageCreateData) SendComplex ¶
func (msg *MessageCreateData) SendComplex(content *discordgo.MessageSend) (*discordgo.Message, error)
func (*MessageCreateData) SendEmbed ¶
func (msg *MessageCreateData) SendEmbed(embed *discordgo.MessageEmbed) (*discordgo.Message, error)
Click to show internal directories.
Click to hide internal directories.