diff --git a/src/utils/customCommands.ts b/src/utils/customCommands.ts index 1754433..3ad4a49 100644 --- a/src/utils/customCommands.ts +++ b/src/utils/customCommands.ts @@ -2,6 +2,7 @@ import { EventEmitter } from "events"; import { KomandNaExport, Komand, RunFunkce, SRecord } from "./types"; import { readFileSync, writeFileSync } from "fs"; import { join } from "path"; +import { oddiakritikovat } from "./utils"; const cesta = join(__dirname, "../../res/komandi.json"); const komandi: SRecord<{ text: string; owner: string; }> = JSON.parse(readFileSync(cesta).toString()); @@ -32,7 +33,7 @@ export const naucse: RunFunkce = (mes, arg) => { if (module.exports.realKomandy[args[0]] || komandi[args[0]]) return "tuten komand uz ale egzistuje"; if (!args.length) return "a co se mam jako naucit"; if (arg.length == 1) return "a co bich nato mnel rict????"; - komandi[args[0].toLowerCase()] = { text: args.splice(1).join(" "), owner: mes.author.id }; + komandi[oddiakritikovat(args[0].toLowerCase())] = { text: args.splice(1).join(" "), owner: mes.author.id }; save(); return "jo"; };