set context and integration types for slash commands

This commit is contained in:
Cynthia Foxwell 2024-05-17 15:22:31 -06:00
parent 3988f45797
commit 1d44bac7ae
1 changed files with 7 additions and 1 deletions

View File

@ -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();