Added DM support, DM Creation and DM Deletion

This commit is contained in:
hydrabolt
2016-05-03 17:50:33 +01:00
parent ab17375248
commit bc443df11d
5 changed files with 75 additions and 14 deletions

View File

@@ -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;