feat: random localizations

This commit is contained in:
TrèsAbhi committed 2024-03-07 18:27:05 -06:00
1 parent 796aca21cf
commit 3325536bbc
17 files changed
+423 -166

No files matched your search

+9 -2
View File
@@ -101,8 +101,15 @@ export const COMMANDS_RAW: Promise<CommandRegistry>[] = [
export const commands = Promise.allSettled(COMMANDS_RAW).then((rawCommands) => {
return rawCommands.reduce<Record<string, CommandRegistry>>(
(commands, registry) => {
if (registry.status === 'rejected') return commands;
(commands, registry, index) => {
if (registry.status === 'rejected') {
console.warn(
`Command ${index} failed to load; skipping...`,
registry.reason,
);
return commands;
}
if (isDev()) registry.value.command.setDefaultMemberPermissions(0);
return { ...commands, [registry.value.command.name]: registry.value };
},