mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 00:53:31 +01:00
fixed references to update items
This commit is contained in:
@@ -29,6 +29,10 @@ export default class User extends Equality{
|
||||
}
|
||||
}
|
||||
|
||||
get name() {
|
||||
return this.username;
|
||||
}
|
||||
|
||||
mention(){
|
||||
return `<@${this.id}>`;
|
||||
}
|
||||
|
||||
@@ -52,9 +52,10 @@ export default class Cache extends Array {
|
||||
|
||||
update(old, data) {
|
||||
var item = this.get(this[discrimS], old[this[discrimS]]);
|
||||
|
||||
if (item) {
|
||||
var index = this.indexOf(item);
|
||||
this[index] = data;
|
||||
Object.assign(this[index], data);
|
||||
this[discrimCacheS][data[this[discrimS]]] = this[index];
|
||||
return this[index];
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user