bump libs

migrate to typescript 6
remove ytdl feature
This commit is contained in:
2026-05-01 07:05:17 +03:00
parent ac51702f00
commit 13b41c3026
56 changed files with 1069 additions and 1857 deletions
+11 -9
View File
@@ -18,14 +18,14 @@ export class GeminiGenerateImage extends Command {
async execute(msg: Message, match?: RegExpExecArray): Promise<void> {
console.log("match", match);
const prompt = match?.[3];
const prompt = match?.[3] || "";
return this.executeGenImage(msg, prompt);
}
async executeGenImage(msg: Message, text: string): Promise<void> {
if (!text || text.trim().length === 0) return;
if (!text || !text.trim().length) return;
let waitMessage: Message;
let waitMessage: Message | null = null;
try {
waitMessage = await replyToMessage({
@@ -47,14 +47,16 @@ export class GeminiGenerateImage extends Command {
console.log(`Output ${index + 1}: ${output}`);
}
});
} catch (e) {
} catch (e: any) {
logError(e);
await replyToMessage({
message: waitMessage,
text: `Произошла ошибка!\n${e.toString()}`,
link_preview_options: {is_disabled: true}
}).catch(logError);
if (waitMessage) {
await replyToMessage({
message: waitMessage,
text: `Произошла ошибка!\n${e.toString()}`,
link_preview_options: {is_disabled: true}
}).catch(logError);
}
}
}
}