Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: don't call update() multiple times in the prototype chain #91

Merged
merged 1 commit into from
Jul 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion lib/structures/CategoryChannel.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ const PermissionOverwrite = require("./PermissionOverwrite");
class CategoryChannel extends GuildChannel {
constructor(data, client) {
super(data, client);
this.update(data);
}

update(data) {
Expand Down
1 change: 0 additions & 1 deletion lib/structures/ExtendedUser.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ const User = require("./User");
class ExtendedUser extends User {
constructor(data, client) {
super(data, client);
this.update(data);
}

update(data) {
Expand Down
1 change: 0 additions & 1 deletion lib/structures/ForumChannel.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ class ForumChannel extends GuildChannel {
this.defaultThreadRateLimitPerUser = data.default_thread_rate_limit_per_user == null ? null : data.default_thread_rate_limit_per_user;
this.lastThreadID = data.last_message_id || null;
this.rateLimitPerUser = data.rate_limit_per_user == null ? null : data.rate_limit_per_user;
this.update(data);
}

update(data) {
Expand Down
1 change: 0 additions & 1 deletion lib/structures/NewsChannel.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ class NewsChannel extends TextChannel {
constructor(data, guild, messageLimit) {
super(data, guild, messageLimit);
this.rateLimitPerUser = 0;
this.update(data);
}

/**
Expand Down
1 change: 0 additions & 1 deletion lib/structures/PrivateThreadChannel.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ const ThreadChannel = require("./ThreadChannel");
class PrivateThreadChannel extends ThreadChannel {
constructor(data, client, messageLimit) {
super(data, client, messageLimit);
this.update(data);
}

update(data) {
Expand Down
1 change: 0 additions & 1 deletion lib/structures/PublicThreadChannel.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ const ThreadChannel = require("./ThreadChannel");
class PublicThreadChannel extends ThreadChannel {
constructor(data, client, messageLimit) {
super(data, client, messageLimit);
this.update(data);
}

update(data) {
Expand Down
1 change: 0 additions & 1 deletion lib/structures/TextChannel.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ class TextChannel extends GuildChannel {
this.lastMessageID = data.last_message_id || null;
this.rateLimitPerUser = data.rate_limit_per_user == null ? null : data.rate_limit_per_user;
this.lastPinTimestamp = data.last_pin_timestamp ? Date.parse(data.last_pin_timestamp) : null;
this.update(data);
}

update(data) {
Expand Down
1 change: 0 additions & 1 deletion lib/structures/TextVoiceChannel.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ class TextVoiceChannel extends VoiceChannel {
this.messages = new Collection(Message, messageLimit == null ? client.options.messageLimit : messageLimit);
this.nsfw = data.nsfw;
this.lastMessageID = data.last_message_id || null;
this.update(data);
}

update(data) {
Expand Down
1 change: 0 additions & 1 deletion lib/structures/ThreadChannel.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ class ThreadChannel extends GuildChannel {
this.members = new Collection(ThreadMember);
this.lastMessageID = data.last_message_id || null;
this.ownerID = data.owner_id;
this.update(data);
}

update(data) {
Expand Down
1 change: 0 additions & 1 deletion lib/structures/VoiceChannel.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ class VoiceChannel extends GuildChannel {
constructor(data, client) {
super(data, client);
this.voiceMembers = new Collection(Member);
this.update(data);
}

update(data) {
Expand Down