Documentation
¶
Overview ¶
Package discord provides a Discord bot interface for Chronos agents.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bot ¶
type Bot struct {
// contains filtered or unexported fields
}
Bot is a Discord bot that listens for messages and routes them to an agent.
func New ¶
func New(token string, handler MessageHandler) *Bot
New creates a new Discord bot. token is the Discord Bot token. handler is called for each incoming message.
func (*Bot) HandleInteraction ¶
func (b *Bot) HandleInteraction(w http.ResponseWriter, r *http.Request)
HandleInteraction processes Discord Gateway interaction events. This is designed to be called from a webhook handler.
func (*Bot) SendMessage ¶
SendMessage sends a message to a Discord channel.
Click to show internal directories.
Click to hide internal directories.