UNPKG

seyfert

Version:

The most advanced framework for discord bots

26 lines (25 loc) 1.06 kB
import type { FileLoaded } from '../commands/handler'; import { BaseHandler } from '../common'; import type { LocaleString } from '../types'; export declare class LangsHandler extends BaseHandler { values: Partial<Record<string, any>>; private __paths; filter: (path: string) => boolean; defaultLang?: string; aliases: [string, LocaleString[]][]; getLocale(locale: string): string; getKey(lang: string, message: string): string | undefined; get(userLocale: string): import("./router").__InternalParseLocale<import("..").DefaultLocale> & { get(locale?: string): import("..").DefaultLocale; }; load(dir: string): Promise<void>; parse(file: EventInstance): void; set(instances: EventInstance[]): void; reload(lang: string): Promise<false | Record<string, any> | null>; reloadAll(stopIfFail?: boolean): Promise<void>; onFile(_locale: string, file: FileLoaded<Record<string, any>>): Record<string, any> | false; } export type EventInstance = { name: string; file: Record<string, any>; };