forked from andersfylling/disgord
-
Notifications
You must be signed in to change notification settings - Fork 0
/
voice.go
66 lines (46 loc) · 1.88 KB
/
voice.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
package resource
import . "github.com/andersfylling/snowflake"
// State Voice State structure
// https://discordapp.com/developers/docs/resources/voice#voice-state-object
type VoiceState struct {
// GuildID the guild id this voice state is for
GuildID Snowflake `json:"guild_id,omitempty"` // ? |
// ChannelID the channel id this user is connected to
ChannelID Snowflake `json:"channel_id"` // |
// UserID the user id this voice state is for
UserID Snowflake `json:"user_id"` // |
// SessionID the session id for this voice state
SessionID string `json:"session_id"` // |
// Deaf whether this user is deafened by the server
Deaf bool `json:"deaf"` // |
// Mute whether this user is muted by the server
Mute bool `json:"mute"` // |
// SelfDeaf whether this user is locally deafened
SelfDeaf bool `json:"self_deaf"` // |
// SelfMute whether this user is locally muted
SelfMute bool `json:"self_mute"` // |
// Suppress whether this user is muted by the current user
Suppress bool `json:"suppress"` // |
}
func (vst *VoiceState) Clear() {
}
// Region voice region structure
// https://discordapp.com/developers/docs/resources/voice#voice-region
type VoiceRegion struct {
// Snowflake unique Snowflake for the region
ID Snowflake `json:"id"`
// Name name of the region
Name string `json:"name"`
// SampleHostname an example hostname for the region
SampleHostname string `json:"sample_hostname"`
// SamplePort an example port for the region
SamplePort uint `json:"sample_port"`
// VIP true if this is a vip-only server
VIP bool `json:"vip"`
// Optimal true for a single server that is closest to the current user's client
Optimal bool `json:"optimal"`
// Deprecated whether this is a deprecated voice region (avoid switching to these)
Deprecated bool `json:"deprecated"`
// Custom whether this is a custom voice region (used for events/etc)
Custom bool `json:"custom"`
}