Documentation ¶
Overview ¶
处理收到的信息事件
处理收到的信息事件
处理收到的信息事件
Index ¶
- func BroadcastMessageToAll(message map[string]interface{}, Wsclient []*wsclient.WebSocketClient) error
- func FoxTimestamp() int64
- func PostMessageToUrls(message map[string]interface{})
- func PrintStructWithFieldNames(v interface{})
- func ProcessC2CMessage(data *core.Context, Wsclient []*wsclient.WebSocketClient) (echoreturn string, err error)
- func ProcessGroupMessage(data *core.Context, Wsclient []*wsclient.WebSocketClient) (echoreturn string, err error)
- type OnebotChannelMessage
- type OnebotGroupMessage
- type OnebotInteractionNotice
- type OnebotPrivateMessage
- type PrivateSender
- type Sender
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BroadcastMessageToAll ¶
func BroadcastMessageToAll(message map[string]interface{}, Wsclient []*wsclient.WebSocketClient) error
方便快捷的发信息函数
func FoxTimestamp ¶
func FoxTimestamp() int64
func ProcessC2CMessage ¶
func ProcessC2CMessage(data *core.Context, Wsclient []*wsclient.WebSocketClient) (echoreturn string, err error)
ProcessC2CMessage 处理C2C消息 群私聊
func ProcessGroupMessage ¶
func ProcessGroupMessage(data *core.Context, Wsclient []*wsclient.WebSocketClient) (echoreturn string, err error)
ProcessGroupMessage 处理群组消息
Types ¶
type OnebotChannelMessage ¶
type OnebotChannelMessage struct { ChannelID string `json:"channel_id"` GuildID string `json:"guild_id"` Message interface{} `json:"message"` MessageID string `json:"message_id"` MessageType string `json:"message_type"` PostType string `json:"post_type"` SelfID int64 `json:"self_id"` SelfTinyID string `json:"self_tiny_id"` Sender Sender `json:"sender"` SubType string `json:"sub_type"` Time int64 `json:"time"` Avatar string `json:"avatar,omitempty"` UserID int64 `json:"user_id"` RawMessage string `json:"raw_message"` Echo string `json:"echo,omitempty"` }
频道信息事件
type OnebotGroupMessage ¶
type OnebotGroupMessage struct { RawMessage string `json:"raw_message"` MessageID int `json:"message_id"` GroupID int64 `json:"group_id"` // Can be either string or int depending on p.Settings.CompleteFields MessageType string `json:"message_type"` PostType string `json:"post_type"` SelfID int64 `json:"self_id"` // Can be either string or int Sender Sender `json:"sender"` SubType string `json:"sub_type"` Time int64 `json:"time"` Avatar string `json:"avatar,omitempty"` Echo string `json:"echo,omitempty"` Message interface{} `json:"message"` // For array format MessageSeq int `json:"message_seq"` Font int `json:"font"` UserID int64 `json:"user_id"` RealMessageType string `json:"real_message_type,omitempty"` //当前信息的真实类型 group group_private guild guild_private IsBindedGroupId bool `json:"is_binded_group_id,omitempty"` //当前群号是否是binded后的 IsBindedUserId bool `json:"is_binded_user_id,omitempty"` //当前用户号号是否是binded后的 }
群信息事件
type OnebotInteractionNotice ¶
type OnebotInteractionNotice struct { GroupID int64 `json:"group_id,omitempty"` NoticeType string `json:"notice_type,omitempty"` PostType string `json:"post_type,omitempty"` SelfID int64 `json:"self_id,omitempty"` SubType string `json:"sub_type,omitempty"` Time int64 `json:"time,omitempty"` UserID int64 `json:"user_id,omitempty"` Data *dto.WSInteractionData `json:"data,omitempty"` }
onebotv11标准扩展
type OnebotPrivateMessage ¶
type OnebotPrivateMessage struct { RawMessage string `json:"raw_message"` MessageID int `json:"message_id"` // Can be either string or int depending on logic MessageType string `json:"message_type"` PostType string `json:"post_type"` SelfID int64 `json:"self_id"` // Can be either string or int depending on logic Sender PrivateSender `json:"sender"` SubType string `json:"sub_type"` Time int64 `json:"time"` Avatar string `json:"avatar,omitempty"` Echo string `json:"echo,omitempty"` Message interface{} `json:"message"` // For array format MessageSeq int `json:"message_seq"` // Optional field Font int `json:"font"` // Optional field UserID int64 `json:"user_id"` // Can be either string or int depending on logic RealMessageType string `json:"real_message_type,omitempty"` //当前信息的真实类型 group group_private guild guild_private IsBindedUserId bool `json:"is_binded_user_id,omitempty"` //当前用户号号是否是binded后的 }
私聊信息事件
type PrivateSender ¶
type Sender ¶
type Sender struct { Nickname string `json:"nickname"` TinyID string `json:"tiny_id"` UserID int64 `json:"user_id"` Role string `json:"role,omitempty"` Card string `json:"card,omitempty"` Sex string `json:"sex,omitempty"` Age int32 `json:"age,omitempty"` Area string `json:"area,omitempty"` Level string `json:"level,omitempty"` Title string `json:"title,omitempty"` }
Click to show internal directories.
Click to hide internal directories.