From 1d44bac7ae6fdb3bd26bfcbf5b37f58fc682a032 Mon Sep 17 00:00:00 2001 From: Cynthia Foxwell Date: Fri, 17 May 2024 15:22:31 -0600 Subject: [PATCH] set context and integration types for slash commands --- src/index.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 83cb4b1..99d12bc 100644 --- a/src/index.js +++ b/src/index.js @@ -202,9 +202,15 @@ bot.once("ready", async () => { type: command.type, description: command.helpText, options: options, - dm_permission: !command.guildOnly, + integration_types: [0], + contexts: [0], }; + if (!command.guildOnly) { + formattedCommand.integration_types.push(1); + formattedCommand.contexts.push(1, 2); + } + if (command.type === Dysnomia.Constants.ApplicationCommandTypes.CHAT_INPUT) formattedCommand.name = formattedCommand.name.toLowerCase();