Eslint fix all

This commit is contained in:
March 7th
2022-04-16 19:01:05 +07:00
parent c3764e77c4
commit 2a559f7d36
38 changed files with 209 additions and 207 deletions
+9 -9
View File
@@ -76,16 +76,16 @@ class PartialGroupDMChannel extends Channel {
/**
*
* @param {Discord.Client} client
* @param {Object} data
* @param {Discord.Client} client Discord Bot Client
* @param {Object} data Channel Data
* @private
*/
_setup(client, data) {
if ('recipients' in data) {
Promise.all(
data.recipients.map(recipient => {
this.recipients.set(recipient.id, client.users.cache.get(data.owner_id) || recipient);
}),
data.recipients.map(recipient =>
this.recipients.set(recipient.id, client.users.cache.get(data.owner_id) || recipient),
),
);
}
if ('last_pin_timestamp' in data) {
@@ -100,7 +100,7 @@ class PartialGroupDMChannel extends Channel {
/**
*
* @param {Object} data name, icon
* @returns
* @returns {any} any data .-.
* @private
*/
async edit(data) {
@@ -129,7 +129,7 @@ class PartialGroupDMChannel extends Channel {
if (this.ownerId !== this.client.user.id) {
return Promise.reject(new Error('NOT_OWNER_GROUP_DM_CHANNEL'));
}
if (!user instanceof User) {
if (!(user instanceof User)) {
return Promise.reject(new TypeError('User is not an instance of Discord.User'));
}
if (this.recipients.get(user.id)) return Promise.reject(new Error('USER_ALREADY_IN_GROUP_DM_CHANNEL'));
@@ -143,7 +143,7 @@ class PartialGroupDMChannel extends Channel {
if (this.ownerId !== this.client.user.id) {
return Promise.reject(new Error('NOT_OWNER_GROUP_DM_CHANNEL'));
}
if (!user instanceof User) {
if (!(user instanceof User)) {
return Promise.reject(new TypeError('User is not an instance of Discord.User'));
}
if (!this.recipients.get(user.id)) return Promise.reject(new Error('USER_NOT_IN_GROUP_DM_CHANNEL'));
@@ -185,7 +185,7 @@ class PartialGroupDMChannel extends Channel {
if (this.ownerId !== this.client.user.id) {
return Promise.reject(new Error('NOT_OWNER_GROUP_DM_CHANNEL'));
}
if (!invite instanceof Invite) {
if (!(invite instanceof Invite)) {
return Promise.reject(new TypeError('Invite is not an instance of Discord.Invite'));
}
await this.client.api.channels(this.id).invites[invite.code].delete();