Documentation
¶
Index ¶
- type BotStatus
- type OneBotChannel
- func (c *OneBotChannel) ReactToMessage(ctx context.Context, chatID, messageID string) (func(), error)
- func (c *OneBotChannel) Send(ctx context.Context, msg bus.OutboundMessage) error
- func (c *OneBotChannel) SendMedia(ctx context.Context, msg bus.OutboundMediaMessage) error
- func (c *OneBotChannel) Start(ctx context.Context) error
- func (c *OneBotChannel) Stop(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OneBotChannel ¶
type OneBotChannel struct {
*channels.BaseChannel
// contains filtered or unexported fields
}
func NewOneBotChannel ¶
func NewOneBotChannel(cfg config.OneBotConfig, messageBus *bus.MessageBus) (*OneBotChannel, error)
func (*OneBotChannel) ReactToMessage ¶
func (c *OneBotChannel) ReactToMessage(ctx context.Context, chatID, messageID string) (func(), error)
ReactToMessage implements channels.ReactionCapable. It adds an emoji reaction (ID 289) to group messages and returns an undo function. Private messages return a no-op since reactions are only meaningful in groups.
func (*OneBotChannel) Send ¶
func (c *OneBotChannel) Send(ctx context.Context, msg bus.OutboundMessage) error
func (*OneBotChannel) SendMedia ¶
func (c *OneBotChannel) SendMedia(ctx context.Context, msg bus.OutboundMediaMessage) error
SendMedia implements the channels.MediaSender interface.
Click to show internal directories.
Click to hide internal directories.