more vyber works with "|" as delimiter
This commit is contained in:
parent
404574bd74
commit
46b89bad6b
4
package-lock.json
generated
4
package-lock.json
generated
@ -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",
|
||||
|
||||
@ -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/"
|
||||
|
||||
@ -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";
|
||||
}
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user