mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
Added DM support, DM Creation and DM Deletion
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
const TextBasedChannel = require('./interface/TextBasedChannel');
|
||||
|
||||
class User {
|
||||
constructor(client, data) {
|
||||
this.client = client;
|
||||
@@ -22,6 +24,10 @@ class User {
|
||||
return `<@${this.id}>`;
|
||||
}
|
||||
|
||||
deleteDM() {
|
||||
return this.client.rest.methods.DeleteChannel(this);
|
||||
}
|
||||
|
||||
equals(user) {
|
||||
let base = (
|
||||
this.username === user.username &&
|
||||
@@ -45,4 +51,6 @@ class User {
|
||||
}
|
||||
}
|
||||
|
||||
TextBasedChannel.applyToClass(User);
|
||||
|
||||
module.exports = User;
|
||||
|
||||
Reference in New Issue
Block a user