[FEATURE] Add AI-based /ask command (complementing #54) #56

Merged
lucmsilva651 merged 14 commits from ai-features into main 2025-06-28 19:22:15 +00:00
13 changed files with 733 additions and 35 deletions

View file

@ -4,4 +4,5 @@ npm-debug.log
.gitignore .gitignore
.env .env
*.md *.md
!README.md !README.md
ollama/

View file

@ -5,6 +5,11 @@ botSource = "https://github.com/ABOCN/TelegramBot"
# insert token here # insert token here
botToken = "" botToken = ""
# ai features
ollamaEnabled = false
# ollamaApi = "http://ollama:11434"
# handlerTimeout = "600_000" # set higher if you expect to download larger models
# misc (botAdmins isnt a array here!) # misc (botAdmins isnt a array here!)
maxRetries = 9999 maxRetries = 9999
botAdmins = 00000000, 00000000, 00000000 botAdmins = 00000000, 00000000, 00000000

8
.gitignore vendored
View file

@ -144,4 +144,10 @@ yt-dlp
ffmpeg ffmpeg
# Bun # Bun
bun.lock* bun.lock*
# Ollama
ollama/
# Docker
docker-compose.yml

View file

@ -10,12 +10,6 @@ Kowalski is a a simple Telegram bot made in Node.js.
- You can find Kowalski at [@KowalskiNodeBot](https://t.me/KowalskiNodeBot) on Telegram. - You can find Kowalski at [@KowalskiNodeBot](https://t.me/KowalskiNodeBot) on Telegram.
## Translations
<a href="https://weblate.librecloud.cc/engage/kowalski/">
<img src="https://weblate.librecloud.cc/widget/kowalski/multi-auto.svg" alt="Translation status" />
</a>
## Self-host requirements ## Self-host requirements
> [!IMPORTANT] > [!IMPORTANT]
@ -26,6 +20,11 @@ Kowalski is a a simple Telegram bot made in Node.js.
- FFmpeg (only for the `/yt` command) - FFmpeg (only for the `/yt` command)
- Docker and Docker Compose (only required for Docker setup) - Docker and Docker Compose (only required for Docker setup)
### AI Requirements
- High-end CPU *or* GPU (~ 6GB vRAM)
- If using CPU, enough RAM to load the models (~6GB w/ defaults)
## Running locally (non-Docker setup) ## Running locally (non-Docker setup)
First, clone the repo with Git: First, clone the repo with Git:
@ -55,9 +54,28 @@ You can also run Kowalski using Docker, which simplifies the setup process. Make
### Using Docker Compose ### Using Docker Compose
1. **Make sure to setup your `.env` file first!** 1. **Copy compose file**
2. **Run the container** _Without AI (Ollama)_
```bash
mv docker-compose.yml.example docker-compose.yml
```
_With AI (Ollama)_
```bash
mv docker-compose.yml.ai.example docker-compose.yml
```
2. **Make sure to setup your `.env` file first!**
> [!TIP]
> If you intend to setup AI, the defaults for Docker are already included (just uncomment) and don't need to be changed.
>
> Further setup may be needed for GPUs. See the Ollama documentation for more.
3. **Run the container**
```bash ```bash
docker compose up -d docker compose up -d
@ -81,6 +99,9 @@ If you prefer to use Docker directly, you can use these instructions instead.
docker run -d --name kowalski --restart unless-stopped -v $(pwd)/.env:/usr/src/app/.env:ro kowalski docker run -d --name kowalski --restart unless-stopped -v $(pwd)/.env:/usr/src/app/.env:ro kowalski
``` ```
> [!NOTE]
> You must setup Ollama on your own if you would like to use AI features.
## .env Functions ## .env Functions
> [!IMPORTANT] > [!IMPORTANT]
@ -90,6 +111,9 @@ If you prefer to use Docker directly, you can use these instructions instead.
- **botPrivacy**: Put the link to your bot privacy policy. - **botPrivacy**: Put the link to your bot privacy policy.
- **maxRetries**: Maximum number of retries for a failing command on Kowalski. Default is 5. If the limit is hit, the bot will crash past this number. - **maxRetries**: Maximum number of retries for a failing command on Kowalski. Default is 5. If the limit is hit, the bot will crash past this number.
- **botToken**: Put your bot token that you created at [@BotFather](https://t.me/botfather). - **botToken**: Put your bot token that you created at [@BotFather](https://t.me/botfather).
- **ollamaEnabled** (optional): Enables/disables AI features
- **ollamaApi** (optional): Ollama API endpoint for various AI features, will be disabled if not set
- **handlerTimeout** (default: `600_000`): How long handlers will wait before timing out. Set this high if using large AI models.
- **botAdmins**: Put the ID of the people responsible for managing the bot. They can use some administrative + exclusive commands on any group. - **botAdmins**: Put the ID of the people responsible for managing the bot. They can use some administrative + exclusive commands on any group.
- **lastKey**: Last.fm API key, for use on `lastfm.js` functions, like see who is listening to what song and etc. - **lastKey**: Last.fm API key, for use on `lastfm.js` functions, like see who is listening to what song and etc.
- **weatherKey**: Weather.com API key, used for the `/weather` command. - **weatherKey**: Weather.com API key, used for the `/weather` command.
@ -106,6 +130,12 @@ If you prefer to use Docker directly, you can use these instructions instead.
chmod +x src/plugins/yt-dlp/yt-dlp chmod +x src/plugins/yt-dlp/yt-dlp
``` ```
### AI
**Q:** How can I disable AI features?
**A:** AI features are disabled by default, unless you have set `ollamaEnabled` to `true` in your `.env` file. Set it back to `false` to disable.
## Contributors ## Contributors
<a href="https://github.com/abocn/TelegramBot/graphs/contributors"> <a href="https://github.com/abocn/TelegramBot/graphs/contributors">

View file

@ -0,0 +1,15 @@
services:
kowalski:
build: .
container_name: kowalski
restart: unless-stopped
volumes:
- ./.env:/usr/src/app/.env:ro
environment:
- NODE_ENV=production
ollama:
image: ollama/ollama
container_name: kowalski-ollama
restart: unless-stopped
volumes:
- ./ollama:/root/.ollama

View file

@ -6,4 +6,4 @@ services:
volumes: volumes:
- ./.env:/usr/src/app/.env:ro - ./.env:/usr/src/app/.env:ro
environment: environment:
- NODE_ENV=production - NODE_ENV=production

View file

@ -4,6 +4,7 @@ import fs from 'fs';
import { isOnSpamWatch } from './spamwatch/spamwatch'; import { isOnSpamWatch } from './spamwatch/spamwatch';
import '@dotenvx/dotenvx'; import '@dotenvx/dotenvx';
import './plugins/ytDlpWrapper'; import './plugins/ytDlpWrapper';
import { preChecks } from './commands/ai';
// Ensures bot token is set, and not default value // Ensures bot token is set, and not default value
if (!process.env.botToken || process.env.botToken === 'InsertYourBotTokenHere') { if (!process.env.botToken || process.env.botToken === 'InsertYourBotTokenHere') {
@ -11,7 +12,17 @@ if (!process.env.botToken || process.env.botToken === 'InsertYourBotTokenHere')
process.exit(1) process.exit(1)
} }
const bot = new Telegraf(process.env.botToken); // Detect AI and run pre-checks
if (process.env.ollamaEnabled === "true") {
if (!(await preChecks())) {
process.exit(1)
}
}
const bot = new Telegraf(
process.env.botToken,
{ handlerTimeout: Number(process.env.handlerTimeout) || 600_000 }
);
const maxRetries = process.env.maxRetries || 5; const maxRetries = process.env.maxRetries || 5;
let restartCount = 0; let restartCount = 0;
@ -21,7 +32,7 @@ const loadCommands = () => {
try { try {
const files = fs.readdirSync(commandsPath) const files = fs.readdirSync(commandsPath)
.filter(file => file.endsWith('.ts') || file.endsWith('.js')); .filter(file => file.endsWith('.ts') || file.endsWith('.js'));
files.forEach((file) => { files.forEach((file) => {
try { try {
const commandPath = path.join(commandsPath, file); const commandPath = path.join(commandsPath, file);

287
src/commands/ai.ts Normal file
View file

@ -0,0 +1,287 @@
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
// AI.TS
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
// by ihatenodejs/Aidan
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
//
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
// -----------------------------------------------------------------------
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
//
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
// This is free and unencumbered software released into the public domain.
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
//
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
// Anyone is free to copy, modify, publish, use, compile, sell, or
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
// distribute this software, either in source code form or as a compiled
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
// binary, for any purpose, commercial or non-commercial, and by any
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
// means.
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
//
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
// In jurisdictions that recognize copyright laws, the author or authors
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
// of this software dedicate any and all copyright interest in the
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
// software to the public domain. We make this dedication for the benefit
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
// of the public at large and to the detriment of our heirs and
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
// successors. We intend this dedication to be an overt act of
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
// relinquishment in perpetuity of all present and future rights to this
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
// software under copyright law.
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
//
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
// IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
// OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
// OTHER DEALINGS IN THE SOFTWARE.
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
//
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
// For more information, please refer to <https://unlicense.org/>
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
import { isOnSpamWatch } from "../spamwatch/spamwatch"
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
import spamwatchMiddlewareModule from "../spamwatch/Middleware"
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
import { Telegraf, Context } from "telegraf"
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
import type { Message } from "telegraf/types"
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
import { replyToMessageId } from "../utils/reply-to-message-id"
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
import { getStrings } from "../plugins/checklang"
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
import { languageCode } from "../utils/language-code"
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
import axios from "axios"
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
import { rateLimiter } from "../utils/rate-limiter"
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
import { logger } from "../utils/log"
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
const spamwatchMiddleware = spamwatchMiddlewareModule(isOnSpamWatch)
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
export const flash_model = "gemma3:4b"
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
export const thinking_model = "deepseek-r1:1.5b"
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
type TextContext = Context & { message: Message.TextMessage }
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
export function sanitizeForJson(text: string): string {
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
return text
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
.replace(/\\/g, '\\\\')
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
.replace(/"/g, '\\"')
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
.replace(/\n/g, '\\n')
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
.replace(/\r/g, '\\r')
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
.replace(/\t/g, '\\t')
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
}
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
export async function preChecks() {
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
const envs = [
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
"ollamaApi",
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
]
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
for (const env of envs) {
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
if (!process.env[env]) {
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
console.error(`[✨ AI | !] ❌ ${env} not set!`)
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
return false
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
}
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
}
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
console.log("[✨ AI] Pre-checks passed\n")
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
return true
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
}
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
async function getResponse(prompt: string, ctx: TextContext, replyGenerating: Message, model: string) {
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
const Strings = getStrings(languageCode(ctx))
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
if (!ctx.chat) {
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
return {
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
success: false,
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
error: Strings.unexpectedErr.replace("{error}", "No chat found"),
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
}
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
}
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
try {
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
const aiResponse = await axios.post(
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
`${process.env.ollamaApi}/api/generate`,
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
{
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
model,
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
prompt,
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
stream: true,
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
},
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
{
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
responseType: "stream",
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
}
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
)
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
let fullResponse = ""
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
GiovaniFZ commented 2025-06-06 17:02:36 +00:00 (Migrated from github.com)

I'm not sure about what it does, but always prefer to use const whenever it's possible

I'm not sure about what it does, but always prefer to use const whenever it's possible
ihatenodejs commented 2025-06-28 16:11:54 +00:00 (Migrated from github.com)

LLMs essentially stream their output, which is fetched through API (done above with the axios.post()).

I used let because as the response comes in, fullResponse contains the latest complete response (it's live updating) which gets edited on Telegram. Hope this clears it up!

LLMs essentially stream their output, which is fetched through API (done above with the `axios.post()`). I used let because as the response comes in, `fullResponse` contains the latest complete response (it's live updating) which gets edited on Telegram. Hope this clears it up!
let thoughts = ""
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
let lastUpdate = Date.now()
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
const stream = aiResponse.data
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
for await (const chunk of stream) {
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
const lines = chunk.toString().split('\n')
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
for (const line of lines) {
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
if (!line.trim()) continue
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
let ln
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
try {
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
ln = JSON.parse(line)
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
} catch (e) {
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
console.error("[✨ AI | !] Error parsing chunk:", e)
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
continue
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
}
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
if (model === thinking_model) {
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
if (ln.response.includes('<think>')) {
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
const thinkMatch = ln.response.match(/<think>([\s\S]*?)<\/think>/)
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
if (thinkMatch && thinkMatch[1].trim().length > 0) {
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
logger.logThinking(ctx.chat.id, replyGenerating.message_id, true)
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
} else if (!thinkMatch) {
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
logger.logThinking(ctx.chat.id, replyGenerating.message_id, true)
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
}
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
} else if (ln.response.includes('</think>')) {
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
logger.logThinking(ctx.chat.id, replyGenerating.message_id, false)
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
}
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
}
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
const now = Date.now()
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
if (ln.response) {
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
if (model === thinking_model) {
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
let patchedThoughts = ln.response
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
const thinkTagRx = /<think>([\s\S]*?)<\/think>/g
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
patchedThoughts = patchedThoughts.replace(thinkTagRx, (match, p1) => p1.trim().length > 0 ? '`Thinking...`' + p1 + '`Finished thinking`' : '')
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
patchedThoughts = patchedThoughts.replace(/<think>/g, '`Thinking...`')
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
patchedThoughts = patchedThoughts.replace(/<\/think>/g, '`Finished thinking`')
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
thoughts += patchedThoughts
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
fullResponse += patchedThoughts
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
} else {
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
fullResponse += ln.response
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
}
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
if (now - lastUpdate >= 1000) {
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
await rateLimiter.editMessageWithRetry(
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
ctx,
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
ctx.chat.id,
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
replyGenerating.message_id,
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
thoughts,
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
{ parse_mode: 'Markdown' }
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
)
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
lastUpdate = now
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
}
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
}
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
}
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
}
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
return {
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
success: true,
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
response: fullResponse,
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
}
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
} catch (error: any) {
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
let shouldPullModel = false
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
if (error.response) {
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
const errData = error.response.data?.error
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
const errStatus = error.response.status
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
if (errData && (errData.includes(`model '${model}' not found`) || errStatus === 404)) {
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
shouldPullModel = true
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
} else {
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
console.error("[✨ AI | !] Error zone 1:", errData)
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
return { success: false, error: errData }
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
}
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
} else if (error.request) {
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
console.error("[✨ AI | !] No response received:", error.request)
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
return { success: false, error: "No response received from server" }
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
} else {
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
console.error("[✨ AI | !] Error zone 3:", error.message)
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
return { success: false, error: error.message }
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
}
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
if (shouldPullModel) {
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
ctx.telegram.editMessageText(ctx.chat.id, replyGenerating.message_id, undefined, `🔄 Pulling ${model} from ollama...\n\nThis may take a few minutes...`)
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
console.log(`[✨ AI | i] Pulling ${model} from ollama...`)
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
try {
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
await axios.post(
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
`${process.env.ollamaApi}/api/pull`,
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
{
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
model,
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
stream: false,
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
timeout: process.env.ollamaApiTimeout || 10000,
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
}
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
)
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
} catch (e: any) {
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
if (e.response) {
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
console.error("[✨ AI | !] Something went wrong:", e.response.data?.error)
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
return {
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
success: false,
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
error: `❌ Something went wrong while pulling ${model}, please try your command again!`,
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
}
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
} else if (e.request) {
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
console.error("[✨ AI | !] No response received while pulling:", e.request)
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
return {
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
success: false,
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
error: `❌ No response received while pulling ${model}, please try again!`,
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
}
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
} else {
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
console.error("[✨ AI | !] Error while pulling:", e.message)
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
return {
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
success: false,
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
error: `❌ Error while pulling ${model}: ${e.message}`,
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
}
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
}
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
}
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
console.log(`[✨ AI | i] ${model} pulled successfully`)
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
return {
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
success: true,
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
response: `✅ Pulled ${model} successfully, please retry the command.`,
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
}
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
}
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
}
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
}
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
export default (bot: Telegraf<Context>) => {
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
const botName = bot.botInfo?.first_name && bot.botInfo?.last_name ? `${bot.botInfo.first_name} ${bot.botInfo.last_name}` : "Kowalski"
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
bot.command(["ask", "think"], spamwatchMiddleware, async (ctx) => {
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
if (!ctx.message || !('text' in ctx.message)) return
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
const isAsk = ctx.message.text.startsWith("/ask")
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
const model = isAsk ? flash_model : thinking_model
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
const textCtx = ctx as TextContext
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
const reply_to_message_id = replyToMessageId(textCtx)
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
const Strings = getStrings(languageCode(textCtx))
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
const message = textCtx.message.text
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
const author = ("@" + ctx.from?.username) || ctx.from?.first_name
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
logger.logCmdStart(author, model === flash_model ? "ask" : "think")
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
if (!process.env.ollamaApi) {
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
await ctx.reply(Strings.aiDisabled, {
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
parse_mode: 'Markdown',
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
...({ reply_to_message_id })
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
})
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
return
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
}
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
const replyGenerating = await ctx.reply(Strings.askGenerating.replace("{model}", model), {
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
parse_mode: 'Markdown',
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
...({ reply_to_message_id })
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
})
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
const fixedMsg = message.replace(/\/(ask|think) /, "")
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
if (fixedMsg.length < 1) {
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
await ctx.reply(Strings.askNoMessage, {
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
parse_mode: 'Markdown',
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
...({ reply_to_message_id })
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
})
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
return
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
}
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
logger.logPrompt(fixedMsg)
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
const prompt = sanitizeForJson(
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
`You are a plaintext-only, helpful assistant called ${botName}.
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
Current Date/Time (UTC): ${new Date().toLocaleString()}
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
---
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
Respond to the user's message:
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
${fixedMsg}`)
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
const aiResponse = await getResponse(prompt, textCtx, replyGenerating, model)
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
if (!aiResponse) return
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
if (!ctx.chat) return
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
if (aiResponse.success && aiResponse.response) {
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
await rateLimiter.editMessageWithRetry(
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
ctx,
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
ctx.chat.id,
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
replyGenerating.message_id,
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
aiResponse.response,
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
{ parse_mode: 'Markdown' }
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
)
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
return
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
}
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
const error = Strings.unexpectedErr.replace("{error}", aiResponse.error)
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
await rateLimiter.editMessageWithRetry(
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
ctx,
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
ctx.chat.id,
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
replyGenerating.message_id,
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
error,
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
{ parse_mode: 'Markdown' }
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
)
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
})
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
}
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

Don't use axios like this, check https://axios-http.com/docs/instance

Don't use axios like this, check https://axios-http.com/docs/instance
GiovaniFZ commented 2025-06-28 13:53:07 +00:00 (Migrated from github.com)

Why are you printing p1?

Why are you printing p1?
GiovaniFZ commented 2025-06-28 13:56:48 +00:00 (Migrated from github.com)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)

There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
ihatenodejs commented 2025-06-28 16:13:06 +00:00 (Migrated from github.com)

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read

View file

@ -32,7 +32,8 @@ async function sendHelpMessage(ctx, isEditing) {
[{ text: Strings.mainCommands, callback_data: 'helpMain' }, { text: Strings.usefulCommands, callback_data: 'helpUseful' }], [{ text: Strings.mainCommands, callback_data: 'helpMain' }, { text: Strings.usefulCommands, callback_data: 'helpUseful' }],
[{ text: Strings.interactiveEmojis, callback_data: 'helpInteractive' }, { text: Strings.funnyCommands, callback_data: 'helpFunny' }], [{ text: Strings.interactiveEmojis, callback_data: 'helpInteractive' }, { text: Strings.funnyCommands, callback_data: 'helpFunny' }],
[{ text: Strings.lastFm.helpEntry, callback_data: 'helpLast' }, { text: Strings.animalCommands, callback_data: 'helpAnimals' }], [{ text: Strings.lastFm.helpEntry, callback_data: 'helpLast' }, { text: Strings.animalCommands, callback_data: 'helpAnimals' }],
[{ text: Strings.ytDownload.helpEntry, callback_data: 'helpYouTube' }, { text: Strings.ponyApi.helpEntry, callback_data: 'helpMLP' }] [{ text: Strings.ytDownload.helpEntry, callback_data: 'helpYouTube' }, { text: Strings.ponyApi.helpEntry, callback_data: 'helpMLP' }],
[{ text: Strings.aiCmds, callback_data: 'helpAi' }]
] ]
} }
}; };
@ -112,6 +113,10 @@ export default (bot) => {
await ctx.answerCbQuery(); await ctx.answerCbQuery();
await ctx.editMessageText(Strings.ponyApi.helpDesc, options); await ctx.editMessageText(Strings.ponyApi.helpDesc, options);
break; break;
case 'helpAi':
await ctx.answerCbQuery();
await ctx.editMessageText(Strings.aiCmdsDesc, options);
break;
case 'helpBack': case 'helpBack':
await ctx.answerCbQuery(); await ctx.answerCbQuery();
await sendHelpMessage(ctx, true); await sendHelpMessage(ctx, true);

View file

@ -33,8 +33,8 @@
"funEmojiResult": "*You rolled {emoji} and got* `{value}`*!*\nYou don't know what that means? Me neither!", "funEmojiResult": "*You rolled {emoji} and got* `{value}`*!*\nYou don't know what that means? Me neither!",
"gifErr": "*Something went wrong while sending the GIF. Please try again later.*\n\n{err}", "gifErr": "*Something went wrong while sending the GIF. Please try again later.*\n\n{err}",
"lastFm": { "lastFm": {
"helpEntry": "Last.fm", "helpEntry": "🎵 Last.fm",
"helpDesc": "*Last.fm*\n\n- /lt | /lmu | /last | /lfm: Shows the last song from your Last.fm profile + the number of plays.\n- /setuser `<user>`: Sets the user for the command above.", "helpDesc": "🎵 *Last.fm*\n\n- /lt | /lmu | /last | /lfm: Shows the last song from your Last.fm profile + the number of plays.\n- /setuser `<user>`: Sets the user for the command above.",
"noUser": "*Please provide a Last.fm username.*\nExample: `/setuser <username>`", "noUser": "*Please provide a Last.fm username.*\nExample: `/setuser <username>`",
"noUserSet": "*You haven't set your Last.fm username yet.*\nUse the command /setuser to set.\n\nExample: `/setuser <username>`", "noUserSet": "*You haven't set your Last.fm username yet.*\nUse the command /setuser to set.\n\nExample: `/setuser <username>`",
"noRecentTracks": "*No recent tracks found for Last.fm user* `{lastfmUser}`*.*", "noRecentTracks": "*No recent tracks found for Last.fm user* `{lastfmUser}`*.*",
@ -52,25 +52,27 @@
"apiErr": "*An error occurred while retrieving the weather. Please try again later.*\n\n`{error}`", "apiErr": "*An error occurred while retrieving the weather. Please try again later.*\n\n`{error}`",
"apiKeyErr": "*An API key was not set by the bot owner. Please try again later.*" "apiKeyErr": "*An API key was not set by the bot owner. Please try again later.*"
}, },
"mainCommands": "Main commands", "mainCommands": " Main Commands",
"mainCommandsDesc": "*Main commands*\n\n- /help: Show bot's help\n- /start: Start the bot\n- /privacy: Read the bot's Privacy Policy", "mainCommandsDesc": " *Main Commands*\n\n- /help: Show bot's help\n- /start: Start the bot\n- /privacy: Read the bot's Privacy Policy",
"usefulCommands": "Useful commands", "usefulCommands": "🛠️ Useful Commands",
"usefulCommandsDesc": "*Useful commands*\n\n- /chatinfo: Send information about the group\n- /userinfo: Send information about yourself\n- /d | /device `<model>`: Search for a device on GSMArena and show its specs.\n/codename | /whatis `<device codename>`: Shows what device is based on the codename. Example: `/codename begonia`\n- /weather | /clima `<city>`: See weather status for a specific location.\n- /modarchive | /tma `<module id>`: Download a module from The Mod Archive.\n- /http `<HTTP code>`: Send details about a specific HTTP code. Example: `/http 404`", "usefulCommandsDesc": "🛠️ *Useful commands*\n\n- /chatinfo: Send information about the group\n- /userinfo: Send information about yourself\n- /d | /device `<model>`: Search for a device on GSMArena and show its specs.\n/codename | /whatis `<device codename>`: Shows what device is based on the codename. Example: `/codename begonia`\n- /weather | /clima `<city>`: See weather status for a specific location.\n- /modarchive | /tma `<module id>`: Download a module from The Mod Archive.\n- /http `<HTTP code>`: Send details about a specific HTTP code. Example: `/http 404`",
"funnyCommands": "Funny commands", "funnyCommands": "😂 Funny Commands",
"funnyCommandsDesc": "*Funny commands*\n\n- /gay: Check if you are gay\n- /furry: Check if you are a furry\n- /random: Pick a random number between 0-10", "funnyCommandsDesc": "😂 *Funny Commands*\n\n- /gay: Check if you are gay\n- /furry: Check if you are a furry\n- /random: Pick a random number between 0-10",
"interactiveEmojis": "Interactive emojis", "interactiveEmojis": "🎲 Interactive Emojis",
"interactiveEmojisDesc": "*Interactive emojis*\n\n- /dice: Roll a dice\n- /idice: Infinitely roll a colored dice\n- /slot: Try to combine the figures!\n- /ball: Try to kick the ball into the goal!\n- /bowling: Try to hit the pins!\n- /dart: Try to hit the target!", "interactiveEmojisDesc": "🎲 *Interactive emojis*\n\n- /dice: Roll a dice\n- /idice: Infinitely roll a colored dice\n- /slot: Try to combine the figures!\n- /ball: Try to kick the ball into the goal!\n- /bowling: Try to hit the pins!\n- /dart: Try to hit the target!",
"animalCommands": "Animals", "animalCommands": "🐱 Animals",
"animalCommandsDesc": "*Animals*\n\n- /soggy | /soggycat `<1 | 2 | 3 | 4 | orig | thumb | sticker | alt>`: Sends the [Soggy cat meme](https://knowyourmeme.com/memes/soggy-cat)\n- /cat: Sends a random picture of a cat.\n- /fox: Sends a random picture of a fox.\n- /duck: Sends a random picture of a duck.\n- /dog: Sends a random picture of a dog.\n- /httpcat `<http code>`: Send cat memes from http.cat with your specified HTTP code. Example: `/httpcat 404`", "animalCommandsDesc": "🐱 *Animals*\n\n- /soggy | /soggycat `<1 | 2 | 3 | 4 | orig | thumb | sticker | alt>`: Sends the [Soggy cat meme](https://knowyourmeme.com/memes/soggy-cat)\n- /cat: Sends a random picture of a cat.\n- /fox: Sends a random picture of a fox.\n- /duck: Sends a random picture of a duck.\n- /dog: Sends a random picture of a dog.\n- /httpcat `<http code>`: Send cat memes from http.cat with your specified HTTP code. Example: `/httpcat 404`",
"aiCmds": "✨ AI Commands",
"aiCmdsDesc": "✨ *AI Commands*\n\n- /ask `<prompt>`: Ask a question to an AI",
"maInvalidModule": "Please provide a valid module ID from The Mod Archive.\nExample: `/modarchive 81574`", "maInvalidModule": "Please provide a valid module ID from The Mod Archive.\nExample: `/modarchive 81574`",
"maDownloadError": "Error downloading the file. Check the module ID and try again.", "maDownloadError": "Error downloading the file. Check the module ID and try again.",
"ytDownload": { "ytDownload": {
"helpEntry": "Video download", "helpEntry": "📺 YouTube Download",
"helpDesc": "*Video download*\n\n- /yt | /ytdl | /sdl | /dl | /video `<video link>`: Download a video from some platforms (e.g. YouTube, Instagram, Facebook, etc.).\n\n See [this link](https://github.com/yt-dlp/yt-dlp/blob/master/supportedsites.md) for more information and which services are supported.\n\n*Note: Telegram is currently limiting bot uploads to 50MB, which means that if the video you want to download is larger than 50MB, the quality will be reduced to try to upload it anyway. We're trying our best to work around or fix this problem.*", "helpDesc": "📺 *YouTube Download*\n\n- /yt | /ytdl | /sdl | /dl | /video `<video link>`: Download a video from some platforms (e.g. YouTube, Instagram, Facebook, etc.).\n\n See [this link](https://github.com/yt-dlp/yt-dlp/blob/master/supportedsites.md) for more information and which services are supported.\n\n*Note: Telegram is currently limiting bot uploads to 50MB, which means that if the video you want to download is larger than 50MB, the quality will be reduced to try to upload it anyway. We're trying our best to work around or fix this problem.*",
"downloadingVid": "*Downloading video...*", "downloadingVid": "⬇️ *Downloading video...*",
"libNotFound": "*It seems that the yt-dlp executable does not exist on our server...\n\nIn that case, the problem is on our end! Please wait until we have noticed and solved the problem.*", "libNotFound": "*It seems that the yt-dlp executable does not exist on our server...\n\nIn that case, the problem is on our end! Please wait until we have noticed and solved the problem.*",
"checkingSize": "*Checking if the video exceeds the 50MB limit...*", "checkingSize": "🔎 *Checking if the video exceeds the 50MB limit...*",
"uploadingVid": "*Uploading video...*", "uploadingVid": "⬆️ *Uploading video...*",
"msgDesc": "{userMention}*, there is your downloaded video.*", "msgDesc": "{userMention}*, there is your downloaded video.*",
"downloadErr": "*Error during YT video download:*\n\n`{err}`", "downloadErr": "*Error during YT video download:*\n\n`{err}`",
"uploadErr": "Error uploading file. Please try again later.", "uploadErr": "Error uploading file. Please try again later.",
@ -95,8 +97,8 @@
"resultMsg": "*HTTP Code*: {code}\n*Name*: `{message}`\n*Description*: {description}" "resultMsg": "*HTTP Code*: {code}\n*Name*: `{message}`\n*Description*: {description}"
}, },
"ponyApi": { "ponyApi": {
"helpEntry": "My Little Pony", "helpEntry": "🐴 My Little Pony",
"helpDesc": "*My Little Pony*\n\n- /mlp: Displays this help message.\n- /mlpchar `<character name>`: Shows specific information about a My Little Pony character. Example: `/mlpchar Twilight Sparkle`\n- /mlpep: Shows specific information about a My Little Pony episode. Example: `/mlpep 136`\n- /mlpcomic `<comic name>`: Shows specific information about a My Little Pony comic. Example: `/mlpcomic Nightmare Rarity`\n- /rpony | /randompony | /mlpart: Sends a random artwork made by the My Little Pony community.", "helpDesc": "🐴 *My Little Pony*\n\n- /mlp: Displays this help message.\n- /mlpchar `<character name>`: Shows specific information about a My Little Pony character. Example: `/mlpchar Twilight Sparkle`\n- /mlpep: Shows specific information about a My Little Pony episode. Example: `/mlpep 136`\n- /mlpcomic `<comic name>`: Shows specific information about a My Little Pony comic. Example: `/mlpcomic Nightmare Rarity`\n- /rpony | /randompony | /mlpart: Sends a random artwork made by the My Little Pony community.",
"charRes": "*{name} (ID: {id})*\n\n*Alias:* `{alias}`\n*Sex:* `{sex}`\n*Residence:* `{residence}`\n*Occupation:* `{occupation}`\n*Kind:* `{kind}`\n\n*Fandom URL:*\n[{url}]({url})", "charRes": "*{name} (ID: {id})*\n\n*Alias:* `{alias}`\n*Sex:* `{sex}`\n*Residence:* `{residence}`\n*Occupation:* `{occupation}`\n*Kind:* `{kind}`\n\n*Fandom URL:*\n[{url}]({url})",
"epRes": "*{name} (ID: {id})*\n\n*Season:* `{season}`\n*Episode:* `{episode}`\n*Overall Ep.:* `{overall}`\n*Release date:* `{airdate}`\n*Story by:* `{storyby}`\n*Written by:* `{writtenby}`\n*Storyboard:* `{storyboard}`\n\n*Fandom URL:*\n[{url}]({url})", "epRes": "*{name} (ID: {id})*\n\n*Season:* `{season}`\n*Episode:* `{episode}`\n*Overall Ep.:* `{overall}`\n*Release date:* `{airdate}`\n*Story by:* `{storyby}`\n*Written by:* `{writtenby}`\n*Storyboard:* `{storyboard}`\n\n*Fandom URL:*\n[{url}]({url})",
"comicRes": "*{name} (ID: {id})*\n\n*Series:* `{series}`\n*Writer:* `{writer}`\n*Artist:* `{artist}`\n*Colorist:* `{colorist}`\n*Letterer:* `{letterer}`\n*Editor:* `{editor}`\n\n*Fandom URL:*\n[{url}]({url})", "comicRes": "*{name} (ID: {id})*\n\n*Series:* `{series}`\n*Writer:* `{writer}`\n*Artist:* `{artist}`\n*Colorist:* `{colorist}`\n*Letterer:* `{letterer}`\n*Editor:* `{editor}`\n\n*Fandom URL:*\n[{url}]({url})",
@ -117,5 +119,7 @@
"apiErr": "An error occurred while fetching data from the API.\n\n`{err}`" "apiErr": "An error occurred while fetching data from the API.\n\n`{err}`"
}, },
"chatNotFound": "Chat not found.", "chatNotFound": "Chat not found.",
"noFileProvided": "Please provide a file to send." "noFileProvided": "Please provide a file to send.",
"askGenerating": "✨ _{model} is working..._",
"aiDisabled": "AI features are currently disabled"
} }

View file

@ -62,6 +62,8 @@
"interactiveEmojisDesc": "*Emojis interativos*\n\n- /dice: Jogue um dado\n- /idice: Role infinitamente um dado colorido\n- /slot: Tente combinar as figuras!\n- /ball: Tente chutar a bola no gol!\n- /bowling: Tente derrubar os pinos!\n- /dart: Tente acertar o alvo!", "interactiveEmojisDesc": "*Emojis interativos*\n\n- /dice: Jogue um dado\n- /idice: Role infinitamente um dado colorido\n- /slot: Tente combinar as figuras!\n- /ball: Tente chutar a bola no gol!\n- /bowling: Tente derrubar os pinos!\n- /dart: Tente acertar o alvo!",
"animalCommands": "Animais", "animalCommands": "Animais",
"animalCommandsDesc": "*Animais*\n\n- /soggy | /soggycat `<1 | 2 | 3 | 4 | orig | thumb | sticker | alt>`: Envia o [meme do gato encharcado](https://knowyourmeme.com/memes/soggy-cat)\n- /cat - Envia uma foto aleatória de um gato.\n- /fox - Envia uma foto aleatória de uma raposa.\n- /duck - Envia uma foto aleatória de um pato.\n- /dog - Envia uma imagem aleatória de um cachorro.\n- /httpcat `<código http>`: Envia memes de gato do http.cat com o código HTTP especificado. Exemplo: `/httpcat 404`", "animalCommandsDesc": "*Animais*\n\n- /soggy | /soggycat `<1 | 2 | 3 | 4 | orig | thumb | sticker | alt>`: Envia o [meme do gato encharcado](https://knowyourmeme.com/memes/soggy-cat)\n- /cat - Envia uma foto aleatória de um gato.\n- /fox - Envia uma foto aleatória de uma raposa.\n- /duck - Envia uma foto aleatória de um pato.\n- /dog - Envia uma imagem aleatória de um cachorro.\n- /httpcat `<código http>`: Envia memes de gato do http.cat com o código HTTP especificado. Exemplo: `/httpcat 404`",
"aiCmds": "Comandos de IA",
"aiCmdsDesc": "*Comandos de IA*\n\n- /ask `<prompt>`: Fazer uma pergunta a uma IA",
"maInvalidModule": "Por favor, forneça um ID de módulo válido do The Mod Archive.\nExemplo: `/modarchive 81574`", "maInvalidModule": "Por favor, forneça um ID de módulo válido do The Mod Archive.\nExemplo: `/modarchive 81574`",
"maDownloadError": "Erro ao baixar o arquivo. Verifique o ID do módulo e tente novamente.", "maDownloadError": "Erro ao baixar o arquivo. Verifique o ID do módulo e tente novamente.",
"ytDownload": { "ytDownload": {
@ -115,5 +117,8 @@
"notFound": "Celular não encontrado.", "notFound": "Celular não encontrado.",
"resultMsg": "*Nome:* `{name}`\n*Marca:* `{brand}`\n*Modelo:* `{model}`\n*Codinome:* `{codename}`", "resultMsg": "*Nome:* `{name}`\n*Marca:* `{brand}`\n*Modelo:* `{model}`\n*Codinome:* `{codename}`",
"apiErr": "Ocorreu um erro ao buscar os dados da API.\n\n`{err}`" "apiErr": "Ocorreu um erro ao buscar os dados da API.\n\n`{err}`"
} },
"noFileProvided": "Por favor, forneça um arquivo para envio.",
"askGenerating": "✨ _{modelo} está funcionando..._",
"aiDisabled": "Os recursos de IA estão desativados no momento"
} }

83
src/utils/log.ts Normal file
View file

@ -0,0 +1,83 @@
// LOG.TS
// by ihatenodejs/Aidan
//
// -----------------------------------------------------------------------
//
// This is free and unencumbered software released into the public domain.
//
// Anyone is free to copy, modify, publish, use, compile, sell, or
// distribute this software, either in source code form or as a compiled
// binary, for any purpose, commercial or non-commercial, and by any
// means.
//
// In jurisdictions that recognize copyright laws, the author or authors
// of this software dedicate any and all copyright interest in the
// software to the public domain. We make this dedication for the benefit
// of the public at large and to the detriment of our heirs and
// successors. We intend this dedication to be an overt act of
// relinquishment in perpetuity of all present and future rights to this
// software under copyright law.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
// IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
// OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.
//
// For more information, please refer to <https://unlicense.org/>
import { flash_model, thinking_model } from "../commands/ai"
class Logger {
private static instance: Logger
private constructor() {}
static getInstance(): Logger {
if (!Logger.instance) {
Logger.instance = new Logger()
}
return Logger.instance
}
logCmdStart(user: string, type: "ask" | "think"): void {
console.log(`\n[✨ AI | START] Received /${type} for model ${type === "ask" ? flash_model : thinking_model}`)
}
logThinking(chatId: number, messageId: number, thinking: boolean): void {
if (thinking) {
console.log(`[✨ AI | THINKING | ${chatId}:${messageId}] Model started thinking`)
} else {
console.log(`[✨ AI | THINKING | ${chatId}:${messageId}] Model stopped thinking`)
}
}
logChunk(chatId: number, messageId: number, text: string, isOverflow: boolean = false): void {
const prefix = isOverflow ? "[✨ AI | OVERFLOW]" : "[✨ AI | CHUNK]"
console.log(`${prefix} [${chatId}:${messageId}] ${text.length} chars pushed to Telegram`)
}
logPrompt(prompt: string): void {
console.log(`[✨ AI | PROMPT] ${prompt.length} chars input`)
}
logError(error: any): void {
if (error.response?.error_code === 429) {
const retryAfter = error.response.parameters?.retry_after || 1
console.error(`[✨ AI | RATE_LIMIT] Too Many Requests - retry after ${retryAfter}s`)
} else if (error.response?.error_code === 400 && error.response?.description?.includes("can't parse entities")) {
console.error("[✨ AI | PARSE_ERROR] Markdown parsing failed, retrying with plain text")
} else {
const errorDetails = {
code: error.response?.error_code,
description: error.response?.description,
method: error.on?.method
}
console.error("[✨ AI | ERROR]", JSON.stringify(errorDetails, null, 2))
}
}
}
export const logger = Logger.getInstance()

246
src/utils/rate-limiter.ts Normal file
View file

@ -0,0 +1,246 @@
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
// RATE-LIMITER.TS
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
// by ihatenodejs/Aidan
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
//
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
// -----------------------------------------------------------------------
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
//
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
// This is free and unencumbered software released into the public domain.
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
//
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
// Anyone is free to copy, modify, publish, use, compile, sell, or
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
// distribute this software, either in source code form or as a compiled
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
// binary, for any purpose, commercial or non-commercial, and by any
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
// means.
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
//
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
// In jurisdictions that recognize copyright laws, the author or authors
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
// of this software dedicate any and all copyright interest in the
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
// software to the public domain. We make this dedication for the benefit
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
// of the public at large and to the detriment of our heirs and
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
// successors. We intend this dedication to be an overt act of
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
// relinquishment in perpetuity of all present and future rights to this
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
// software under copyright law.
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
//
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
// IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
// OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
// OTHER DEALINGS IN THE SOFTWARE.
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
//
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
// For more information, please refer to <https://unlicense.org/>
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
import { Context } from 'telegraf'
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
import { logger } from './log'
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
class RateLimiter {
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
private lastEditTime: number = 0
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
private readonly minInterval: number = 5000
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
private pendingUpdates: Map<string, string> = new Map()
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
private updateQueue: Map<string, NodeJS.Timeout> = new Map()
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
private readonly max_msg_length: number = 3500
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
private overflowMessages: Map<string, number> = new Map()
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
private isRateLimited: boolean = false
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
private rateLimitEndTime: number = 0
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
private getMessageKey(chatId: number, messageId: number): string {
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
return `${chatId}:${messageId}`
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
}
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
private async waitForRateLimit(chatId: number, messageId: number): Promise<void> {
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
if (!this.isRateLimited) return
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
console.log(`[✨ AI | RATELIMIT] [${chatId}:${messageId}] Ratelimited, waiting for end of ${this.rateLimitEndTime - Date.now()}ms`)
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
const now = Date.now()
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
if (now < this.rateLimitEndTime) {
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
await new Promise(resolve => setTimeout(resolve, this.rateLimitEndTime - now))
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
}
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
this.isRateLimited = false
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
}
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
private chunkText(text: string): string[] {
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
const chunks: string[] = []
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
let currentChunk = ''
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
let currentLength = 0
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
const lines = text.split('\n')
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
for (const line of lines) {
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
if (currentLength + line.length + 1 > this.max_msg_length) {
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
if (currentChunk) {
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
chunks.push(currentChunk)
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
currentChunk = ''
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
currentLength = 0
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
}
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
if (line.length > this.max_msg_length) {
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
for (let i = 0; i < line.length; i += this.max_msg_length) {
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
chunks.push(line.substring(i, i + this.max_msg_length))
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
}
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
} else {
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
currentChunk = line
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
currentLength = line.length
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
}
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
} else {
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
if (currentChunk) {
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
currentChunk += '\n'
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
currentLength++
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
}
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
currentChunk += line
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
currentLength += line.length
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
}
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
}
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
if (currentChunk) {
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
chunks.push(currentChunk)
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
}
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
return chunks
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
}
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
private handleTelegramError(error: unknown, messageKey: string, options: any, ctx: Context, chatId: number, messageId: number): boolean {
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
if (!isTelegramError(error)) return false
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
if (error.response.error_code === 429) {
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
const retryAfter = error.response.parameters?.retry_after || 1
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
this.isRateLimited = true
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
this.rateLimitEndTime = Date.now() + (retryAfter * 1000)
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
const existingTimeout = this.updateQueue.get(messageKey)
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
if (existingTimeout) clearTimeout(existingTimeout)
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
const timeout = setTimeout(() => {
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
this.processUpdate(ctx, chatId, messageId, options)
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
}, retryAfter * 1000)
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
this.updateQueue.set(messageKey, timeout)
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
return true
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
}
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
if (error.response.error_code === 400) {
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
if (error.response.description?.includes("can't parse entities") || error.response.description?.includes("MESSAGE_TOO_LONG")) {
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
const plainOptions = { ...options, parse_mode: undefined }
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
this.processUpdate(ctx, chatId, messageId, plainOptions)
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
return true
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
}
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
if (error.response.description?.includes("message is not modified")) {
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
this.pendingUpdates.delete(messageKey)
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
this.updateQueue.delete(messageKey)
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
return true
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
}
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
logger.logError(error)
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
this.pendingUpdates.delete(messageKey)
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
this.updateQueue.delete(messageKey)
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
return true
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
}
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
logger.logError(error)
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
this.pendingUpdates.delete(messageKey)
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
this.updateQueue.delete(messageKey)
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
return true
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
}
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
private async processUpdate(
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
ctx: Context,
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
chatId: number,
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
messageId: number,
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
options: any
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
): Promise<void> {
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
const messageKey = this.getMessageKey(chatId, messageId)
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
const latestText = this.pendingUpdates.get(messageKey)
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
if (!latestText) return
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
const now = Date.now()
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
const timeSinceLastEdit = now - this.lastEditTime
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
await this.waitForRateLimit(chatId, messageId)
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
if (timeSinceLastEdit < this.minInterval) {
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
const existingTimeout = this.updateQueue.get(messageKey)
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
if (existingTimeout) clearTimeout(existingTimeout)
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
const timeout = setTimeout(() => {
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
this.processUpdate(ctx, chatId, messageId, options)
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
}, this.minInterval - timeSinceLastEdit)
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
this.updateQueue.set(messageKey, timeout)
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
return
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
}
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
try {
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
if (latestText.length > this.max_msg_length) {
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
const chunks = this.chunkText(latestText)
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
const firstChunk = chunks[0]
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
logger.logChunk(chatId, messageId, firstChunk)
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
try {
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
await ctx.telegram.editMessageText(chatId, messageId, undefined, firstChunk, options)
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
} catch (error: unknown) {
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
if (
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
isTelegramError(error) &&
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
!error.response.description?.includes("message is not modified")
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
) {
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
throw error
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
}
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
}
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
for (let i = 1; i < chunks.length; i++) {
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
const chunk = chunks[i]
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
const overflowMessageId = this.overflowMessages.get(messageKey)
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
if (overflowMessageId) {
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
try {
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
await ctx.telegram.editMessageText(chatId, overflowMessageId, undefined, chunk, options)
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
logger.logChunk(chatId, overflowMessageId, chunk, true)
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
} catch (error: unknown) {
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
if (
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
isTelegramError(error) &&
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
!error.response.description?.includes("message is not modified")
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
) {
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
throw error
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
}
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
}
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
} else {
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
const newMessage = await ctx.telegram.sendMessage(chatId, chunk, {
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
...options,
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
reply_to_message_id: messageId
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
})
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
logger.logChunk(chatId, newMessage.message_id, chunk, true)
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
this.overflowMessages.set(messageKey, newMessage.message_id)
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
}
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
}
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
this.pendingUpdates.set(messageKey, firstChunk)
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
if (chunks.length > 1) {
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
this.pendingUpdates.set(
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
this.getMessageKey(chatId, this.overflowMessages.get(messageKey)!),
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
chunks[chunks.length - 1]
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
)
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
}
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
} else {
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
logger.logChunk(chatId, messageId, latestText)
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
try {
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
await ctx.telegram.editMessageText(chatId, messageId, undefined, latestText, options)
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
} catch (error: unknown) {
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
if (
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
isTelegramError(error) &&
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
!error.response.description?.includes("message is not modified")
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
) {
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
throw error
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
}
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
}
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
this.pendingUpdates.delete(messageKey)
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
}
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
this.lastEditTime = Date.now()
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
this.updateQueue.delete(messageKey)
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
} catch (error: unknown) {
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
if (!this.handleTelegramError(error, messageKey, options, ctx, chatId, messageId)) {
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
logger.logError(error)
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
this.pendingUpdates.delete(messageKey)
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
this.updateQueue.delete(messageKey)
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
}
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
}
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
}
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
async editMessageWithRetry(
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
ctx: Context,
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
chatId: number,
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
messageId: number,
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
text: string,
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
options: any
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
): Promise<void> {
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
const messageKey = this.getMessageKey(chatId, messageId)
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
this.pendingUpdates.set(messageKey, text)
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
await this.processUpdate(ctx, chatId, messageId, options)
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
}
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
}
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
export const rateLimiter = new RateLimiter()
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
function isTelegramError(error: unknown): error is { response: { description?: string, error_code?: number, parameters?: { retry_after?: number } } } {
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
return (
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
typeof error === "object" &&
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
error !== null &&
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
"response" in error &&
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
typeof (error as any).response === "object"
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
)
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type
}
GiovaniFZ commented 2025-06-28 13:58:13 +00:00 (Migrated from github.com)

pls, avoid to set any as a type

pls, avoid to set any as a type