LangsHandler
Signature
export declare class LangsHandler extends BaseHandlerPrivate types
LangFileResultTypeAlias
type LangFileResult = { file: Record<string, any>; locale: string;} | false;Properties
8Methods
9Properties
values: Partial<Record<string, any>>;private __paths;filter: (path: string) => boolean;Filters a file path.
Parameters
path- The path to filter.
Returns
`true` if the path passes the filter, otherwise `false`.
defaultLang?: string;preferGuildLocale: boolean;aliases: [ string, LocaleString[]][];onReload?: (locale: string, value: Record<string, any>) => void;private applyParsedFile;Methods
getLocale(locale: string): string;getKey(lang: string, message: string): string | undefined;get(userLocale: string): SeyfertLocale;load(dir: string): Promise<void>;parse(file: LangInstance): void | Promise<void>;set(instances: LangInstance[]): void;reload(lang: string): Promise<any>;reloadAll(stopIfFail?: boolean): Promise<void>;onFile(locale: string, { file, name, path }: LangInstance): Awaitable<LangFileResult>;