mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-02 21:16:09 +00:00
feat: Member.timeout helper alias
This commit is contained in:
parent
fecd90a6f4
commit
07e3169aa1
@ -401,7 +401,7 @@ export interface ModifyGuildMember {
|
||||
mute?: boolean;
|
||||
deaf?: boolean;
|
||||
channelId?: Snowflake;
|
||||
communicationDisabledUntil?: number;
|
||||
communicationDisabledUntil?: number | null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -141,6 +141,11 @@ export class Member implements Model {
|
||||
return member;
|
||||
}
|
||||
|
||||
/** calls {@link Member#edit} which calls {@link Guild#editMember} under the hood */
|
||||
async timeout(time: number | null) {
|
||||
await this.edit({ communicationDisabledUntil: time });
|
||||
}
|
||||
|
||||
/** adds a role to this member */
|
||||
async addRole(roleId: Snowflake, reason?: string): Promise<void> {
|
||||
await Guild.prototype.addRole.call(
|
||||
|
Loading…
x
Reference in New Issue
Block a user