1/*Check if user in first mention has kick permissions
2You may need to replace msg with message
3And user is a variable of the user you want to check
4*/
5if (user.hasPermission("KICK_MEMBERS"){
6 console.log("Has permission")
7} else {
8 console.log("Doesn't have permission")
9}
10//go to https://discord.js.org/#/docs/main/stable/typedef/PermissionResolvable to get all options
1if (member.hasPermission('KICK_MEMBERS')) {
2 console.log('This member can kick');
3}
4
5if (member.hasPermission(['KICK_MEMBERS', 'BAN_MEMBERS'])) {
6 console.log('This member can kick and ban');
7}
8
9if (member.hasPermission('KICK_MEMBERS', { checkAdmin: false, checkOwner: false })) {
10 console.log('This member can kick without allowing admin to override');
11}
1//Check if my bot has permission ADMINISTRATOR
2const guild = Client.guild.cache.get("GUILD_ID");
3if(guild.me.hasPermission("ADMINISTRATOR")) {
4 console.log("I have the Permission Administrator");
5}else {
6 console.log("I don't have Permission Administrator");
7}