Skip to content

Commit

Permalink
fix: change permission name in missing perms message
Browse files Browse the repository at this point in the history
  • Loading branch information
woozystudio committed Jun 16, 2024
1 parent b0e2e07 commit d605558
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion commands/moderation/TempBanCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export default class TempBan extends Command {
const targetPermissions = member.permissions;
const hasHigherPermissions = targetPermissions.has(PermissionFlagsBits.Administrator) || (botPermissions?.has(PermissionFlagsBits.Administrator) && targetPermissions.has(botPermissions.bitfield));

if (!botPermissions?.has(new TempBan(this.client).default_member_permissions)) return await interaction.reply({ content: `${inlineCode(`❌`)} I don't have sufficient permissions to perform this action. Missing Permissions: ${inlineCode(`ManageChannels`)}`, ephemeral: false });
if (!botPermissions?.has(new TempBan(this.client).default_member_permissions)) return await interaction.reply({ content: `${inlineCode(`❌`)} I don't have sufficient permissions to perform this action. Missing Permissions: ${inlineCode(`BanMembers`)}`, ephemeral: false });
if (!member) return await interaction.reply({ embeds: [new ErrorEmbed("The user mentioned is no longer within the server.")], ephemeral: true });
if (interaction.user.id === member.id) return await interaction.reply({ embeds: [new ErrorEmbed("You cannot execute the tempban action on yourself.")], ephemeral: true });
if (member.permissions.has(PermissionFlagsBits.Administrator)) return await interaction.reply({ embeds: [new ErrorEmbed("I cannot tempban a user with administrator permissions.")], ephemeral: true });
Expand Down

0 comments on commit d605558

Please sign in to comment.