mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 08:33:30 +01:00
MessageDelete handling
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user