MessageDelete handling

This commit is contained in:
hydrabolt
2016-04-18 18:06:31 +01:00
parent c947e172d6
commit d437fd31cf
7 changed files with 44 additions and 2 deletions

View File

@@ -20,8 +20,9 @@ class DMChannel extends Channel{
let storeKeys = Object.keys(this.store);
if (storeKeys.length >= maxSize) {
this.store.remove(storeKeys[0]);
this.store.add('messages', message);
}
this.store.add('messages', message);
}
setup(data) {

View File

@@ -20,6 +20,7 @@ class Message {
this.embeds = data.embeds;
this.attachments = data.attachments;
this.mentions = [];
this.id = data.id;
for (let mention of data.mentions) {
let user = this.guild.client.store.get('users', mention.id);
if (user) {

View File

@@ -20,8 +20,9 @@ class TextChannel extends ServerChannel {
let storeKeys = Object.keys(this.store);
if (storeKeys.length >= maxSize) {
this.store.remove(storeKeys[0]);
this.store.add('messages', message);
}
this.store.add('messages', message);
}
}