From 454f2c42960859d7e192f638c23297046344ee89 Mon Sep 17 00:00:00 2001 From: Supositware Date: Wed, 12 Jun 2024 00:47:50 +0200 Subject: [PATCH] added default context and moved integration types to the command --- commands/utility/download.js | 1 + scripts/deploy-commands.js | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/commands/utility/download.js b/commands/utility/download.js index 7541db9f..3d755c7e 100644 --- a/commands/utility/download.js +++ b/commands/utility/download.js @@ -33,6 +33,7 @@ export default { .setRequired(false)), category: 'utility', alias: ['dl'], + integration_types: [0, 1], async execute(interaction, args, c) { client = c; diff --git a/scripts/deploy-commands.js b/scripts/deploy-commands.js index cd59c831..57f9d8c1 100644 --- a/scripts/deploy-commands.js +++ b/scripts/deploy-commands.js @@ -19,8 +19,9 @@ for (let i = 0; i < categoryPath.length; i++) { const filePath = path.join(commandsPath, file); const command = await import(filePath); - if (command.default.data.name === 'download') { - Object.assign(command.default.data, { integration_types: [0, 1] }); + if (command.default.integration_types) { + Object.assign(command.default.data, { integration_types: command.default.integration_types }); + Object.assign(command.default.data, { contexts: [0, 1, 2] }); } commands.push(command.default.data.toJSON()); }