Documentation
¶
Index ¶
- type QQChannel
- func (c *QQChannel) Send(ctx context.Context, msg bus.OutboundMessage) ([]string, error)
- func (c *QQChannel) SendMedia(ctx context.Context, msg bus.OutboundMediaMessage) ([]string, error)
- func (c *QQChannel) Start(ctx context.Context) error
- func (c *QQChannel) StartTyping(ctx context.Context, chatID string) (func(), error)
- func (c *QQChannel) Stop(ctx context.Context) error
- func (c *QQChannel) VoiceCapabilities() channels.VoiceCapabilities
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type QQChannel ¶
type QQChannel struct {
*channels.BaseChannel
// contains filtered or unexported fields
}
func NewQQChannel ¶
func NewQQChannel(bc *config.Channel, cfg *config.QQSettings, messageBus *bus.MessageBus) (*QQChannel, error)
func (*QQChannel) SendMedia ¶
SendMedia implements the channels.MediaSender interface. QQ group/C2C media sending is a two-step flow: 1. Upload media to /files using a remote URL or base64-encoded local bytes. 2. Send a msg_type=7 message using the returned file_info.
func (*QQChannel) StartTyping ¶
StartTyping implements channels.TypingCapable. It sends an InputNotify (msg_type=6) immediately and re-sends every 8 seconds. The returned stop function is idempotent and cancels the goroutine.
func (*QQChannel) VoiceCapabilities ¶
func (c *QQChannel) VoiceCapabilities() channels.VoiceCapabilities
VoiceCapabilities returns the voice capabilities of the channel.
Click to show internal directories.
Click to hide internal directories.