refactor: improve code readability

This commit is contained in:
Isaac 2021-08-17 00:09:07 +01:00
parent d4d60123cb
commit 9363c74ae3
No known key found for this signature in database
GPG Key ID: 87B9B6BD04EB7534
3 changed files with 10 additions and 10 deletions

View File

@ -12,16 +12,16 @@ module.exports = class MessageReactionAddEventListener extends EventListener {
if (reaction.partial) { if (reaction.partial) {
try { try {
await reaction.fetch(); await reaction.fetch();
} catch (err) { } catch (error) {
return this.client.log.error(err); return this.client.log.error(error);
} }
} }
if (user.partial) { if (user.partial) {
try { try {
await user.fetch(); await user.fetch();
} catch (err) { } catch (error) {
return this.client.log.error(err); return this.client.log.error(error);
} }
} }

View File

@ -12,16 +12,16 @@ module.exports = class MessageReactionRemoveEventListener extends EventListener
if (reaction.partial) { if (reaction.partial) {
try { try {
await reaction.fetch(); await reaction.fetch();
} catch (err) { } catch (error) {
return this.client.log.error(err); return this.client.log.error(error);
} }
} }
if (user.partial) { if (user.partial) {
try { try {
await user.fetch(); await user.fetch();
} catch (err) { } catch (error) {
return this.client.log.error(err); return this.client.log.error(error);
} }
} }

View File

@ -9,8 +9,8 @@ module.exports = class MessageUpdateEventListener extends EventListener {
if (newm.partial) { if (newm.partial) {
try { try {
await newm.fetch(); await newm.fetch();
} catch (err) { } catch (error) {
return this.client.log.error(err); return this.client.log.error(error);
} }
} }