mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
feat(GuildMember): add dmChannel getter (#8281)
This commit is contained in:
@@ -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}
|
||||
|
||||
1
packages/discord.js/typings/index.d.ts
vendored
1
packages/discord.js/typings/index.d.ts
vendored
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user