Skip to content

Commit

Permalink
fix team mention
Browse files Browse the repository at this point in the history
  • Loading branch information
phil-flip committed Mar 15, 2024
1 parent a0d0e75 commit 4d52015
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions functions/ENGINE/checkin/COMPONENT/button/ready.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@ module.exports.run = async (interaction) => {

// ping team, once
const messages = await interaction.channel.messages.fetch();
const botMessages = messages.filter((message) => message.author.id === client.user.id);
if (botMessages.size >= 2) return;
interaction.channel.send(`<@&${config.teamRole}>`);
const mentions = messages.filter((message) => message.mentions.roles.has(config.teamRole));
if (!mentions) interaction.channel.send(`<@&${config.teamRole}>`);

// gray out button
interaction.message.edit({ components: [buttons] });
Expand Down

0 comments on commit 4d52015

Please sign in to comment.