Skip to content

Commit

Permalink
linty mcLint
Browse files Browse the repository at this point in the history
  • Loading branch information
IThundxr committed Dec 28, 2023
1 parent f64081d commit c43be80
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions src/webserver/banshare.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,25 @@ import {
ModalBuilder,
ModalActionRowComponentBuilder,
TextInputBuilder,
PermissionsBitField
PermissionsBitField,
} from 'discord.js';
import { Button } from '../handlers/button.handler';

const banButton = new Button(
'ban',
async (interaction, data: { userId: string }) => {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
// .has exists, just ts doesnt believe it
if (!interaction.member?.permissions.has(PermissionsBitField.Flags.BanMembers)) {
return await interaction.reply({content: "You do not have permission to ban this user", ephemeral: true})
if (
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
!interaction.member?.permissions.has(
PermissionsBitField.Flags.BanMembers
)
) {
return await interaction.reply({
content: 'You do not have permission to ban this user',
ephemeral: true,
});
}
const reason =
'simulated banshare: ' +
Expand Down

0 comments on commit c43be80

Please sign in to comment.