Compare commits

...

3 Commits

Author SHA1 Message Date
70f224caed
anketa work again 2024-01-29 22:54:45 +01:00
e449ee1e62
slash commands not break denim again 2024-01-29 22:54:27 +01:00
cd83efa392
Vordinace i vícekrát za život bota 2024-01-29 22:31:02 +01:00
5 changed files with 14 additions and 6 deletions

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "denim_3001", "name": "denim_3001",
"version": "3001.58.0", "version": "3001.58.1",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "denim_3001", "name": "denim_3001",
"version": "3001.58.0", "version": "3001.58.1",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"@discordjs/voice": "^0.16.1", "@discordjs/voice": "^0.16.1",

View File

@ -1,6 +1,6 @@
{ {
"name": "denim_3001", "name": "denim_3001",
"version": "3001.58.0", "version": "3001.58.1",
"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/"

View File

@ -289,6 +289,13 @@ client.on("messageCreate", async mes => {
const komand = client.komandy[cmdName]; const komand = client.komandy[cmdName];
if (mes.channel.type == ChannelType.DM && komand?.DMUnsafe) return void mes.channel.send("tuten komand bohuzel v sz nefunkuje"); if (mes.channel.type == ChannelType.DM && komand?.DMUnsafe) return void mes.channel.send("tuten komand bohuzel v sz nefunkuje");
if (komand.slashRun) {
const nazev = `${prefix}${cmdName}`;
const id = client.slashCommandy[nazev];
return void mes.channel.send(`tuto ejenom sleh komand </${nazev}:${id}>`);
}
if (komand) return void runKomand(mes, komand, cmdName, celArgs); if (komand) return void runKomand(mes, komand, cmdName, celArgs);
// neměl jsi na mysli? // neměl jsi na mysli?

View File

@ -18,7 +18,7 @@ const exp: Modul = {
const opt = int.options; const opt = int.options;
const settings = { const settings = {
time: lookup<number>(opt, "cas") || 60, time: lookup<number>(opt, "cas") || 60,
immediateShow: lookup<boolean>(opt, "neprubezny"), immediateShow: !lookup<boolean>(opt, "neprubezny"),
listNames: lookup<boolean>(opt, "jmena") listNames: lookup<boolean>(opt, "jmena")
}; };
@ -28,7 +28,6 @@ const exp: Modul = {
return acc; return acc;
}, []); }, []);
// return await zbytek(settings, moznosti, int);
if (moznosti.length < 2) return "zadej alespo%n dve moznosti"; if (moznosti.length < 2) return "zadej alespo%n dve moznosti";
if (moznosti.length > 25) return "toje moc"; if (moznosti.length > 25) return "toje moc";
@ -68,7 +67,7 @@ const exp: Modul = {
prepocitat(); prepocitat();
if (settings.immediateShow) embed.fields = fildy; if (settings.immediateShow) embed.fields = fildy;
const zprava = await int.reply({ embeds: [embed], components: radky }); const zprava = await int.reply({ embeds: [embed], components: radky });
const collector = zprava.createMessageComponentCollector<ComponentType.Button>({ filter: i => i.message.id == zprava.id, time: settings.time * 1000 }); const collector = zprava.createMessageComponentCollector<ComponentType.Button>({ time: settings.time * 1000 });
collector.on("collect", d => { collector.on("collect", d => {
if (!(d.message instanceof Message)) return; if (!(d.message instanceof Message)) return;

View File

@ -57,6 +57,8 @@ async function urobit() {
if (!general) return log(new Error("general nenalezen")); if (!general) return log(new Error("general nenalezen"));
general.send(`<@&1123186280843444274> ${event.url}`); general.send(`<@&1123186280843444274> ${event.url}`);
naplanovat();
} }
const exp: Modul = { const exp: Modul = {