jacopo2199o
jacopo2199o
DIAdiscord.js - Imagine an app
Created by jacopo2199o on 1/23/2024 in #djs-questions
bot invites unwanted members into private threads
🤝
7 replies
DIAdiscord.js - Imagine an app
Created by jacopo2199o on 1/23/2024 in #djs-questions
bot invites unwanted members into private threads
yes, my friend, I think you have found the problem, I mention the entire role so all members that have this role being mentioned inside the thread
7 replies
DIAdiscord.js - Imagine an app
Created by jacopo2199o on 1/23/2024 in #djs-questions
bot invites unwanted members into private threads
interaction.member does not refer to Who pressed the button?
7 replies
DIAdiscord.js - Imagine an app
Created by jacopo2199o on 1/23/2024 in #djs-questions
bot invites unwanted members into private threads
yes, programmer 🌞 thx, that's all the code this function execute when fired by "new message" discord event to have a full picture I can post even the code fired when the button Is pressed
const takePromotionPoints = async (interaction) => {
const takerRole = getCustomRole(interaction.member);
let actionRow = new ActionRowBuilder();
let button = new ButtonBuilder();

interaction.client.emit("activity", interaction.member, drops.promotionPoints);

actionRow.setComponents(
button
.setCustomId("taken")
.setLabel("taken")
.setStyle(ButtonStyle.Danger)
.setDisabled(true)
);

interaction.update({
content: `${takerRole} *${interaction.member}* took the drop`,
components: [actionRow]
});
};
const takePromotionPoints = async (interaction) => {
const takerRole = getCustomRole(interaction.member);
let actionRow = new ActionRowBuilder();
let button = new ButtonBuilder();

interaction.client.emit("activity", interaction.member, drops.promotionPoints);

actionRow.setComponents(
button
.setCustomId("taken")
.setLabel("taken")
.setStyle(ButtonStyle.Danger)
.setDisabled(true)
);

interaction.update({
content: `${takerRole} *${interaction.member}* took the drop`,
components: [actionRow]
});
};
7 replies
DIAdiscord.js - Imagine an app
Created by jacopo2199o on 1/23/2024 in #djs-questions
bot invites unwanted members into private threads
running on windows: discord.js: 14.13 node: 16.20
7 replies