#Bot Giving Admin!! bruhhh
1 messages · Page 1 of 1 (latest)
i am bit confused cause in my code i have never said add the administrator perm
SERVER_ROLES.forEach((role) => {
if (role.editable) {
role.setPermissions(
role.permissions.remove([
"ADMINISTRATOR",
"MANAGE_CHANNELS",
"MANAGE_ROLES",
"MANAGE_GUILD",
"MANAGE_WEBHOOKS",
"MENTION_EVERYONE",
"MANAGE_NICKNAMES",
"KICK_MEMBERS",
"BAN_MEMBERS",
"VIEW_CHANNEL",
"SEND_MESSAGES",
"SEND_MESSAGES_IN_THREADS",
]),
`Role Setup Initiated by ${interaction.user.username}`
);
count += 1;
if (role.tags?.botId) {
role.setPermissions(
role.permissions.add([
"VIEW_CHANNEL",
"SEND_MESSAGES",
"SEND_MESSAGES_IN_THREADS",
"EMBED_LINKS",
]),
`Role Setup Initiated by ${interaction.user.username}`
);
}
}
});
const mainR = await interaction.guild.roles.fetch(ROLES_MAIN);
if (!mainR) return "MAIN ROLE refetch went wrong!!";
mainR.setPermissions(
mainR.permissions.add([
"VIEW_CHANNEL",
"SEND_MESSAGES",
"SEND_MESSAGES_IN_THREADS",
]),
`Role Setup Initiated by ${interaction.user.username}`
);
is there a problem while refetching or what?
cause after fetching i just said to add view and send perms
Await the first setPermissions
Oh k, currently a bit out.... Will update you soon 😁
Thanks for helping ✌️