new choose func in 'komRNG'
added more vyber
This commit is contained in:
Histmy 2021-09-20 21:38:04 +02:00
parent 76083621d5
commit 52e159ad34
3 changed files with 14 additions and 6 deletions

4
package-lock.json generated
View File

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

View File

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

View File

@ -6,15 +6,17 @@ const uz = ["ne", "jeste ne", "jiz brzy", "za chvili", "vubec", "nikdy", "za dlo
const rand = (max: number) => Math.floor(Math.random() * max);
const choose = (arr: any[]) => arr[rand(arr.length)];
module.exports = {
more_komandy: {
vtip: {
als: ["ftip"],
run: () => ftipy[rand(ftipy.length)]
run: () => choose(ftipy)
},
kam: () => mista[rand(mista.length)],
kam: () => choose(mista),
je: {
cd: 1800,
@ -51,7 +53,13 @@ module.exports = {
uz: {
als: ["uz?"],
run: () => uz[rand(uz.length)]
run: () => choose(uz)
},
vyber: (arg: string) => {
if (!arg.length) return "co vole";
const moznosti = arg.split(",").filter(m => m.length);
return choose(moznosti) || "kokot";
}
}
};