/
stage_instance.go
39 lines (31 loc) · 1.11 KB
/
stage_instance.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
package discord
import (
"time"
"github.com/disgoorg/snowflake/v2"
)
type StagePrivacyLevel int
const (
StagePrivacyLevelPublic StagePrivacyLevel = iota + 1
StagePrivacyLevelGuildOnly
)
type StageInstance struct {
ID snowflake.ID `json:"id"`
GuildID snowflake.ID `json:"guild_id"`
ChannelID snowflake.ID `json:"channel_id"`
Topic string `json:"topic"`
PrivacyLevel StagePrivacyLevel `json:"privacy_level"`
DiscoverableDisabled bool `json:"discoverable_disabled"`
}
func (e StageInstance) CreatedAt() time.Time {
return e.ID.Time()
}
type StageInstanceCreate struct {
ChannelID snowflake.ID `json:"channel_id"`
Topic string `json:"topic,omitempty"`
PrivacyLevel StagePrivacyLevel `json:"privacy_level,omitempty"`
SendStartNotification bool `json:"send_start_notification,omitempty"`
}
type StageInstanceUpdate struct {
Topic *string `json:"topic,omitempty"`
PrivacyLevel *StagePrivacyLevel `json:"privacy_level,omitempty"`
}