Skip to content

Commit

Permalink
fix(bot-denies/restore): use publisher information instead of bot own…
Browse files Browse the repository at this point in the history
…er for embed author
  • Loading branch information
chimpdev committed Dec 24, 2024
1 parent 1d0681a commit 0dd41a7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions server/src/routes/bot-denies/[id]/restore.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ module.exports = {

await bot.save();

const botOwnerUser = client.users.cache.get(bot.owner.id) || await client.users.fetch(bot.owner.id).catch(() => null);

const guild = client.guilds.cache.get(config.guildId);

const publisher = guild.members.cache.get(bot.owner.id) || await guild.members.fetch(bot.owner.id).catch(() => null);
Expand All @@ -44,7 +42,7 @@ module.exports = {
const embeds = [
new Discord.EmbedBuilder()
.setTitle('Bot Deny Restored')
.setAuthor({ name: botOwnerUser.username, iconURL: botOwnerUser.displayAvatarURL() })
.setAuthor({ name: publisher.username, iconURL: publisher.displayAvatarURL() })
.setFields([
{
name: 'Bot Restored',
Expand Down

0 comments on commit 0dd41a7

Please sign in to comment.