diff --git a/src/structures/GuildMember.js b/src/structures/GuildMember.js index af3c5be30..79dd91fc7 100644 --- a/src/structures/GuildMember.js +++ b/src/structures/GuildMember.js @@ -395,12 +395,20 @@ class GuildMember { return this.edit({ nick }); } + /** + * Creates a DM channel between the client and the member + * @returns {Promise} + */ + createDM() { + return this.user.createDM(); + } + /** * Deletes any DMs with this guild member * @returns {Promise} */ deleteDM() { - return this.client.rest.methods.deleteChannel(this); + return this.user.deleteDM(); } /** diff --git a/src/structures/User.js b/src/structures/User.js index 94dbd4883..939d3f157 100644 --- a/src/structures/User.js +++ b/src/structures/User.js @@ -179,6 +179,14 @@ class User { return this.client.channels.filter(c => c.type === 'dm').find(c => c.recipient.id === this.id); } + /** + * Creates a DM channel between the client and the user + * @returns {Promise} + */ + createDM() { + return this.client.rest.methods.createDM(this); + } + /** * Deletes a DM channel (if one exists) between the client and the user. Resolves with the channel if successful. * @returns {Promise}