discord

package
v0.0.0-...-b260e94 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 27, 2024 License: BSD-3-Clause Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel struct {
	ID      int64
	GuildID int64
	Raw     []byte
}

type Encoding

type Encoding interface {
	Name() string

	DecodeHello(buf []byte) (int, string, error)
	DecodeReady(buf []byte) (guilds map[int64][]byte, version int, sessionID string, resumeGatewayURL string, _ error)

	DecodeT(buf []byte) (*Event, error)

	DecodeChannel(buf []byte) (*Channel, error)
	DecodeVoiceState(buf []byte) (*VoiceState, error)

	DecodeThread(buf []byte) (*Thread, error)

	DecodeGuildCreate(buf []byte) (*GuildCreate, error)
	DecodeGuildBan(buf []byte) (*GuildBan, error)

	DecodeMemberChunk(buf []byte) (*MemberChunk, error)
	DecodeMember(buf []byte) (*Member, error)

	DecodePresence(buf []byte) (*Presence, error)

	DecodeMessage(buf []byte) (*Message, error)
	DecodeMessageReaction(buf []byte) (*MessageReaction, error)
	DecodeMessageReactionRemoveAll(buf []byte) (*MessageReactionRemoveAll, error)

	DecodeRole(buf []byte) (*Role, error)
	DecodeRoleDelete(buf []byte) (*RoleDelete, error)

	DecodeGuildEmojisUpdate(buf []byte) (*GuildEmojisUpdate, error)

	Write(obj interface{}) ([]byte, error)
}

type Event

type Event struct {
	D  []byte
	Op int
	S  int64
	T  string
}

type GuildBan

type GuildBan struct {
	UserID  int64
	GuildID int64
	Raw     []byte
}

type GuildCreate

type GuildCreate struct {
	ID          int64
	Raw         []byte
	MemberCount int64
	Channels    map[int64][]byte
	Threads     map[int64][]byte
	Emojis      map[int64][]byte
	Members     map[int64][]byte
	Presences   map[int64][]byte
	Roles       map[int64][]byte
	VoiceStates map[int64][]byte
}

type GuildEmojisUpdate

type GuildEmojisUpdate struct {
	GuildID int64
	Emojis  map[int64][]byte
}

type Member

type Member struct {
	ID      int64
	GuildID int64
	Raw     []byte
}

type MemberChunk

type MemberChunk struct {
	GuildID int64
	Members map[int64][]byte
}

type Message

type Message struct {
	ID        int64
	ChannelID int64
	Raw       []byte
}

type MessageReaction

type MessageReaction struct {
	MessageID int64
	ChannelID int64
	UserID    int64
	Name      interface{}
	Raw       []byte
}

type MessageReactionRemoveAll

type MessageReactionRemoveAll struct {
	MessageID int64
	ChannelID int64
	UserID    int64
}

type Presence

type Presence struct {
	ID      int64
	GuildID int64
	Raw     []byte
}

type Role

type Role struct {
	ID      int64
	GuildID int64
	Raw     []byte
}

type RoleDelete

type RoleDelete struct {
	ID      int64
	GuildID int64
}

type Thread

type Thread struct {
	ID       int64
	OwnerID  int64 // user who started the thread
	ParentID int64
	GuildID  int64
	Raw      []byte
}

type VoiceState

type VoiceState struct {
	UserID  int64
	GuildID int64
	Raw     []byte
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL