3001.26
new choose func in 'komRNG' added more vyber
This commit is contained in:
parent
76083621d5
commit
52e159ad34
4
package-lock.json
generated
4
package-lock.json
generated
@ -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",
|
||||
|
||||
@ -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/"
|
||||
|
||||
@ -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";
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user