diff --git a/commands/debugDrop.js b/commands/debugDrop.js deleted file mode 100644 index 990ee07..0000000 --- a/commands/debugDrop.js +++ /dev/null @@ -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 - }); - - } -} \ No newline at end of file diff --git a/commands/setenabled.js b/commands/setenabled.js index 4170f8f..ff4b118 100644 --- a/commands/setenabled.js +++ b/commands/setenabled.js @@ -73,13 +73,5 @@ module.exports = { }); return; } - if (type === 'debug') { - interaction.editReply({ - content: 'Debug DEBUG', - ephemeral: true - }); - return; - } - } } \ No newline at end of file