mirror of
https://github.com/diamondburned/arikawa.git
synced 2025-11-30 16:17:57 +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
|
// Requires MOVE_MEMBER
|
||||||
VoiceChannel discord.ChannelID `json:"channel_id,omitempty"`
|
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:"-"`
|
AuditLogReason `json:"-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -335,6 +335,8 @@ type Member struct {
|
||||||
Joined Timestamp `json:"joined_at"`
|
Joined Timestamp `json:"joined_at"`
|
||||||
// BoostedSince specifies when the user started boosting the guild.
|
// BoostedSince specifies when the user started boosting the guild.
|
||||||
BoostedSince Timestamp `json:"premium_since,omitempty"`
|
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 specifies whether the user is deafened in voice channels.
|
||||||
Deaf bool `json:"deaf"`
|
Deaf bool `json:"deaf"`
|
||||||
|
|
|
||||||
|
|
@ -88,6 +88,8 @@ const (
|
||||||
// Allows for launching activities (applications with the EMBEDDED flag)
|
// Allows for launching activities (applications with the EMBEDDED flag)
|
||||||
// in a voice channel
|
// in a voice channel
|
||||||
PermissionStartEmbeddedActivities
|
PermissionStartEmbeddedActivities
|
||||||
|
// Allows for timing out users
|
||||||
|
PermissionModerateMembers
|
||||||
|
|
||||||
PermissionAllText = 0 |
|
PermissionAllText = 0 |
|
||||||
PermissionViewChannel |
|
PermissionViewChannel |
|
||||||
|
|
|
||||||
|
|
@ -299,11 +299,12 @@ type GuildMemberRemoveEvent struct {
|
||||||
//
|
//
|
||||||
// https://discord.com/developers/docs/topics/gateway#guilds
|
// https://discord.com/developers/docs/topics/gateway#guilds
|
||||||
type GuildMemberUpdateEvent struct {
|
type GuildMemberUpdateEvent struct {
|
||||||
GuildID discord.GuildID `json:"guild_id"`
|
GuildID discord.GuildID `json:"guild_id"`
|
||||||
RoleIDs []discord.RoleID `json:"roles"`
|
RoleIDs []discord.RoleID `json:"roles"`
|
||||||
User discord.User `json:"user"`
|
User discord.User `json:"user"`
|
||||||
Nick string `json:"nick"`
|
Nick string `json:"nick"`
|
||||||
Avatar discord.Hash `json:"avatar"`
|
Avatar discord.Hash `json:"avatar"`
|
||||||
|
CommunicationDisabledUntil discord.Timestamp `json:"communication_disabled_until"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// UpdateMember updates the given discord.Member.
|
// UpdateMember updates the given discord.Member.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue