more update
This commit is contained in:
parent
7ca353fc7f
commit
aa33c5b0c4
2061
package-lock.json
generated
2061
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
12
package.json
12
package.json
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "denim_3001",
|
"name": "denim_3001",
|
||||||
"version": "3001.43.0",
|
"version": "3001.43.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/"
|
||||||
@ -14,18 +14,18 @@
|
|||||||
"author": "Histmy + det-fys",
|
"author": "Histmy + det-fys",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@discordjs/voice": "^0.11.0",
|
"@discordjs/voice": "^0.13.0",
|
||||||
"discord.js": "^14.3.0",
|
"discord.js": "^14.6.0",
|
||||||
"js-levenshtein": "^1.1.6",
|
"js-levenshtein": "^1.1.6",
|
||||||
"node-fetch": "^2.6.1",
|
"node-fetch": "^2.6.1",
|
||||||
"opusscript": "^0.0.8",
|
"opusscript": "^0.0.8",
|
||||||
"play-dl": "^1.9.5",
|
"play-dl": "^1.9.6",
|
||||||
"tweetnacl": "^1.0.3"
|
"tweetnacl": "^1.0.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^29.1.0",
|
"@types/jest": "^29.2.2",
|
||||||
"@types/js-levenshtein": "^1.1.1",
|
"@types/js-levenshtein": "^1.1.1",
|
||||||
"@types/node-fetch": "^2.6.2",
|
"@types/node-fetch": "^2.6.2",
|
||||||
"jest": "^29.1.1"
|
"jest": "^29.3.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { ActionRowBuilder, ButtonBuilder, ButtonStyle, ChannelType, Client, GatewayIntentBits, Message, Partials } from "discord.js";
|
import { ActionRowBuilder, ButtonBuilder, ButtonStyle, ChannelType, Client, ComponentType, GatewayIntentBits, Message, Partials } from "discord.js";
|
||||||
import { readdirSync } from "fs";
|
import { readdirSync } from "fs";
|
||||||
import { CUser, EventSOn, KomandNaExport, Komand, ListenerFunkce, Modul, SRecord, SuperListenerFunkce, CustomKomandy } from "./utils/types";
|
import { CUser, EventSOn, KomandNaExport, Komand, ListenerFunkce, Modul, SRecord, SuperListenerFunkce, CustomKomandy } from "./utils/types";
|
||||||
import { adminLog, getFirstArg, formatCas, loadEnv, oddiakritikovat, sortArr, log } from "./utils/utils.js";
|
import { adminLog, getFirstArg, formatCas, loadEnv, oddiakritikovat, sortArr, log } from "./utils/utils.js";
|
||||||
@ -187,7 +187,7 @@ client.on("messageCreate", async mes => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const zprava = await mes.channel.send({ content: "nemnel sy na misli:", components: [radek] });
|
const zprava = await mes.channel.send({ content: "nemnel sy na misli:", components: [radek] });
|
||||||
const collector = mes.channel.createMessageComponentCollector({ filter: i => i.message.id == zprava.id && mes.author.id == i.user.id, time: 18e4 });
|
const collector = mes.channel.createMessageComponentCollector<ComponentType.Button>({ filter: i => i.message.id == zprava.id && mes.author.id == i.user.id, time: 18e4 });
|
||||||
collector.on("collect", i => {
|
collector.on("collect", i => {
|
||||||
const lookupId = Number(i.customId);
|
const lookupId = Number(i.customId);
|
||||||
if (isNaN(lookupId)) return void mes.channel.send("neco nefunguje idk");
|
if (isNaN(lookupId)) return void mes.channel.send("neco nefunguje idk");
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
// Modul na komand "anketa"
|
// Modul na komand "anketa"
|
||||||
|
|
||||||
import { ActionRowBuilder, APIEmbed, APIEmbedField, ButtonBuilder, ButtonStyle, Message, MessageComponentInteraction } from "discord.js";
|
import { ActionRowBuilder, APIEmbed, APIEmbedField, ButtonBuilder, ButtonStyle, ComponentType, Message, MessageComponentInteraction } from "discord.js";
|
||||||
import { Modul } from "../utils/types";
|
import { Modul } from "../utils/types";
|
||||||
import { formatter } from "../utils/utils";
|
import { formatter } from "../utils/utils";
|
||||||
|
|
||||||
@ -73,7 +73,7 @@ const exp: Modul = {
|
|||||||
prepocitat();
|
prepocitat();
|
||||||
if (settings.immediateShow) embed.fields = x5fxd55;
|
if (settings.immediateShow) embed.fields = x5fxd55;
|
||||||
const zprava = await mes.channel.send({ embeds: [embed], components: [radek] });
|
const zprava = await mes.channel.send({ embeds: [embed], components: [radek] });
|
||||||
const collector = mes.channel.createMessageComponentCollector({ filter: i => i.message.id == zprava.id, time: settings.time * 1000 });
|
const collector = mes.channel.createMessageComponentCollector<ComponentType.Button>({ filter: i => i.message.id == zprava.id, time: settings.time * 1000 });
|
||||||
|
|
||||||
collector.on("collect", d => {
|
collector.on("collect", d => {
|
||||||
if (!(d.message instanceof Message)) return;
|
if (!(d.message instanceof Message)) return;
|
||||||
|
|||||||
@ -77,7 +77,8 @@ const exp: Modul = {
|
|||||||
if (!kju) return "nehraje nic";
|
if (!kju) return "nehraje nic";
|
||||||
|
|
||||||
return `tuto je kurentni repertoar:\n${kju.reduce((acc, cur, i) => {
|
return `tuto je kurentni repertoar:\n${kju.reduce((acc, cur, i) => {
|
||||||
return `${acc}\n${i ? `${i}. ${cur.name}` : `-- *${cur.name}* --`}`;
|
const jmeno = `${cur.name} (<${cur.url}>)`;
|
||||||
|
return `${acc}\n${i ? `${i}. ${jmeno}` : `-- *${jmeno}* --`}`;
|
||||||
}, "")}`;
|
}, "")}`;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
import { StreamType, VoiceConnection } from "@discordjs/voice";
|
import { StreamType, VoiceConnection } from "@discordjs/voice";
|
||||||
import { Client, ClientEvents, ClientPresenceStatusData, Message, MessageOptions, User } from "discord.js";
|
import { Client, ClientEvents, ClientPresenceStatusData, Message, MessageCreateOptions, MessagePayload, User } from "discord.js";
|
||||||
import { EventEmitter } from "events";
|
import { EventEmitter } from "events";
|
||||||
import { Readable } from "node:stream";
|
import { Readable } from "node:stream";
|
||||||
|
|
||||||
type OutputRunFunkce = string | MessageOptions | void;
|
type OutputRunFunkce = string | MessagePayload | MessageCreateOptions | void;
|
||||||
|
|
||||||
export type RunFunkce = (message: Message, argumenty: string) => OutputRunFunkce | Promise<OutputRunFunkce>;
|
export type RunFunkce = (message: Message, argumenty: string) => OutputRunFunkce | Promise<OutputRunFunkce>;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user