feat: eligible command

This commit is contained in:
TresAbhi committed 2023-06-04 00:01:10 +00:00
1 parent 1d0b428921
commit 804fa58d27
13 files changed
+219 -23

No files matched your search

+13 -5
View File
@@ -58,11 +58,19 @@ try {
console.log(`Successfully refreshed ${publicData.length} public command(s).`);
console.log(`Refreshing ${guildCommands.length} guild command(s).`);
const guildData = (await rest.put(
Routes.applicationGuildCommands(getClientId(), discord.sklld_guild_id),
{ body: guildCommands },
)) as RESTPostAPIChatInputApplicationCommandsJSONBody[];
console.log(`Successfully refreshed ${guildData.length} guild command(s).`);
const guildData = [
...((await rest.put(
Routes.applicationGuildCommands(getClientId(), discord.sklld_guild_id),
{ body: guildCommands },
)) as RESTPostAPIChatInputApplicationCommandsJSONBody[]),
...((await rest.put(
Routes.applicationGuildCommands(getClientId(), discord.tres_guild_id),
{ body: guildCommands },
)) as RESTPostAPIChatInputApplicationCommandsJSONBody[]),
];
console.log(
`Successfully refreshed ${guildData.length / 2} guild command(s).`,
);
} catch (error) {
console.error(error);
}