feat(GuildMember): add dmChannel getter (#8281)

This commit is contained in:
Rodry
2022-07-25 10:12:00 +01:00
committed by GitHub
parent 9f4446b10f
commit 4fc2c60a3b
2 changed files with 10 additions and 0 deletions

View File

@@ -210,6 +210,15 @@ class GuildMember extends Base {
return this.user.id;
}
/**
* The DM between the client's user and this member
* @type {?DMChannel}
* @readonly
*/
get dmChannel() {
return this.client.users.dmChannel(this.id);
}
/**
* The nickname of this member, or their username if they don't have one
* @type {?string}

View File

@@ -1283,6 +1283,7 @@ export class GuildMember extends PartialTextBasedChannel(Base) {
private constructor(client: Client, data: RawGuildMemberData, guild: Guild);
public avatar: string | null;
public get bannable(): boolean;
public get dmChannel(): DMChannel | null;
public get displayColor(): number;
public get displayHexColor(): HexColorString;
public get displayName(): string;