@kotori-bot/core
Version:
Kotori Core
13 lines (12 loc) • 582 B
TypeScript
import { I18n } from '@kotori-bot/i18n';
import type { CommandArgType, Message, MessageMapping } from '../types';
import { MessageList } from '../components';
/**
* Create a format function base on i18n instance
* @param i18n - i18n instance
* @returns - format function
*/
export declare function formatFactory(i18n?: I18n): {
(template: string, data: Record<string, CommandArgType | undefined> | (CommandArgType | undefined)[]): string;
<T extends keyof MessageMapping>(template: string, data: (Message<T> | CommandArgType | undefined)[]): MessageList<T | "text">;
};