Documentation ¶
Index ¶
- func ContentEscape(text string) string
- func ContentUnescape(str string) string
- type Argv
- type Button
- type Channel
- type ChannelType
- type Command
- type CommandDeclaration
- type Dict
- type Element
- type Event
- type EventName
- type GatewayBody
- type GatewayPayloadStructure
- type GatewayPayloadStructure2
- type Guild
- type GuildMember
- type GuildRole
- type Login
- type Message
- type Opcode
- type ReadyState
- type ScApiMsgPayload
- type Status
- type User
- type WebSocket
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContentEscape ¶
func ContentUnescape ¶
Types ¶
type Channel ¶
type Channel struct { ID string `json:"id"` Type ChannelType `json:"type"` Name string `json:"name"` ParentID string `json:"parent_id" gorm:"null"` }
type ChannelType ¶
type ChannelType int
const ( TextChannelType ChannelType = iota VoiceChannelType CategoryChannelType DirectChannelType )
type Command ¶
type Command struct { Name string Description map[string]string Arguments []CommandDeclaration Options []CommandDeclaration Children []Command }
type CommandDeclaration ¶
type Element ¶
type Element struct { // KElement bool `json:"kElement"` Type string `json:"type"` Attrs Dict `json:"attrs"` Children []*Element `json:"children"` }
func ElementParse ¶
func FromCQCode ¶
type Event ¶
type Event struct { ID any `json:"id"` Type EventName `json:"type"` SelfID string `json:"selfID"` Platform string `json:"platform"` Timestamp uint64 `json:"timestamp"` Argv *Argv `json:"argv"` Channel *Channel `json:"channel"` Guild *Guild `json:"guild"` Login *Login `json:"login"` Member *GuildMember `json:"member"` Message *Message `json:"message"` Operator *User `json:"operator"` Role *GuildRole `json:"role"` User *User `json:"user"` Button *Button `json:"button"` }
type EventName ¶
type EventName string
const ( EventGenresAdded EventName = "genres-added" EventGenresDeleted EventName = "genres-deleted" EventMessage EventName = "message" EventMessageCreated EventName = "message-created" EventMessageDeleted EventName = "message-deleted" EventMessageUpdated EventName = "message-updated" EventMessagePinned EventName = "message-pinned" EventMessageUnpinned EventName = "message-unpinned" EventInteractionCommand EventName = "interaction/command" EventReactionAdded EventName = "reaction-added" EventReactionDeleted EventName = "reaction-deleted" EventReactionDeletedOne EventName = "reaction-deleted/one" EventReactionDeletedAll EventName = "reaction-deleted/all" EventReactionDeletedEmoji EventName = "reaction-deleted/emoji" EventSend EventName = "send" EventFriendRequest EventName = "friend-request" EventGuildRequest EventName = "guild-request" EventGuildMemberRequest EventName = "guild-member-request" )
type GatewayBody ¶
type GatewayPayloadStructure ¶
type GatewayPayloadStructure struct { Op Opcode `json:"op"` Body interface{} `json:"body"` }
type GatewayPayloadStructure2 ¶
type GatewayPayloadStructure2 struct { Op *Opcode `json:"op"` Body interface{} `json:"body"` }
type GuildMember ¶
type Message ¶
type Message struct { ID string `json:"id"` MessageID string // Deprecated Channel *Channel `json:"channel"` Guild *Guild `json:"guild"` User *User `json:"user"` Member *GuildMember `json:"member"` Content string `json:"content"` Elements []*Element `json:"elements"` Timestamp int64 `json:"timestamp"` Quote *Message `json:"quote"` CreatedAt int64 `json:"createdAt"` UpdatedAt int64 `json:"updatedAt"` }
type ReadyState ¶
type ReadyState int
const ( WebSocketConnecting ReadyState = iota WebSocketOpen WebSocketClosing WebSocketClosed )
type ScApiMsgPayload ¶
Click to show internal directories.
Click to hide internal directories.