diff --git a/src/structures/User.js b/src/structures/User.js index ae046159..7c19bef1 100644 --- a/src/structures/User.js +++ b/src/structures/User.js @@ -164,6 +164,14 @@ class User { return channel._typing.has(this.id) ? channel._typing.get(this.id).elapsedTime : -1; } + /** + * The DM between the client's user and this user + * @type {?DMChannel} + */ + get dmChannel() { + return this.client.channels.filter(c => c.type === 'dm').find(c => c.recipient.id === this.id); + } + /** * Deletes a DM channel (if one exists) between the client and the user. Resolves with the channel if successful. * @returns {Promise}