Documentation
¶
Index ¶
- type DiscordChannel
- func (c *DiscordChannel) EditMessage(ctx context.Context, chatID string, messageID string, content string) error
- func (c *DiscordChannel) Send(ctx context.Context, msg bus.OutboundMessage) error
- func (c *DiscordChannel) SendMedia(ctx context.Context, msg bus.OutboundMediaMessage) error
- func (c *DiscordChannel) SendPlaceholder(ctx context.Context, chatID string) (string, error)
- func (c *DiscordChannel) Start(ctx context.Context) error
- func (c *DiscordChannel) StartTyping(ctx context.Context, chatID string) (func(), error)
- func (c *DiscordChannel) Stop(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DiscordChannel ¶
type DiscordChannel struct {
*channels.BaseChannel
// contains filtered or unexported fields
}
func NewDiscordChannel ¶
func NewDiscordChannel(cfg config.DiscordConfig, bus *bus.MessageBus) (*DiscordChannel, error)
func (*DiscordChannel) EditMessage ¶
func (c *DiscordChannel) EditMessage(ctx context.Context, chatID string, messageID string, content string) error
EditMessage implements channels.MessageEditor.
func (*DiscordChannel) Send ¶
func (c *DiscordChannel) Send(ctx context.Context, msg bus.OutboundMessage) error
func (*DiscordChannel) SendMedia ¶
func (c *DiscordChannel) SendMedia(ctx context.Context, msg bus.OutboundMediaMessage) error
SendMedia implements the channels.MediaSender interface.
func (*DiscordChannel) SendPlaceholder ¶
SendPlaceholder implements channels.PlaceholderCapable. It sends a placeholder message that will later be edited to the actual response via EditMessage (channels.MessageEditor).
func (*DiscordChannel) StartTyping ¶
func (c *DiscordChannel) StartTyping(ctx context.Context, chatID string) (func(), error)
StartTyping implements channels.TypingCapable. It starts a continuous typing indicator and returns an idempotent stop function.
Click to show internal directories.
Click to hide internal directories.