mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 00:53:31 +01:00
feat(GuildMember): add method to check timeout (#7146)
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com> Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
This commit is contained in:
@@ -303,6 +303,14 @@ class GuildMember extends Base {
|
||||
return this.manageable && (this.guild.me?.permissions.has(Permissions.FLAGS.MODERATE_MEMBERS) ?? false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether this member is currently timed out
|
||||
* @returns {boolean}
|
||||
*/
|
||||
isCommunicationDisabled() {
|
||||
return this.communicationDisabledUntilTimestamp > Date.now();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns `channel.permissionsFor(guildMember)`. Returns permissions for a member in a guild channel,
|
||||
* taking into account roles and permission overwrites.
|
||||
|
||||
Reference in New Issue
Block a user