Cleanup some unused debug commands and arguments

This commit is contained in:
2022-09-16 23:08:50 +02:00
parent a55ce1b5ff
commit f211f4976f
2 changed files with 0 additions and 56 deletions

View File

@@ -1,48 +0,0 @@
const { SlashCommandBuilder } = require("discord.js");
const { Card, User } = require("../models");
const { customAlphabet } = require("nanoid");
module.exports = {
data: new SlashCommandBuilder()
.setName("debug_drop")
.setDescription("Drop a card")
.addIntegerOption((option) =>
option
.setName("id")
.setDescription("The id of the character to drop")
.setRequired(true)
),
permissionLevel: 2,
async execute(interaction) {
//get user id from database given the userID
const user = await User.findOne({
where: {
discordId: interaction.member.id
}
});
//create new card with the given character id, and the user id
const nanoid = customAlphabet('23456789ABCDEFGHJKLMNPRSTUVWXYZ',6); //Up to 887.503.681
const identifier = nanoid();
const existingCharacterCount = await Card.count({
where: {
characterId: interaction.options.getInteger("id")
}
});
const card = await Card.create({
characterId: interaction.options.getInteger("id"),
identifier: identifier,
quality: 1,
printNr: existingCharacterCount + 1,
userId: user.id
});
//reply with the new card id
interaction.reply({
content: `Dropped card ${card.id}`,
ephemeral: false
});
}
}

View File

@@ -73,13 +73,5 @@ module.exports = {
});
return;
}
if (type === 'debug') {
interaction.editReply({
content: 'Debug DEBUG',
ephemeral: true
});
return;
}
}
}