Commands work even with uppercase

This commit is contained in:
Histmy 2021-09-04 12:54:45 +02:00
parent 2a991099ab
commit 489e46a17d
3 changed files with 4 additions and 4 deletions

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "denim_3001", "name": "denim_3001",
"version": "3001.22.0", "version": "3001.22.1",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "denim_3001", "name": "denim_3001",
"version": "3001.22.0", "version": "3001.22.1",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"@discordjs/opus": "github:discordjs/opus", "@discordjs/opus": "github:discordjs/opus",

View File

@ -1,6 +1,6 @@
{ {
"name": "denim_3001", "name": "denim_3001",
"version": "3001.22.0", "version": "3001.22.1",
"description": "Toto je velmi kvalitní bot.", "description": "Toto je velmi kvalitní bot.",
"repository": { "repository": {
"url": "https://github.com/Histmy/Denim-Bot/" "url": "https://github.com/Histmy/Denim-Bot/"

View File

@ -90,7 +90,7 @@ client.on("messageCreate", mes => {
if (mes_prefix.toLowerCase() !== prefix) return; if (mes_prefix.toLowerCase() !== prefix) return;
if (!komandSDiakritikou) return void mes.channel.send("coe voe"); if (!komandSDiakritikou) return void mes.channel.send("coe voe");
const komand = oddiakritikovat(komandSDiakritikou); const komand = oddiakritikovat(komandSDiakritikou).toLowerCase();
const celArgs = args.join(" "); const celArgs = args.join(" ");
const cmdName = aliasy[komand] ?? komand; const cmdName = aliasy[komand] ?? komand;
const cmd = komandy[cmdName]; const cmd = komandy[cmdName];