Rolki errata v3

This commit is contained in:
Stanislaw
2021-10-04 21:26:19 +02:00
parent 447263c3fd
commit 8ea237bc4a

View File

@@ -71,8 +71,8 @@ module.exports = {
{
cl.on('interactionCreate', inter => {
if(!inter.isButton()) return;
if(!inter.member.guild.roles.cache.find((role) => role.name == inter.customId)) return;
const role = inter.member.guild.roles.cache.find((role) => role.name == inter.customId);
if(!role) return;
if(!inter.member.roles.cache.find((role) => role.name == inter.customId))
{
inter.member.roles.add(role)