[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
7 changed files with 584 additions and 3 deletions
Showing only changes of commit 06e7d026a4 - Show all commits

View file

@ -5,6 +5,9 @@ botSource = "https://github.com/ABOCN/TelegramBot"
# insert token here
botToken = ""
# ai features
# ollamaApi = "http://ollama:11434"
# misc (botAdmins isnt a array here!)
maxRetries = 9999
botAdmins = 00000000, 00000000, 00000000

8
.gitignore vendored
View file

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

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

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

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

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

Why are you printing p1?

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

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

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

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

I 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
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

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

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

Why are you printing p1?

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

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

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

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

I 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
//const model = "qwen3:0.6b"
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

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

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

Why are you printing p1?

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

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

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

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

I 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 = "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
async function getResponse(prompt: string, ctx: TextContext, replyGenerating: 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
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) 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
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(`${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
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
prompt: 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
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
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
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 thinking = 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
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
for await (const chunk of 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
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
if (line.includes("\u003cthink\u003e")) {
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

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

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

Why are you printing p1?

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

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

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

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

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
// intercept 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
console.log("thinking started")
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

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

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

Why are you printing p1?

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

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

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

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

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
thinking = 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
thoughts += 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
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
} else if (line.includes("\u003c/think\u003e")) {
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

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

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

Why are you printing p1?

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

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

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

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

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

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

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

Why are you printing p1?

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

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

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

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

I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
thinking = 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
console.log("thinking finished")
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

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

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

Why are you printing p1?

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

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

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

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

I 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
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
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!
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
let data = 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
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

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

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

Why are you printing p1?

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

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

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

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

I 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 (data.response && !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
fullResponse += data.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 (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
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
{ 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
} else if (data.response && 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
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
} 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("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
}
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

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

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

Why are you printing p1?

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

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

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

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

I 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
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

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

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

Why are you printing p1?

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

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

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

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

I 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?.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
if (error.response.data.error.includes(`model '${model}' not found`) || error.status === 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("[!] 1", 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
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.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
}
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

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

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

Why are you printing p1?

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

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

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

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

I 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.status === 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
}
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

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

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

Why are you printing p1?

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

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

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

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

I 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...`)
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

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

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

Why are you printing p1?

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

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

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

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

I 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(`[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
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

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

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

Why are you printing p1?

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

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

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

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

I 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 pullModelStream = await axios.post(`${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
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
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
})
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

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

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

Why are you printing p1?

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

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

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

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

I 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 (pullModelStream.data.status !== ("success")) {
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

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

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

Why are you printing p1?

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

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

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

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

I 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("[!] Something went wrong:", pullModelStream.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
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
}
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

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

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

Why are you printing p1?

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

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

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

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

I 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("[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
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
console.error("[!] 2", 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
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.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
}
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

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

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

Why are you printing p1?

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

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

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

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

I 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 (error.statusText) {
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

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

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

Why are you printing p1?

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

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

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

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

I 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("[!] 3", error.statusText)
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

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

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

Why are you printing p1?

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

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

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

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

I 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.statusText,
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

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

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

Why are you printing p1?

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

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

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

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

I 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": 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": "An unexpected error occurred",
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

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

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

Why are you printing p1?

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

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

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

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

I 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
bot.command("ask", 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 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
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

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

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

Why are you printing p1?

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

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

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

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

I 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 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 helpful assistant named Kowalski, who has been given a message from a user.
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

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

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

Why are you printing p1?

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

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

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

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

I 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 message is:
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

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

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

Why are you printing p1?

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

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

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

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

I 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
${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
const aiResponse = await getResponse(prompt, textCtx, replyGenerating)
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

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

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

Why are you printing p1?

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

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

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

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

I 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 (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
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
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
} 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
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
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
}
GiovaniFZ commented 2025-06-28 13:52:15 +00:00 (Migrated from github.com)

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

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

Why are you printing p1?

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

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

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

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

I 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

@ -114,5 +114,7 @@
"apiErr": "An error occurred while fetching data from the API.\n\n`{err}`"
},
"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

@ -112,5 +112,8 @@
"notFound": "Celular não encontrado.",
"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}`"
}
},
"noFileProvided": "Por favor, forneça um arquivo para envio.",
"askGenerating": "✨ _{modelo} está funcionando..._",
"aiDisabled": "Os recursos de IA estão desativados no momento"
}

84
src/utils/log.ts Normal file
View file

@ -0,0 +1,84 @@
// 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/>
class Logger {
private static instance: Logger
private thinking: boolean = false
private constructor() {}
static getInstance(): Logger {
if (!Logger.instance) {
Logger.instance = new Logger()
}
return Logger.instance
}
logChunk(chatId: number, messageId: number, text: string, isOverflow: boolean = false): void {
const prefix = isOverflow ? '[OVERFLOW]' : '[CHUNK]'
console.log(`${prefix} [${chatId}:${messageId}] ${text.length} chars: ${text.substring(0, 50)}${text.length > 50 ? '...' : ''}`)
}
logPrompt(prompt: string): void {
console.log(`[PROMPT] ${prompt.length} chars: ${prompt.substring(0, 50)}${prompt.length > 50 ? '...' : ''}`)
}
logThinkingStart(): void {
if (!this.thinking) {
console.log('[THINKING] started')
this.thinking = true
}
}
logThinkingEnd(): void {
if (this.thinking) {
console.log('[THINKING] ended')
this.thinking = false
}
}
logError(error: any): void {
if (error.response?.error_code === 429) {
const retryAfter = error.response.parameters?.retry_after || 1
console.error(`[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('[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('[ERROR]', JSON.stringify(errorDetails, null, 2))
}
}
}
export const logger = Logger.getInstance()

235
src/utils/rate-limiter.ts Normal file
View file

@ -0,0 +1,235 @@
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(): 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) {
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
const waitTime = 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
await new Promise(resolve => setTimeout(resolve, waitTime))
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
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
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()
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) {
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
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
}
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 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
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: 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
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
// Split text into chunks while preserving markdown formatting
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 = latestText.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 a single line is too long, split
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
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
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: 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
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
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
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
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
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
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
} catch (error: 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
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
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
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
const sanitizedText = 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
logger.logChunk(chatId, messageId, sanitizedText)
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
await ctx.telegram.editMessageText(chatId, messageId, undefined, sanitizedText, 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: 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
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
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
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: 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
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
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) {
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
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
}
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 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
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
} else 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")) {
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 again with plain 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
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
await 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
} else if (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
await 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
} else 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
} 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.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
} 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.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