mirror of
https://github.com/diamondburned/arikawa.git
synced 2024-11-27 09:12:53 +00:00
discord: Add timeouts (#299)
This commit is contained in:
parent
c2382028df
commit
bc8a2b0cae
|
@ -168,6 +168,11 @@ type ModifyMemberData struct {
|
|||
// Requires MOVE_MEMBER
|
||||
VoiceChannel discord.ChannelID `json:"channel_id,omitempty"`
|
||||
|
||||
// CommunicationDisabledUntil specifies when the user's timeout will expire.
|
||||
//
|
||||
// Requires MODERATE_MEMBERS
|
||||
CommunicationDisabledUntil *discord.Timestamp `json:"communication_disabled_until,omitempty"`
|
||||
|
||||
AuditLogReason `json:"-"`
|
||||
}
|
||||
|
||||
|
|
|
@ -335,6 +335,8 @@ type Member struct {
|
|||
Joined Timestamp `json:"joined_at"`
|
||||
// BoostedSince specifies when the user started boosting the guild.
|
||||
BoostedSince Timestamp `json:"premium_since,omitempty"`
|
||||
// CommunicationDisabledUntil specifies when the user's timeout will expire.
|
||||
CommunicationDisabledUntil Timestamp `json:"communication_disabled_until"`
|
||||
|
||||
// Deaf specifies whether the user is deafened in voice channels.
|
||||
Deaf bool `json:"deaf"`
|
||||
|
|
|
@ -88,6 +88,8 @@ const (
|
|||
// Allows for launching activities (applications with the EMBEDDED flag)
|
||||
// in a voice channel
|
||||
PermissionStartEmbeddedActivities
|
||||
// Allows for timing out users
|
||||
PermissionModerateMembers
|
||||
|
||||
PermissionAllText = 0 |
|
||||
PermissionViewChannel |
|
||||
|
|
|
@ -299,11 +299,12 @@ type GuildMemberRemoveEvent struct {
|
|||
//
|
||||
// https://discord.com/developers/docs/topics/gateway#guilds
|
||||
type GuildMemberUpdateEvent struct {
|
||||
GuildID discord.GuildID `json:"guild_id"`
|
||||
RoleIDs []discord.RoleID `json:"roles"`
|
||||
User discord.User `json:"user"`
|
||||
Nick string `json:"nick"`
|
||||
Avatar discord.Hash `json:"avatar"`
|
||||
GuildID discord.GuildID `json:"guild_id"`
|
||||
RoleIDs []discord.RoleID `json:"roles"`
|
||||
User discord.User `json:"user"`
|
||||
Nick string `json:"nick"`
|
||||
Avatar discord.Hash `json:"avatar"`
|
||||
CommunicationDisabledUntil discord.Timestamp `json:"communication_disabled_until"`
|
||||
}
|
||||
|
||||
// UpdateMember updates the given discord.Member.
|
||||
|
|
Loading…
Reference in a new issue