more vyber works with "|" as delimiter

This commit is contained in:
Histmy 2021-09-24 19:28:53 +02:00
parent 404574bd74
commit 46b89bad6b
4 changed files with 6 additions and 6 deletions

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "denim_3001", "name": "denim_3001",
"version": "3001.26.1", "version": "3001.27.0",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "denim_3001", "name": "denim_3001",
"version": "3001.26.1", "version": "3001.27.0",
"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.26.1", "version": "3001.27.0",
"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

@ -58,7 +58,7 @@ module.exports = {
vyber: (arg: string) => { vyber: (arg: string) => {
if (!arg.length) return "co vole"; if (!arg.length) return "co vole";
const moznosti = arg.split(",").filter(m => m.length); const moznosti = arg.split(arg.indexOf("|") > -1 ? "|" : ",").filter(m => m.length);
return choose(moznosti) || "kokot"; return choose(moznosti) || "kokot";
} }
} }

View File

@ -15,8 +15,8 @@ const contactSpinkServer = async (akce: string, id: string, nick: string = "", a
.then(r => r.text()); .then(r => r.text());
}; };
const syncSpink = async () => { const syncSpink = () => {
await fetch("https://spinkacek.ga/api/spinkacky") fetch("https://spinkacek.ga/api/spinkacky")
.then(r => r.json() as Promise<Record<string, Spinkackar>>) .then(r => r.json() as Promise<Record<string, Spinkackar>>)
.then(d => { .then(d => {
const data = d.spinkacky; const data = d.spinkacky;