Check if a user have the permission to execute a command.
Hello, I'm working on a ticket bot and I would like to have the same permissions for the close command and button. So I would like to check if the user have the permission in the integration tab, in the settings of discord server.
But, it's only return true when a permission exist for that specific user. It's doesn't use everyone or role permisison. Did you have other alternative for me ?
https://old.discordjs.dev/#/docs/discord.js/main/class/ApplicationCommandPermissionsManager?scrollTo=has
But, it's only return true when a permission exist for that specific user. It's doesn't use everyone or role permisison. Did you have other alternative for me ?
https://old.discordjs.dev/#/docs/discord.js/main/class/ApplicationCommandPermissionsManager?scrollTo=has
Discord.js is a powerful node.js module that allows you to interact with the Discord API very easily. It takes a much more object-oriented approach than most other JS Discord libraries, making your bot's code significantly tidier and easier to comprehend.