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",
|
"name": "denim_3001",
|
||||||
"version": "3001.25.1",
|
"version": "3001.26.0",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "denim_3001",
|
"name": "denim_3001",
|
||||||
"version": "3001.25.1",
|
"version": "3001.26.0",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@discordjs/opus": "github:discordjs/opus",
|
"@discordjs/opus": "github:discordjs/opus",
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "denim_3001",
|
"name": "denim_3001",
|
||||||
"version": "3001.25.1",
|
"version": "3001.26.0",
|
||||||
"description": "Toto je velmi kvalitní bot.",
|
"description": "Toto je velmi kvalitní bot.",
|
||||||
"repository": {
|
"repository": {
|
||||||
"url": "https://github.com/Histmy/Denim-Bot/"
|
"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 rand = (max: number) => Math.floor(Math.random() * max);
|
||||||
|
|
||||||
|
const choose = (arr: any[]) => arr[rand(arr.length)];
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
more_komandy: {
|
more_komandy: {
|
||||||
|
|
||||||
vtip: {
|
vtip: {
|
||||||
als: ["ftip"],
|
als: ["ftip"],
|
||||||
run: () => ftipy[rand(ftipy.length)]
|
run: () => choose(ftipy)
|
||||||
},
|
},
|
||||||
|
|
||||||
kam: () => mista[rand(mista.length)],
|
kam: () => choose(mista),
|
||||||
|
|
||||||
je: {
|
je: {
|
||||||
cd: 1800,
|
cd: 1800,
|
||||||
@ -51,7 +53,13 @@ module.exports = {
|
|||||||
|
|
||||||
uz: {
|
uz: {
|
||||||
als: ["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