Fix linting issues
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Ethan Lane 2024-01-11 18:11:15 +00:00
parent 05ba8c4b8e
commit daaa55cd72
3 changed files with 13 additions and 13 deletions

View file

@ -23,7 +23,7 @@ const requiredConfigs: string[] = [
"DB_SYNC",
"DB_LOGGING",
"EXPRESS_PORT",
]
];
requiredConfigs.forEach(config => {
if (!process.env[config]) {

View file

@ -10,41 +10,41 @@ export default class Give extends Command {
super();
this.CommandBuilder = new SlashCommandBuilder()
.setName('give')
.setDescription('Give a user a card manually, in case bot breaks')
.setName("give")
.setDescription("Give a user a card manually, in case bot breaks")
.setDefaultMemberPermissions(PermissionsBitField.Flags.Administrator)
.addStringOption(x =>
x
.setName('cardnumber')
.setDescription('G')
.setName("cardnumber")
.setDescription("G")
.setRequired(true))
.addUserOption(x =>
x
.setName('user')
.setName("user")
.setDescription("The user to give the card to")
.setRequired(true));
}
public override async execute(interaction: CommandInteraction<CacheType>) {
if (!CoreClient.AllowDrops) {
await interaction.reply('Bot is currently syncing, please wait until its done.');
await interaction.reply("Bot is currently syncing, please wait until its done.");
return;
}
if (await Config.GetValue('safemode') == "true") {
await interaction.reply('Safe Mode has been activated, please resync to continue.');
if (await Config.GetValue("safemode") == "true") {
await interaction.reply("Safe Mode has been activated, please resync to continue.");
return;
}
const whitelistedUsers = process.env.BOT_ADMINS!.split(',');
const whitelistedUsers = process.env.BOT_ADMINS!.split(",");
if (!whitelistedUsers.find(x => x == interaction.user.id)) {
await interaction.reply("Only whitelisted users can use this command.");
return;
}
const cardNumber = interaction.options.get('cardnumber', true);
const user = interaction.options.getUser('user', true);
const cardNumber = interaction.options.get("cardnumber", true);
const user = interaction.options.getUser("user", true);
const card = CardDropHelperMetadata.GetCardByCardNumber(cardNumber.value!.toString());

View file

@ -55,7 +55,7 @@ export default class CardDropHelperMetadata {
return card;
}
public static GenerateDropEmbed(drop: DropResult, quantityClaimed: Number, imageFileName: string): EmbedBuilder {
public static GenerateDropEmbed(drop: DropResult, quantityClaimed: number, imageFileName: string): EmbedBuilder {
let description = "";
description += `Series: ${drop.series.name}\n`;
description += `Claimed: ${quantityClaimed}\n`;