From 46b89bad6b3bc4e838370940ddb1b8aa4cec81bf Mon Sep 17 00:00:00 2001 From: Histmy Date: Fri, 24 Sep 2021 19:28:53 +0200 Subject: [PATCH] more vyber works with "|" as delimiter --- package-lock.json | 4 ++-- package.json | 2 +- src/modules/komRNG.ts | 2 +- src/modules/spink.ts | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index b167e59..760eafd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "denim_3001", - "version": "3001.26.1", + "version": "3001.27.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "denim_3001", - "version": "3001.26.1", + "version": "3001.27.0", "license": "ISC", "dependencies": { "@discordjs/opus": "github:discordjs/opus", diff --git a/package.json b/package.json index 9e02e1b..7ac2b6d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "denim_3001", - "version": "3001.26.1", + "version": "3001.27.0", "description": "Toto je velmi kvalitní bot.", "repository": { "url": "https://github.com/Histmy/Denim-Bot/" diff --git a/src/modules/komRNG.ts b/src/modules/komRNG.ts index 3274ccb..7456dfc 100644 --- a/src/modules/komRNG.ts +++ b/src/modules/komRNG.ts @@ -58,7 +58,7 @@ module.exports = { vyber: (arg: string) => { 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"; } } diff --git a/src/modules/spink.ts b/src/modules/spink.ts index 816a142..003066d 100644 --- a/src/modules/spink.ts +++ b/src/modules/spink.ts @@ -15,8 +15,8 @@ const contactSpinkServer = async (akce: string, id: string, nick: string = "", a .then(r => r.text()); }; -const syncSpink = async () => { - await fetch("https://spinkacek.ga/api/spinkacky") +const syncSpink = () => { + fetch("https://spinkacek.ga/api/spinkacky") .then(r => r.json() as Promise>) .then(d => { const data = d.spinkacky;