Skip to content

Commit deeeb33

Browse files
committed
refactor(commands): replace LocaleString with Locale type for consistency
1 parent dbf30b0 commit deeeb33

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/routes/commands.get.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ import { seconds } from '#utils/common';
66
import type { Command } from '@sapphire/framework';
77
import { Route } from '@sapphire/plugin-api';
88
import type { TFunction } from '@sapphire/plugin-i18next';
9-
import type { LocaleString } from 'discord.js';
9+
import type { Locale } from 'discord.js';
1010

1111
export class UserRoute extends Route {
1212
@ratelimit(seconds(2), 2)
1313
public run(request: Route.Request, response: Route.Response) {
1414
const { lang, category } = request.query;
1515
const commands = this.container.stores.get('commands');
16-
const language = getT(lang as LocaleString);
16+
const language = getT(lang as Locale);
1717
const filtered = (category ? commands.filter((cmd) => cmd.category === category) : commands).filter(
1818
(cmd) => (cmd as WolfCommand).permissionLevel < PermissionLevels.BotOwner
1919
);
@@ -25,6 +25,8 @@ export class UserRoute extends Route {
2525
const command = cmd as WolfCommand;
2626
return {
2727
category: command.category,
28+
subCategory: command.subCategory,
29+
alias: command.aliases,
2830
description: t(command.description),
2931
extendedHelp: t(command.detailedDescription, { prefix: process.env.CLIENT_PREFIX }),
3032
guarded: command.guarded,

0 commit comments

Comments
 (0)