bump libs
migrate to typescript 6 remove ytdl feature
This commit is contained in:
+4
-11
@@ -1,6 +1,6 @@
|
||||
import "dotenv/config";
|
||||
import {Environment} from "./common/environment";
|
||||
import {TelegramBot, User} from "typescript-telegram-bot-api";
|
||||
import {BotCommand, TelegramBot, User} from "typescript-telegram-bot-api";
|
||||
import {Command} from "./base/command";
|
||||
import {
|
||||
delay,
|
||||
@@ -67,7 +67,6 @@ import {GeminiGetModel} from "./commands/gemini-get-model";
|
||||
import {GeminiSetModel} from "./commands/gemini-set-model";
|
||||
import {Debug} from "./commands/debug";
|
||||
import {GeminiGenerateImage} from "./commands/gemini-generate-image";
|
||||
import {YouTubeDownload} from "./commands/youtube-download";
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import {setInterval} from "node:timers";
|
||||
@@ -79,8 +78,6 @@ import {OpenAISetModel} from "./commands/openai-set-model";
|
||||
import {Info} from "./commands/info";
|
||||
import {OpenAIGenImage} from "./commands/openai-gen-image";
|
||||
import {clearUpFolderFromOldFiles} from "./util/files";
|
||||
import {DownloadYtVideo} from "./callback_commands/download-yt-video";
|
||||
import {YtInfo} from "./callback_commands/yt-info";
|
||||
import {AdminsList} from "./commands/admins-list";
|
||||
import {ExportDb} from "./commands/export-db";
|
||||
|
||||
@@ -106,7 +103,7 @@ export const ollama = new Ollama({
|
||||
|
||||
export const ollamaRequests: OllamaRequest[] = [];
|
||||
|
||||
export function getOllamaRequest(uuid: string): OllamaRequest | null {
|
||||
export function getOllamaRequest(uuid: string): OllamaRequest | undefined {
|
||||
return ollamaRequests.find(r => r.uuid === uuid);
|
||||
}
|
||||
|
||||
@@ -169,8 +166,6 @@ export const commands: Command[] = [
|
||||
|
||||
new Shutdown(),
|
||||
new Leave(),
|
||||
|
||||
new YouTubeDownload()
|
||||
];
|
||||
|
||||
if (Environment.ENABLE_UNSAFE_EVAL) {
|
||||
@@ -179,8 +174,6 @@ if (Environment.ENABLE_UNSAFE_EVAL) {
|
||||
|
||||
export const callbackCommands: CallbackCommand[] = [
|
||||
new OllamaCancel(),
|
||||
new DownloadYtVideo(),
|
||||
new YtInfo()
|
||||
];
|
||||
|
||||
if (Environment.OLLAMA_ADDRESS && Environment.OLLAMA_MODEL) {
|
||||
@@ -288,10 +281,10 @@ async function main() {
|
||||
return cmd.title && cmd.title.startsWith("/") && cmd.title.split(" ").length === 1 && cmd.description;
|
||||
}).map(cmd => {
|
||||
return {
|
||||
command: cmd.title.toLowerCase(),
|
||||
command: cmd.title?.toLowerCase() || "",
|
||||
description: cmd.description,
|
||||
};
|
||||
});
|
||||
}) as BotCommand[];
|
||||
|
||||
try {
|
||||
const results = await Promise.all(
|
||||
|
||||
Reference in New Issue
Block a user