This commit is contained in:
Travis CI 2016-12-20 23:37:34 +00:00
parent fde13685e3
commit 0aabf6e9aa
2 changed files with 9 additions and 1 deletions

View file

@ -1127,6 +1127,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<DMChannel>}

File diff suppressed because one or more lines are too long