Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChatCommandConfiguration ¶
type ChatCommandConfiguration struct {
Description string
EphemeralResponse bool
Options map[string]ChatCommandOption
}
type ChatCommandOption ¶
type ChatCommandOption struct {
Description string
Type CommandOptionType
Required bool
}
type CommandOptionType ¶
type CommandOptionType uint64
const ( CommandTypeString CommandOptionType = CommandOptionType(discordgo.ApplicationCommandOptionString) CommandTypeInt CommandOptionType = CommandOptionType(discordgo.ApplicationCommandOptionInteger) CommandTypeBool CommandOptionType = CommandOptionType(discordgo.ApplicationCommandOptionBoolean) CommandTypeFloat CommandOptionType = CommandOptionType(discordgo.ApplicationCommandOptionNumber) )
type Event ¶
type Event struct {
Name string
ID string
Location string
Completed bool
DateTime time.Time
CompleteDateTime time.Time
Description string
ImageURL string
Organizer User
}
Event represents a calendar event
type ExternalChatManager ¶
type ExternalChatModule ¶
type ExternalChatModule interface {
Initialize(ExternalChatManager)
RecieveMessage(user User, message string)
}
type Module ¶
type Module interface {
Initialize(birdbot ModuleManager) error
}
type ModuleManager ¶
type ModuleManager interface {
OnReady(func() error) error
OnNotify(func(string) error) error
// Event events
OnEventCreate(func(Event) error) error
OnEventDelete(func(Event) error) error
OnEventUpdate(func(Event) error) error
OnEventComplete(func(Event) error) error
// Actions
CreateEvent(event Event) error
Notify(message string) error
// Commands
RegisterCommand(string, ChatCommandConfiguration, func(User, map[string]any) string)
// Submodules
RegisterExternalChat(channelID string, chat ExternalChatModule) error
GetConfigPath(fileName string) string
}
ModuleManager is the primary way for a module to interact with BirdBot by listening to events and committing actions
Click to show internal directories.
Click to hide internal directories.