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",
"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",

View File

@ -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/"

View File

@ -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";
}
}

View File

@ -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<Record<string, Spinkackar>>)
.then(d => {
const data = d.spinkacky;