Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TruncateMessage ¶
func TruncateMessage(message callapi.ActionMessage, maxLength int) string
截断信息
func WaitForActionMessage ¶
WaitForActionMessage 等待特定echo值的消息或超时
func WaitForGeneralMessage ¶
func WaitForGeneralMessage(timeout time.Duration) (*callapi.ActionMessage, error)
Types ¶
type WebSocketClient ¶
func NewWebSocketClient ¶
func NewWebSocketClient(urlStr string, botID string, maxRetryAttempts int) (*WebSocketClient, error)
NewWebSocketClient 创建 WebSocketClient 实例,接受 WebSocket URL、botID 和 core.Context 指针
func (*WebSocketClient) Close ¶
func (ws *WebSocketClient) Close() error
func (*WebSocketClient) SendMessage ¶
func (client *WebSocketClient) SendMessage(message map[string]interface{}) error
发送json信息给onebot应用端
Click to show internal directories.
Click to hide internal directories.