Closed MahdiTeaR closed 5 months ago
Hey, try checking the newly opened ticket channel for which roles have permissions to see the tickets. Unless you manually modified .js
files, which you should never really do, it is impossible for the @everyone
role to be allowed to see any tickets.
You can also try checking the audit log to see which permissions the bot allowed/disallowed when the ticket channel was created, make sure the bot has enough permissions and review your configuration. Those steps should guide you towards finding the cause of the issue and hopefully fixing it too.
You should check the support_role_ids
part of the config of the ticket category that has this issue, if you have a member role and put it there by mistake then the bot might be giving them access to the ticket as per your configuration.
Impossible, check if other bots are doing this in the audit log or if you edited the interactionCreate.js
file.
The code for denying access to the @everyone
role is intentionally hard coded so that users do not mess it up and end up with public ticket channels.
permissionOverwrites: [
{
id: interaction.guild.id,
deny: [
PermissionFlagsBits.ViewChannel,
PermissionFlagsBits.SendMessages,
],
},
When I run the code on the Replit site, there is no problem with permission, but when we run the code in Visual Studio Code, there is a problem with everyone's permission.
Then you have the answer I think, check what files might be incorrect or outdated or modified in the environment where you run the bot. Specially replace the interactionCreate.js
to get this fixed. As I pointed above, the lines of code that handle the @everyone
permission are clearly correct in the file.
You can also find them here: https://github.com/ralphkb/sentinel-tickets/blob/main/events/interactionCreate.js#L2456
When I open the ticket, all people have permission to see the ticket, from which part can fix this?