mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-03 05:26:07 +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;
|
mute?: boolean;
|
||||||
deaf?: boolean;
|
deaf?: boolean;
|
||||||
channelId?: Snowflake;
|
channelId?: Snowflake;
|
||||||
communicationDisabledUntil?: number;
|
communicationDisabledUntil?: number | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -141,6 +141,11 @@ export class Member implements Model {
|
|||||||
return member;
|
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 */
|
/** adds a role to this member */
|
||||||
async addRole(roleId: Snowflake, reason?: string): Promise<void> {
|
async addRole(roleId: Snowflake, reason?: string): Promise<void> {
|
||||||
await Guild.prototype.addRole.call(
|
await Guild.prototype.addRole.call(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user