stalkee
Version:
a Telegram bot who can send voice messages via inline mode added by admin with sorting them by numbers of uses
17 lines (16 loc) • 693 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.i18n = void 0;
const path_1 = __importDefault(require("path"));
const fs_1 = __importDefault(require("fs"));
const yaml_1 = __importDefault(require("yaml"));
const config_1 = require("./config");
const i18n = {};
exports.i18n = i18n;
for (const lang of config_1.config.bot.locales) {
const source = fs_1.default.readFileSync(path_1.default.resolve(__dirname, `../../res/i18n/${lang}.yaml`), 'utf8');
i18n[lang] = yaml_1.default.parse(source);
}