Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DiscordBot ¶
type DiscordBot interface { User() User Close() OnMessage(MessageHandler) SendMessage(channelID string, content string) error }
/ Represents a Discord bot user.
func New ¶
func New(apiKey string, ui UserInterface) (DiscordBot, error)
/ Creates a new DiscordBot using the specific UserInterface
type MessageHandler ¶
type MessageHandler func(DiscordBot, *Message)
/ Adapter for message handler fns.
type UserInterface ¶
type UserInterface int
/ Specifies how the bot interacts with users. / / Terminal: Messages are sent and recieved on stdout/stdin. / Client: Messages are sent and recieved through the discord client.
const ( Terminal UserInterface = iota Client )
Click to show internal directories.
Click to hide internal directories.