Skip to content
This repository has been archived by the owner on Jun 7, 2024. It is now read-only.

Commit

Permalink
Fix Blacklist v2
Browse files Browse the repository at this point in the history
  • Loading branch information
p0rtL6 authored Dec 15, 2021
1 parent 8e7e8d3 commit 5e1114b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/handlers/Interactions.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ function ButtonInteraction(interaction) { // Handler for button interactions, lo
if (!hasAuth) return interaction.update({ components: [], content: 'Image request denied' });
else return interaction.update({ components: [row], content: 'Image request denied' });
case "block":
interaction.guild.members.fetch(interaction.message.embeds[0].author.name).roles.add(interaction.guild.roles.cache.find(role => role.name == 'BlackCube Blacklist')); // Adds blacklist role
interaction.guild.members.fetch(interaction.message.embeds[0].author.name).then(member => {
member.roles.add(interaction.guild.roles.cache.find(role => role.name == 'BlackCube Blacklist')); // Adds blacklist role
});
return interaction.update({ components: [], content: 'User blocked from further requests' });
case "dismiss":
return interaction.update({ components: [], content: 'Image request denied' });
Expand Down

0 comments on commit 5e1114b

Please sign in to comment.