From bafb6c13426bf75f89702051568c523d2d51bde4 Mon Sep 17 00:00:00 2001 From: KieranRobson Date: Mon, 5 Dec 2022 22:39:03 +0000 Subject: [PATCH] chore: Run ci --- src/commands/embeds/paidmember.js | 5 +---- src/events/guildMemberUpdate.js | 34 ++++++++++++++++--------------- src/events/guildScheduledEvent.js | 4 +++- src/events/interactionCreate.js | 3 ++- 4 files changed, 24 insertions(+), 22 deletions(-) diff --git a/src/commands/embeds/paidmember.js b/src/commands/embeds/paidmember.js index c9a6030..8ac6d90 100644 --- a/src/commands/embeds/paidmember.js +++ b/src/commands/embeds/paidmember.js @@ -43,10 +43,7 @@ module.exports = { ) .addField('Pay for a membership', 'Press the grey button below!') .setThumbnail('https://i.imgur.com/ww6wKwJ.png') - .setImage( - `https://i.imgur.com/ro0U7LG.png?2048` - ); - + .setImage(`https://i.imgur.com/ro0U7LG.png?2048`); const row = new MessageActionRow() .addComponents( diff --git a/src/events/guildMemberUpdate.js b/src/events/guildMemberUpdate.js index 1e5dd6f..7eed7de 100644 --- a/src/events/guildMemberUpdate.js +++ b/src/events/guildMemberUpdate.js @@ -3,22 +3,24 @@ const client = require('../index'); client.on('guildMemberUpdate', async (oldMember, newMember) => { console.log('Event fired'); + const rolesAdded = newMember.roles.cache.filter( + (x) => !oldMember.roles.cache.get(x.id) + ); + const rolesRemoved = oldMember.roles.cache.filter( + (x) => !newMember.roles.cache.get(x.id) + ); - const rolesAdded = newMember.roles.cache.filter(x => !oldMember.roles.cache.get(x.id)); - const rolesRemoved = oldMember.roles.cache.filter(x => !newMember.roles.cache.get(x.id)); + if (rolesAdded.size != 0 || rolesRemoved.size != 0) { + const roleAddedString = []; + for (const role of [...rolesAdded.values()]) { + roleAddedString.push(role.toString()); + } - if (rolesAdded.size != 0 || rolesRemoved.size != 0) { - const roleAddedString = []; - for (const role of [...rolesAdded.values()]) { - roleAddedString.push(role.toString()); - } + const roleRemovedString = []; + for (const role of [...rolesRemoved.values()]) { + roleRemovedString.push(role.toString()); + } - const roleRemovedString = []; - for (const role of [...rolesRemoved.values()]) { - roleRemovedString.push(role.toString()); - } - - console.log(roleAddedString) - - } -}); \ No newline at end of file + console.log(roleAddedString); + } +}); diff --git a/src/events/guildScheduledEvent.js b/src/events/guildScheduledEvent.js index 01fcfe5..823370a 100644 --- a/src/events/guildScheduledEvent.js +++ b/src/events/guildScheduledEvent.js @@ -66,7 +66,9 @@ client.on('guildScheduledEventCreate', async (guildScheduledEvent) => { { tags: 'event' }, { title: guildScheduledEvent.name }, { - date: guildScheduledEvent.scheduledStartAt.toISOString().substring(0,10) + date: guildScheduledEvent.scheduledStartAt + .toISOString() + .substring(0, 10), }, { teaser: guildScheduledEvent.description }, ], diff --git a/src/events/interactionCreate.js b/src/events/interactionCreate.js index b2c4539..dea07ce 100644 --- a/src/events/interactionCreate.js +++ b/src/events/interactionCreate.js @@ -305,7 +305,8 @@ client.on('interactionCreate', async (interaction) => { execchannel.send({ embeds: [embed], components: [row] }); await interaction.deferReply({ ephemeral: true }); interaction.followUp({ - content: 'Your request has been sent to execs! Please be patient as execs, like you, are also students!', + content: + 'Your request has been sent to execs! Please be patient as execs, like you, are also students!', ephemeral: true, }); }