Documentation ¶
Index ¶
- Constants
- type BaseEvent
- type ChallengeData
- type ChallengeEventSignal
- type ChannelAddUserEvent
- type ChannelAddUserEventFrame
- type ChannelAddUserExtra
- type Emoji
- type EventInterface
- type Frame
- type FrameMap
- type HelloData
- type HelloSignal
- type KMarkdown
- type KMarkdownExtra
- type MessageKMarkdownEvent
- type MessageTextEvent
- type MessageTextEventFrame
- type MessageTextExtra
- type PingSignal
- type PongSignal
- type ReconnectData
- type ReconnectSignal
- type ResumeACKData
- type ResumeACKSignal
- type ResumeSignal
- type TagInfo
- type User
Constants ¶
View Source
const ( SIG_EVENT int32 = 0 SIG_HELLO int32 = 1 SIG_PING int32 = 2 SIG_PONG int32 = 3 SIG_RESUME int32 = 4 SIG_RECONNECT int32 = 5 SIG_RESUME_ACK int32 = 6 )
View Source
const ( EventTextMsgType = 1 EventPicMsgType = 2 EventVideoMsgType = 3 EventFileMsgType = 4 EventVoiceMsgType = 8 EventKMDMsgType = 9 EVentCardType = 10 EventSystemMsgType = 255 )
1:文字消息, 2:图片消息,3:视频消息,4:文件消息, 8:音频消息,9:KMarkdown,10:card 消息,255:系统消息, 其它的暂未开放
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseEvent ¶
type BaseEvent struct { ChannelType string `json:"channel_type"` Type int `json:"type"` TargetId string `json:"target_id"` AuthorId string `json:"author_id"` Content string `json:"content"` MsgId string `json:"msg_id"` MsgTimestamp int64 `json:"msg_timestamp"` Nonce string `json:"nonce"` SerialNumber int64 `json:"sn"` }
type ChallengeData ¶
type ChallengeEventSignal ¶
type ChallengeEventSignal struct { Frame ChallengeData `json:"d"` }
func NewChallengeEventSignal ¶
func NewChallengeEventSignal(challenge, verifyToken string) *ChallengeEventSignal
type ChannelAddUserEvent ¶
type ChannelAddUserEvent struct { BaseEvent // contains filtered or unexported fields }
type ChannelAddUserEventFrame ¶
type ChannelAddUserEventFrame struct { Frame ChannelAddUserEvent }
type ChannelAddUserExtra ¶
type EventInterface ¶
type EventInterface interface {
GetType() int
}
type FrameMap ¶
type FrameMap struct { SignalType int32 `json:"s"` Data map[string]interface{} `json:"d"` SerialNumber int64 `json:"sn"` }
func NewPingFrame ¶
func ParseFrameMapByData ¶
type HelloSignal ¶
type KMarkdownExtra ¶
type KMarkdownExtra struct { Type int `json:"type"` GuildID string `json:"guild_id"` ChannelName string `json:"channel_name"` Mention []string `json:"mention"` MentionAll bool `json:"mention_all"` MentionRoles []int `json:"mention_roles"` MentionHere bool `json:"mention_here"` Code string `json:"code"` Author User `json:"author"` KMarkdown KMarkdown `json:"kmarkdown"` }
type MessageKMarkdownEvent ¶
type MessageKMarkdownEvent struct { BaseEvent KMarkdownExtra `json:"extra"'` }
type MessageTextEvent ¶
type MessageTextEvent struct { BaseEvent Extra *MessageTextExtra `json:"extra"` }
type MessageTextEventFrame ¶
type MessageTextEventFrame struct { Frame // contains filtered or unexported fields }
type MessageTextExtra ¶
type MessageTextExtra struct { Type int `json:"type"` GuildId string `json:"guild_id"` ChannelName string `json:"channel_name"` Mention []string `json:"mention"` MentionAll bool `json:"mention_all"` MentionRoles []string `json:"mention_roles"` MentionHere bool `json:"mention_here"` Author User `json:"author"` Code string `json:"code"` }
type PingSignal ¶
type PongSignal ¶
type PongSignal struct {
Frame
}
type ReconnectData ¶
type ReconnectSignal ¶
type ReconnectSignal struct { Frame Data *ReconnectData `json:"d"` }
type ResumeACKData ¶
type ResumeACKData struct {
SessionId string `json:"session_id"`
}
type ResumeACKSignal ¶
type ResumeACKSignal struct { Frame Data *ResumeACKData `json:"d"` }
type ResumeSignal ¶
type User ¶
type User struct { ID string `json:"id"` Username string `json:"username"` IdentifyNum string `json:"identify_num"` Online bool `json:"online"` Avatar string `json:"avatar"` VipAvatar string `json:"vip_avatar"` Bot bool `json:"bot"` Status int `json:"status"` MobileVerified bool `json:"mobile_verified"` Nickname string `json:"nickname"` Roles []int `json:"roles"` }
Click to show internal directories.
Click to hide internal directories.