Documentation ¶
Overview ¶
Package discordance allows connection to discord and registration of various handlers for a bot interface.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
Connection to a discord server.
func Connect ¶
func Connect(settings config.Discord) (*Connection, error)
Connect to discord using the given config.
func (*Connection) Commands ¶
func (c *Connection) Commands(server string, commands ...*command.Definition)
Commands to register on the given server.
func (*Connection) Listen ¶
func (c *Connection) Listen()
Listen for events. Listen blocks until SIGINT is received.
func (*Connection) Message ¶
func (c *Connection) Message(handlers ...message.Handler)
Message handlers to register on the connection.
func (*Connection) Unregister ¶
func (c *Connection) Unregister(server string)
Unregister commands on this server.
Directories ¶
Path | Synopsis |
---|---|
Package command defines application commands and handlers for the bot.
|
Package command defines application commands and handlers for the bot. |
Package config provides goconfigure compatible configuration blocks for a discordance bot.
|
Package config provides goconfigure compatible configuration blocks for a discordance bot. |
Package message handles replies and message events.
|
Package message handles replies and message events. |
Package snowflake provides functions for acting on Discord snowflakes.
|
Package snowflake provides functions for acting on Discord snowflakes. |
Click to show internal directories.
Click to hide internal directories.