From 2d48a6fde2249aa3bcf9443b34e41be3f12bf35e Mon Sep 17 00:00:00 2001 From: Ethan Lane Date: Fri, 11 Aug 2023 20:52:16 +0100 Subject: [PATCH] Fix moderation commands not sending log embed with user avatar (#328) # Description - Fixes the moderation commands not sending the log embed with the user avatar - Updates the .env files to use v3.2 #205 ## Type of change Please delete options that are not relevant. - [x] Bug fix (non-breaking change which fixes an issue) # How Has This Been Tested? - This has been tested locally by running the warn command against a user, and seeing if the log uses my avatar in the thumbnail # Checklist - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that provde my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [x] Any dependent changes have been merged and published in downstream modules Reviewed-on: https://gitea.vylpes.xyz/RabbitLabs/vylbot-app/pulls/328 Co-authored-by: Ethan Lane Co-committed-by: Ethan Lane --- .dev.env | 2 +- .prod.env | 2 +- .stage.env | 2 +- src/commands/ban.ts | 1 + src/commands/kick.ts | 1 + src/commands/mute.ts | 1 + src/commands/timeout.ts | 1 + src/commands/unmute.ts | 1 + src/commands/warn.ts | 1 + 9 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.dev.env b/.dev.env index 664b4ed..a0df6c9 100644 --- a/.dev.env +++ b/.dev.env @@ -7,7 +7,7 @@ # any secret values. BOT_TOKEN= -BOT_VER=3.1.1 +BOT_VER=3.2 DEV BOT_AUTHOR=Vylpes BOT_OWNERID=147392775707426816 BOT_CLIENTID=682942374040961060 diff --git a/.prod.env b/.prod.env index ea02143..6c9b8c9 100644 --- a/.prod.env +++ b/.prod.env @@ -7,7 +7,7 @@ # any secret values. BOT_TOKEN= -BOT_VER=3.1.1 +BOT_VER=3.2 BOT_AUTHOR=Vylpes BOT_OWNERID=147392775707426816 BOT_CLIENTID=680083120896081954 diff --git a/.stage.env b/.stage.env index 17044dd..6e29629 100644 --- a/.stage.env +++ b/.stage.env @@ -7,7 +7,7 @@ # any secret values. BOT_TOKEN= -BOT_VER=3.1.1 +BOT_VER=3.2 BETA BOT_AUTHOR=Vylpes BOT_OWNERID=147392775707426816 BOT_CLIENTID=1016767908740857949 diff --git a/src/commands/ban.ts b/src/commands/ban.ts index 219a078..1c9aa1f 100644 --- a/src/commands/ban.ts +++ b/src/commands/ban.ts @@ -44,6 +44,7 @@ export default class Ban extends Command { .setColor(EmbedColours.Ok) .setTitle("Member Banned") .setDescription(`<@${targetUser.user.id}> \`${targetUser.user.tag}\``) + .setThumbnail(targetUser.user.avatarURL()) .addFields([ { name: "Moderator", diff --git a/src/commands/kick.ts b/src/commands/kick.ts index 0008589..28eb0bd 100644 --- a/src/commands/kick.ts +++ b/src/commands/kick.ts @@ -44,6 +44,7 @@ export default class Kick extends Command { .setColor(EmbedColours.Ok) .setTitle("Member Kicked") .setDescription(`<@${targetUser.user.id}> \`${targetUser.user.tag}\``) + .setThumbnail(targetUser.user.avatarURL()) .addFields([ { name: "Moderator", diff --git a/src/commands/mute.ts b/src/commands/mute.ts index 3e92231..c012035 100644 --- a/src/commands/mute.ts +++ b/src/commands/mute.ts @@ -42,6 +42,7 @@ export default class Mute extends Command { .setColor(EmbedColours.Ok) .setTitle("Member Muted") .setDescription(`<@${targetUser.user.id}> \`${targetUser.user.tag}\``) + .setThumbnail(targetUser.user.avatarURL()) .addFields([ { name: "Moderator", diff --git a/src/commands/timeout.ts b/src/commands/timeout.ts index 52fe1e7..c0b65b5 100644 --- a/src/commands/timeout.ts +++ b/src/commands/timeout.ts @@ -64,6 +64,7 @@ export default class Timeout extends Command { .setColor(EmbedColours.Ok) .setTitle("Member Timed Out") .setDescription(`<@${targetUser.user.id}> \`${targetUser.user.tag}\``) + .setThumbnail(targetUser.user.avatarURL()) .addFields([ { name: "Moderator", diff --git a/src/commands/unmute.ts b/src/commands/unmute.ts index 1a3bf95..7bbb943 100644 --- a/src/commands/unmute.ts +++ b/src/commands/unmute.ts @@ -40,6 +40,7 @@ export default class Unmute extends Command { .setColor(EmbedColours.Ok) .setTitle("Member Unmuted") .setDescription(`<@${targetUser.user.id}> \`${targetUser.user.tag}\``) + .setThumbnail(targetUser.user.avatarURL()) .addFields([ { name: "Moderator", diff --git a/src/commands/warn.ts b/src/commands/warn.ts index 618118b..527c7a0 100644 --- a/src/commands/warn.ts +++ b/src/commands/warn.ts @@ -41,6 +41,7 @@ export default class Warn extends Command { .setColor(EmbedColours.Ok) .setTitle("Member Warned") .setDescription(`<@${targetUser.user.id}> \`${targetUser.user.tag}\``) + .setThumbnail(targetUser.user.avatarURL()) .addFields([ { name: "Moderator",