Skip to content

Commit

Permalink
fix(ApplicationCommandRegistry): fetch localizations for commands
Browse files Browse the repository at this point in the history
  • Loading branch information
vladfrangu committed May 16, 2022
1 parent 0fbb4ff commit 1f76366
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/utils/application-commands/getNeededParameters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export async function getNeededRegistryParameters() {
const { client } = container;

const applicationCommands = client.application!.commands;
const globalCommands = await applicationCommands.fetch();
const globalCommands = await applicationCommands.fetch({ withLocalizations: true });
const guildCommands = await fetchGuildCommands(applicationCommands);

return {
Expand All @@ -20,7 +20,7 @@ async function fetchGuildCommands(commands: ApplicationCommandManager) {

for (const [guildId, guild] of commands.client.guilds.cache.entries()) {
try {
const guildCommands = await commands.fetch({ guildId });
const guildCommands = await commands.fetch({ guildId, withLocalizations: true });
map.set(guildId, guildCommands);
} catch (err) {
if (!container.client.options.preventFailedToFetchLogForGuildIds?.includes(guildId)) {
Expand Down

0 comments on commit 1f76366

Please sign in to comment.