mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 09:03:29 +01:00
Added deleting messages
This commit is contained in:
@@ -68,6 +68,19 @@ var Cache = (function (_Array) {
|
||||
}
|
||||
};
|
||||
|
||||
Cache.prototype.remove = function remove(data) {
|
||||
var index = this.indexOf(data);
|
||||
if (~index) {
|
||||
this.splice(index, 1);
|
||||
} else {
|
||||
var item = this.get("id", data.id);
|
||||
if (item) {
|
||||
this.splice(this.indexOf(item), 1);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
return Cache;
|
||||
})(Array);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user