From fdff2960a33a8c056323834506e25eea34bdda93 Mon Sep 17 00:00:00 2001 From: derpystuff <3515180-derpystuff@users.noreply.gitlab.com> Date: Tue, 16 Apr 2024 21:47:22 +0200 Subject: [PATCH] remove modaltest --- commands/interaction/slash/modal.js | 46 ----------------------------- 1 file changed, 46 deletions(-) delete mode 100644 commands/interaction/slash/modal.js diff --git a/commands/interaction/slash/modal.js b/commands/interaction/slash/modal.js deleted file mode 100644 index f422dbc..0000000 --- a/commands/interaction/slash/modal.js +++ /dev/null @@ -1,46 +0,0 @@ -const { Constants } = require('detritus-client'); -const { InteractionCallbackTypes } = Constants; - -const { createEmbed } = require('../../../labscore/utils/embed'); -const { iconPill, codeblock } = require('../../../labscore/utils/markdown'); -const { MessageFlags } = require('detritus-client/lib/constants'); -const { InteractionModal } = require('detritus-client/lib/utils'); - -module.exports = { - description: 'modal command', - name: 'modal', - guildIds: ["1116074561734197270","409840884713127956"], - run: async (context, args) => { - - - const modal = new InteractionModal({ - timeout: 5 * 60 * 1000, // 5 mins, (default is 10 minutes) - title: 'My Cool Questionaire!', - run: (modalContext, args) => { - // args will use the defined customId in the text inputs (args.birds, args.cats) - return modalContext.createMessage(`${args.birds}, ${args.cats}`); - }, - onTimeout: () => { - return context.createMessage('Answer my questions faster next time please'); - }, - }); - - modal.createInputText({ - customId: 'birds', - label: 'Do you like birds?', - maxLength: 120, - minLength: 2, - required: true, - }); - - modal.createInputText({ - customId: 'cats', - label: 'Do you like cats?', - maxLength: 120, - minLength: 2, - required: true, - }); - - return context.respond(modal); - }, -}; \ No newline at end of file