Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
phil-flip committed Sep 27, 2024
1 parent 305d078 commit 4c28968
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions commands/red.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ module.exports.run = async (interaction) => {

// prepare username, avatar and message
const contentText = await interaction.channel.send(interaction.options.getString('message', true)).catch(ERR);
const username = message.member.nickname || message.author.username;
const avatarURL = message.member.displayAvatarURL({ format: 'png', dynamic: true, size: 512 });
const username = interaction.message.member.nickname;
const avatarURL = interaction.message.member.displayAvatarURL({ format: 'png', dynamic: true, size: 512 });

// get webhook and send message
const channel = message.channel;
const channel = interaction.message.channel;
const channelWebhooks = await channel.fetchWebhooks();
let hook = channelWebhooks.find((hook) => hook.owner.id === client.user.id);
if (!hook) hook = await channel.createWebhook({ name: config.name }).catch(ERR);
Expand Down

0 comments on commit 4c28968

Please sign in to comment.