Skip to content

Commit

Permalink
feat(GuildMember): add dmChannel getter (#8281)
Browse files Browse the repository at this point in the history
  • Loading branch information
ImRodry committed Jul 25, 2022
1 parent 9f4446b commit 4fc2c60
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/discord.js/src/structures/GuildMember.js
Expand Up @@ -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}
Expand Down
1 change: 1 addition & 0 deletions packages/discord.js/typings/index.d.ts
Expand Up @@ -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;
Expand Down

0 comments on commit 4fc2c60

Please sign in to comment.