|
|
@ -193,7 +193,7 @@ client.on("message", async message => { |
|
|
|
}); |
|
|
|
|
|
|
|
async function customPrefix(message) { |
|
|
|
if (!message.member.hasPermission("ADMINISTRATOR")) { |
|
|
|
if (!message.member.permissions.has("ADMINISTRATOR")) { |
|
|
|
message.reply("you must have admin permissions to run this command!"); |
|
|
|
return; |
|
|
|
} |
|
|
@ -204,7 +204,7 @@ async function customPrefix(message) { |
|
|
|
} |
|
|
|
|
|
|
|
async function reactionRole(message) { |
|
|
|
if (!message.member.hasPermission('ADMINISTRATOR')) { |
|
|
|
if (!message.member.permissions.has('ADMINISTRATOR')) { |
|
|
|
message.reply(`you don't have the correct permissions to create a reaction roles!`); |
|
|
|
return; |
|
|
|
} |
|
|
@ -311,7 +311,7 @@ async function reactionRole(message) { |
|
|
|
} |
|
|
|
|
|
|
|
async function addEmoji(message) { |
|
|
|
if (!message.member.hasPermission('MANAGE_EMOJIS')) { |
|
|
|
if (!message.member.permissions.has('MANAGE_EMOJIS')) { |
|
|
|
message.reply(`you don't have the correct permissions to manage emojis!`); |
|
|
|
return; |
|
|
|
} |
|
|
@ -396,7 +396,7 @@ async function ping(message) { |
|
|
|
} |
|
|
|
|
|
|
|
async function startLogs(message) { |
|
|
|
if (!message.member.hasPermission("ADMINISTRATOR")) { |
|
|
|
if (!message.member.permissions.has("ADMINISTRATOR")) { |
|
|
|
message.reply("you do not have admin permissions!"); |
|
|
|
return; |
|
|
|
} |
|
|
@ -442,7 +442,7 @@ async function startLogs(message) { |
|
|
|
} |
|
|
|
|
|
|
|
async function kulboardCreate(message) { |
|
|
|
if (!message.member.hasPermission("ADMINISTRATOR")) { |
|
|
|
if (!message.member.permissions.has("ADMINISTRATOR")) { |
|
|
|
message.reply("you do not have admin permissions!"); |
|
|
|
return; |
|
|
|
} |
|
|
@ -490,7 +490,7 @@ async function kulboardCreate(message) { |
|
|
|
} |
|
|
|
|
|
|
|
async function memberCountChannelCreate(message) { |
|
|
|
if (!message.member.hasPermission("ADMINISTRATOR")) { |
|
|
|
if (!message.member.permissions.has("ADMINISTRATOR")) { |
|
|
|
message.reply("you do not have admin permissions!"); |
|
|
|
return; |
|
|
|
} |
|
|
@ -615,7 +615,7 @@ async function roleInfo(message) { |
|
|
|
} |
|
|
|
|
|
|
|
async function addRole(message) { |
|
|
|
if (!message.member.hasPermission('ADMINISTRATOR')) { |
|
|
|
if (!message.member.permissions.has('ADMINISTRATOR')) { |
|
|
|
message.reply("you do not have adequate permissions!") |
|
|
|
return; |
|
|
|
} |
|
|
@ -684,7 +684,7 @@ async function addRole(message) { |
|
|
|
verificationEmbed.react('<a:anim_check:827985495295655988>'); |
|
|
|
verificationEmbed.react('<a:anim_cross:827990162113560576>'); |
|
|
|
const filter = (reaction, user) => { |
|
|
|
return ['anim_check', 'anim_cross'].includes(reaction.emoji.name) && message.guild.members.cache.get(user.id).hasPermission('ADMINISTRATOR') && !user.bot; |
|
|
|
return ['anim_check', 'anim_cross'].includes(reaction.emoji.name) && message.guild.members.cache.get(user.id).permissions.has('ADMINISTRATOR') && !user.bot; |
|
|
|
}; |
|
|
|
verificationEmbed.awaitReactions(filter, { max: 1 }) |
|
|
|
.then(userReaction => { |
|
|
@ -699,7 +699,7 @@ async function addRole(message) { |
|
|
|
} |
|
|
|
|
|
|
|
async function ban(message) { |
|
|
|
if (!message.member.hasPermission('BAN_MEMBERS')) { |
|
|
|
if (!message.member.permissions.has('BAN_MEMBERS')) { |
|
|
|
message.reply('you do not have ban permissions!') |
|
|
|
return; |
|
|
|
} |
|
|
@ -773,7 +773,7 @@ async function ban(message) { |
|
|
|
} |
|
|
|
|
|
|
|
async function kick(message) { |
|
|
|
if (!message.member.hasPermission('ADMINISTRATOR')) { |
|
|
|
if (!message.member.permissions.has('ADMINISTRATOR')) { |
|
|
|
message.reply('you do not have admin privileges!') |
|
|
|
return; |
|
|
|
} |
|
|
@ -828,7 +828,7 @@ async function kick(message) { |
|
|
|
verificationEmbed.react('<a:anim_check:827985495295655988>'); |
|
|
|
verificationEmbed.react('<a:anim_cross:827990162113560576>'); |
|
|
|
const filter = (reaction, user) => { |
|
|
|
return ['anim_check', 'anim_cross'].includes(reaction.emoji.name) && message.guild.members.cache.get(user.id).hasPermission('ADMINISTRATOR') && !user.bot; |
|
|
|
return ['anim_check', 'anim_cross'].includes(reaction.emoji.name) && message.guild.members.cache.get(user.id).permissions.has('ADMINISTRATOR') && !user.bot; |
|
|
|
}; |
|
|
|
verificationEmbed.awaitReactions(filter, { max: 1 }) |
|
|
|
.then(userReaction => { |
|
|
@ -1017,7 +1017,7 @@ async function roleRequest(message) { |
|
|
|
verificationEmbed.react('<a:anim_check:827985495295655988>'); |
|
|
|
verificationEmbed.react('<a:anim_cross:827990162113560576>'); |
|
|
|
const filter = (reaction, user) => { |
|
|
|
return ['anim_check', 'anim_cross'].includes(reaction.emoji.name) && message.guild.members.cache.get(user.id).hasPermission('ADMINISTRATOR') && !user.bot; |
|
|
|
return ['anim_check', 'anim_cross'].includes(reaction.emoji.name) && message.guild.members.cache.get(user.id).permissions.has('ADMINISTRATOR') && !user.bot; |
|
|
|
}; |
|
|
|
verificationEmbed.awaitReactions(filter, { max: 1 }) |
|
|
|
.then(userReaction => { |
|
|
@ -1032,7 +1032,7 @@ async function roleRequest(message) { |
|
|
|
} |
|
|
|
|
|
|
|
async function bulkDelete(message) { |
|
|
|
if (!message.member.hasPermission('ADMINISTRATOR')) { |
|
|
|
if (!message.member.permissions.has('ADMINISTRATOR')) { |
|
|
|
message.reply("you do not have high enough permissions!"); |
|
|
|
return; |
|
|
|
} |
|
|
|