refactor(Managers): rename add to _add (#6060)

This commit is contained in:
1Computer1
2021-07-08 06:34:45 -04:00
committed by GitHub
parent 28b5ffb4d6
commit 9cd5e7ed61
72 changed files with 157 additions and 159 deletions

View File

@@ -86,7 +86,7 @@ class Message extends Base {
* The author of the message
* @type {?User}
*/
this.author = this.client.users.add(data.author, !data.webhook_id);
this.author = this.client.users._add(data.author, !data.webhook_id);
} else if (!this.author) {
this.author = null;
}
@@ -106,7 +106,7 @@ class Message extends Base {
* The thread started by this message
* @type {?ThreadChannel}
*/
this.thread = this.client.channels.add(data.thread);
this.thread = this.client.channels._add(data.thread);
} else if (!this.thread) {
this.thread = null;
}
@@ -182,7 +182,7 @@ class Message extends Base {
this.reactions = new ReactionManager(this);
if (data.reactions?.length > 0) {
for (const reaction of data.reactions) {
this.reactions.add(reaction);
this.reactions._add(reaction);
}
}
@@ -231,7 +231,7 @@ class Message extends Base {
if (this.member && data.member) {
this.member._patch(data.member);
} else if (data.member && this.guild && this.author) {
this.guild.members.add(Object.assign(data.member, { user: this.author }));
this.guild.members._add(Object.assign(data.member, { user: this.author }));
}
/**
@@ -261,7 +261,7 @@ class Message extends Base {
: null;
if (data.referenced_message) {
this.channel.messages.add(data.referenced_message);
this.channel.messages._add(data.referenced_message);
}
/**
@@ -282,7 +282,7 @@ class Message extends Base {
id: data.interaction.id,
type: InteractionTypes[data.interaction.type],
commandName: data.interaction.name,
user: this.client.users.add(data.interaction.user),
user: this.client.users._add(data.interaction.user),
};
} else if (!this.interaction) {
this.interaction = null;
@@ -311,7 +311,7 @@ class Message extends Base {
if ('content' in data) this.content = data.content;
if ('pinned' in data) this.pinned = data.pinned;
if ('tts' in data) this.tts = data.tts;
if ('thread' in data) this.thread = this.client.channels.add(data.thread);
if ('thread' in data) this.thread = this.client.channels._add(data.thread);
if ('attachments' in data) {
this.attachments = new Collection();