opcode

package
v0.27.3 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2021 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OpCode

type OpCode uint
const (
	EventReadyResumed OpCode = 102 // Discord use 0 here, but that is a shared op code
	None              OpCode = math.MaxUint16
)

custom op codes used by Disgord internally

const (
	EventDiscordEvent OpCode = iota
	EventHeartbeat
	EventIdentify
	EventStatusUpdate
	EventVoiceStateUpdate
	EventVoiceServerPing
	EventResume
	EventReconnect
	EventRequestGuildMembers
	EventInvalidSession
	EventHello
	EventHeartbeatAck
)

operation codes for the event client

const (
	VoiceIdentify OpCode = iota
	VoiceSelectProtocol
	VoiceReady
	VoiceHeartbeat
	VoiceSessionDescription
	VoiceSpeaking
	VoiceHeartbeatAck
	VoiceResume
	VoiceHello
	VoiceResumed

	VoiceClientDisconnect
)

operation codes for the voice client

func ExtractFrom

func ExtractFrom(holder OperationCodeHolder) OpCode

ExtractFrom extract the operation code

type OperationCodeHolder

type OperationCodeHolder interface {
	GetOperationCode() OpCode
}

OperationCodeHolder Used on objects that holds a operation code

Jump to

Keyboard shortcuts

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