bvs-nitro-did/interactions/chatCommand/checkmember.js
2026-06-12 10:30:21 -06:00

14 lines
722 B
JavaScript

module.exports = (interaction, client) => {
// if option 'user' is provided, check if that user is boosting the guild. Otherwise, check if the user who ran the command is boosting the guild.
const user = interaction.options.getUser('user') || interaction.user;
const member = interaction.guild.members.cache.get(user.id);
if (!member) {
interaction.reply({ content: `Could not find member with ID ${user.id}.`, ephemeral: true });
return;
}
if (member.premiumSince) {
interaction.reply({ content: `${user.tag} is boosting the guild!`, ephemeral: true });
} else {
interaction.reply({ content: `${user.tag} is not boosting the guild.`, ephemeral: true });
}
}