mirror of
https://github.com/danbulant/discord.js
synced 2026-06-20 15:11:32 +00:00
Webpack build for branch master: 8da915f6a1
This commit is contained in:
parent
65a9fa2bd6
commit
62561bb110
2 changed files with 18 additions and 2 deletions
|
|
@ -1203,6 +1203,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<DMChannel>}
|
||||
*/
|
||||
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<DMChannel>}
|
||||
|
|
@ -2391,12 +2399,20 @@ class GuildMember {
|
|||
return this.edit({ nick });
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a DM channel between the client and the member
|
||||
* @returns {Promise<DMChannel>}
|
||||
*/
|
||||
createDM() {
|
||||
return this.user.createDM();
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes any DMs with this guild member
|
||||
* @returns {Promise<DMChannel>}
|
||||
*/
|
||||
deleteDM() {
|
||||
return this.client.rest.methods.deleteChannel(this);
|
||||
return this.user.deleteDM();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
2
discord.master.min.js
vendored
2
discord.master.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue