Documentation ¶
Index ¶
- func HandleServer(server *ServerState) error
- func ServerInit(amigo cli.AmigoExecutionContext) error
- func ServerMessageHandler(server *ServerState) func(*discordgo.Session, *discordgo.MessageCreate)
- func ServerReactionAddHandler(server *ServerState) func(*discordgo.Session, *discordgo.MessageReactionAdd)
- func ServerReactionRemoveHandler(server *ServerState) func(*discordgo.Session, *discordgo.MessageReactionRemove)
- func ServerScheduledActionHandler(server *ServerState)
- type AmiBot
- type AmiCommandContext
- type AmiCommandHandler
- type AmiCommandSpec
- type MessageContext
- type ServerState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleServer ¶
func HandleServer(server *ServerState) error
Takes discord bot and creates a server session that listens to messages on the server
func ServerInit ¶
func ServerInit(amigo cli.AmigoExecutionContext) error
func ServerMessageHandler ¶
func ServerMessageHandler(server *ServerState) func(*discordgo.Session, *discordgo.MessageCreate)
func ServerReactionAddHandler ¶
func ServerReactionAddHandler(server *ServerState) func(*discordgo.Session, *discordgo.MessageReactionAdd)
func ServerReactionRemoveHandler ¶
func ServerReactionRemoveHandler(server *ServerState) func(*discordgo.Session, *discordgo.MessageReactionRemove)
func ServerScheduledActionHandler ¶
func ServerScheduledActionHandler(server *ServerState)
Types ¶
type AmiBot ¶
type AmiBot struct { ServerState *ServerState // contains filtered or unexported fields }
func InitBot ¶
func InitBot(s *ServerState) AmiBot
func (*AmiBot) HandleCommand ¶
func (ami *AmiBot) HandleCommand(command AmiCommandContext)
func (*AmiBot) Help ¶
func (ami *AmiBot) Help(msgCtx *MessageContext)
type AmiCommandContext ¶
type AmiCommandContext struct {
// contains filtered or unexported fields
}
type AmiCommandHandler ¶
type AmiCommandHandler func(server *ServerState, commandContext AmiCommandContext)
type AmiCommandSpec ¶
type AmiCommandSpec map[string]AmiCommandHandler
type MessageContext ¶
type MessageContext struct {
// contains filtered or unexported fields
}
type ServerState ¶
type ServerState struct { Session *discordgo.Session ExecutionContext cli.AmigoExecutionContext // contains filtered or unexported fields }
DiscordBot is a wrapper struct that will contain all metadata for a bot's running session
Click to show internal directories.
Click to hide internal directories.