mirror of
https://github.com/arthur-pbty/bot-discord-coins.git
synced 2026-06-03 23:36:29 +02:00
Update Permcheck
This commit is contained in:
@@ -9,12 +9,13 @@ module.exports = {
|
||||
permission: 0,
|
||||
|
||||
async execute(message, args, client) {
|
||||
if (!interaction.guild.channels.cache.permissionsFor(interaction.user).has(PermissionFlagsBits.BanMembers) && !client.config.owners.includes(interaction.user.id)) {
|
||||
const authorPerms = message.channel.permissionsFor(message.author)
|
||||
if ((!authorPerms || !authorPerms.has(PermissionFlagsBits.banMembers)) && !client.config.owners.includes(message.author.id)) {
|
||||
return message.reply({
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setTitle('Erreur')
|
||||
.setDescription('❌ Vous n\'avez pas les permissions pour bannir.')
|
||||
.setDescription('❌ Vous n\'avez pas les permissions pour expulser.')
|
||||
.setColor(await embedColor(message.author.id, message.guild.id))
|
||||
.setTimestamp()
|
||||
.setFooter({ text: `Demandé par ${message.author.tag}`, iconURL: message.author.displayAvatarURL() })
|
||||
|
||||
@@ -9,7 +9,8 @@ module.exports = {
|
||||
permission: 0,
|
||||
|
||||
async execute(message, args, client) {
|
||||
if (!interaction.guild.channels.cache.permissionsFor(interaction.user).has(PermissionFlagsBits.KickMembers) && !client.config.owners.includes(interaction.user.id)) {
|
||||
const authorPerms = message.channel.permissionsFor(message.author)
|
||||
if ((!authorPerms || !authorPerms.has(PermissionFlagsBits.kickMembers)) && !client.config.owners.includes(message.author.id)) {
|
||||
return message.reply({
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
|
||||
Reference in New Issue
Block a user