novej komand "coje" a "uz nechi" fix
This commit is contained in:
parent
399945ae8a
commit
7d59b73064
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "denim_3001",
|
"name": "denim_3001",
|
||||||
"version": "3001.56.0",
|
"version": "3001.57.0",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "denim_3001",
|
"name": "denim_3001",
|
||||||
"version": "3001.56.0",
|
"version": "3001.57.0",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@discordjs/voice": "^0.16.1",
|
"@discordjs/voice": "^0.16.1",
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "denim_3001",
|
"name": "denim_3001",
|
||||||
"version": "3001.56.0",
|
"version": "3001.57.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/"
|
||||||
|
|||||||
@ -12,7 +12,6 @@ const exp: Modul = {
|
|||||||
more_komandy: {
|
more_komandy: {
|
||||||
|
|
||||||
anketa: {
|
anketa: {
|
||||||
arg: "([nastaveni]) moznosti...",
|
|
||||||
DMUnsafe: true,
|
DMUnsafe: true,
|
||||||
slashRun: async int => {
|
slashRun: async int => {
|
||||||
|
|
||||||
|
|||||||
@ -220,7 +220,9 @@ const exp: Modul = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
aliasy: (mes, arg) => {
|
aliasy: {
|
||||||
|
arg: "název komandu nebo jedno z aliasů",
|
||||||
|
run: (mes, arg) => {
|
||||||
const name = arg.toLowerCase();
|
const name = arg.toLowerCase();
|
||||||
const cmdName = client.aliasy[name] ?? name;
|
const cmdName = client.aliasy[name] ?? name;
|
||||||
|
|
||||||
@ -258,6 +260,41 @@ const exp: Modul = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
coje: {
|
||||||
|
arg: "název komandu nebo aliasu",
|
||||||
|
run: (_, arg) => {
|
||||||
|
const nazev = oddiakritikovat(arg.toLowerCase());
|
||||||
|
|
||||||
|
// Vestavěnej komand
|
||||||
|
const vZakladni = zakladniKomandy[nazev]?.run;
|
||||||
|
if (typeof vZakladni == "function")
|
||||||
|
return "tuto je slozitej kmenovej koamnd";
|
||||||
|
|
||||||
|
if (typeof vZakladni == "string")
|
||||||
|
return `tuto je kmenovej koamnd a povida "${vZakladni}"`;
|
||||||
|
|
||||||
|
// Vestavěnej alias
|
||||||
|
const vZakladniAlias = zakladniAliasy[nazev];
|
||||||
|
if (vZakladniAlias)
|
||||||
|
return `tuto je kmenovej alijaas na "${vZakladniAlias}"`;
|
||||||
|
|
||||||
|
// Vlastní komand
|
||||||
|
const vlastniKomand = customKomandy[nazev];
|
||||||
|
if (vlastniKomand) {
|
||||||
|
const jekod = vlastniKomand.text.startsWith("dj:");
|
||||||
|
const textZatim = `tuto je valstni koamnd <@${vlastniKomand.owner}> a ${jekod ? "tahle fukue" : "povida"}:\`\`\``;
|
||||||
|
return `${textZatim}${vlastniKomand.text.slice(0, 1997 - textZatim.length)}\`\`\``;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Vlastní alias
|
||||||
|
const vlastniAlias = customAliasy[nazev];
|
||||||
|
if (vlastniAlias)
|
||||||
|
return `tuto je vlastni alijaas <@${vlastniAlias.owner}> na "${vlastniAlias.cmd}"`;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
on_ready: () => {
|
on_ready: () => {
|
||||||
client = module.exports.client;
|
client = module.exports.client;
|
||||||
zakladniKomandy = client.komandy;
|
zakladniKomandy = client.komandy;
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
import { ChannelType, Message, MessageReaction } from "discord.js";
|
import { ChannelType, Message, MessageReaction } from "discord.js";
|
||||||
import { emouty } from "../utils/emotes";
|
import { emouty } from "../utils/emotes";
|
||||||
import { Modul, SRecord } from "../utils/types";
|
import { Modul, SRecord } from "../utils/types";
|
||||||
import { formatter, ping } from "../utils/utils";
|
import { formatter, ping, sendDM } from "../utils/utils";
|
||||||
|
|
||||||
const exp: Modul = {
|
const exp: Modul = {
|
||||||
more_komandy: {
|
more_komandy: {
|
||||||
@ -98,8 +98,8 @@ const exp: Modul = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setTimeout(async () => {
|
setTimeout(async () => {
|
||||||
for (let i = 0; i < 15; i++) {
|
for (let i = 0; i < 7; i++) {
|
||||||
await mes.author.send("uz?");
|
await sendDM(mes.author, "uz?");
|
||||||
}
|
}
|
||||||
}, cas * 1000);
|
}, cas * 1000);
|
||||||
|
|
||||||
|
|||||||
@ -126,6 +126,7 @@ const exp: Modul = {
|
|||||||
remove: {
|
remove: {
|
||||||
DMUnsafe: true,
|
DMUnsafe: true,
|
||||||
als: ["odebrat"],
|
als: ["odebrat"],
|
||||||
|
arg: "pořadový číslo věci, kterou odebrat",
|
||||||
run: (mes, arg) => {
|
run: (mes, arg) => {
|
||||||
const numero = Number(arg);
|
const numero = Number(arg);
|
||||||
if (isNaN(numero)) return "cokundo?";
|
if (isNaN(numero)) return "cokundo?";
|
||||||
@ -142,6 +143,7 @@ const exp: Modul = {
|
|||||||
|
|
||||||
seek: {
|
seek: {
|
||||||
DMUnsafe: true,
|
DMUnsafe: true,
|
||||||
|
arg: "na kolikátou sekundu přetočit",
|
||||||
run: (mes, arg) => {
|
run: (mes, arg) => {
|
||||||
const numero = Number(arg);
|
const numero = Number(arg);
|
||||||
if (isNaN(numero)) return "huh?";
|
if (isNaN(numero)) return "huh?";
|
||||||
|
|||||||
@ -157,6 +157,7 @@ const exp: Modul = {
|
|||||||
|
|
||||||
vstavacek: {
|
vstavacek: {
|
||||||
als: ["vstavcacek", "gm", "unspinkacek"],
|
als: ["vstavcacek", "gm", "unspinkacek"],
|
||||||
|
arg: "fejk (nepovinné)",
|
||||||
run: async (mes, arg) => {
|
run: async (mes, arg) => {
|
||||||
if (mes.author.bot) return emouty.sjeta;
|
if (mes.author.bot) return emouty.sjeta;
|
||||||
|
|
||||||
|
|||||||
@ -109,13 +109,14 @@ const exp: Modul = {
|
|||||||
if (pocet < 7) return false;
|
if (pocet < 7) return false;
|
||||||
|
|
||||||
(async () => {
|
(async () => {
|
||||||
if (mes.author.id == client.user?.id) return mes.channel.send("uz nechci");
|
if (mes.author.id == client.user?.id)
|
||||||
|
return mes.content != "uz nechci" ? mes.channel.send("uz nechci") : "";
|
||||||
const adminRole = mes.member?.roles.cache.find(r => r.name == "admin");
|
const adminRole = mes.member?.roles.cache.find(r => r.name == "admin");
|
||||||
if (adminRole) {
|
if (adminRole) {
|
||||||
await mes.member?.roles.remove(adminRole).catch(e => log("nejde odebrat admin", e));
|
await mes.member?.roles.remove(adminRole).catch(e => log(mes.author.displayName, "nejde odebrat admin", e));
|
||||||
}
|
}
|
||||||
|
|
||||||
await mes.member?.timeout(60_000, "spamer zasranej").catch(e => log("nejde timeoutnout zmrd", e));
|
await mes.member?.timeout(60_000, "spamer zasranej").catch(e => log(mes.author.displayName, "nejde timeoutnout zmrd", e));
|
||||||
if (adminRole) setTimeout(() => {
|
if (adminRole) setTimeout(() => {
|
||||||
mes.member?.roles.add(adminRole);
|
mes.member?.roles.add(adminRole);
|
||||||
}, 60_000);
|
}, 60_000);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user