set context and integration types for slash commands
This commit is contained in:
parent
3988f45797
commit
1d44bac7ae
1 changed files with 7 additions and 1 deletions
|
@ -202,9 +202,15 @@ bot.once("ready", async () => {
|
||||||
type: command.type,
|
type: command.type,
|
||||||
description: command.helpText,
|
description: command.helpText,
|
||||||
options: options,
|
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)
|
if (command.type === Dysnomia.Constants.ApplicationCommandTypes.CHAT_INPUT)
|
||||||
formattedCommand.name = formattedCommand.name.toLowerCase();
|
formattedCommand.name = formattedCommand.name.toLowerCase();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue