#development
1 messages ยท Page 286 of 1
i would argue you own the bot in the sense that the bot and the brand the bot represents belongs to you
Sure, but then if the building ownership changes and that building no longer wants you there
until you have a new place your business isn't functional
You own the idea and the effort behind it
My argument was never the bot isn't yours
its that what holds it isn't
Discord shuts down, bot gone.
Store changes ownership, store gone
Right
I guess my argument was misplaced or something
All I am trying to say is discord has every right to enforce rules on their platform you are on
If they want you to price match, thats their right to do so since you are developing on their platform
You are more than welcome to take your code elsewhere
copies the entire discord platform just to run my bot
xD
You'd do this
You wouldnโt download a car
jokes on you
Discord doesn't allow me to monetise on Discord in my country lol. So I have to use an external provider
I think you misunderstand
My country (New Zealand) is not on that list lol
No amount of mod guidance will make that appear
They are a scammer
Don't click any links they post
Gotcha
Everyone wants into the bots ๐ฆ
My server logs are full of this nonsense
3|backend | 2025-07-05 18:02:19:219 error: 404 - Not Found - /api/config.js - /api/config.js - GET - 141.101.97.113
3|backend | 2025-07-05 18:02:20:220 error: 404 - Not Found - /api/config/config.yml - /api/config/config.yml - GET - 172.69.222.123
3|backend | 2025-07-05 18:02:20:220 error: 404 - Not Found - /api/config.env - /api/config.env - GET - 172.69.222.123
3|backend | 2025-07-05 18:02:20:220 error: 404 - Not Found - /api/objects/codes.php.save - /api/objects/codes.php.save - GET - 172.69.222.123
3|backend | 2025-07-05 18:02:21:221 error: 404 - Not Found - /api/shared/config.env - /api/shared/config.env - GET - 172.69.222.123
3|backend | 2025-07-05 18:02:21:221 error: 404 - Not Found - /api/shared/config/config.env - /api/shared/config/config.env - GET - 172.69.222.123
3|backend ```
Just make your own bot lol. It's probably easier than trying to steal one XD
just crawlers
you can ban those ips
xD
lol yeah i got that too, i just grep the env
crawlers crawling env meaning someone actually had their env exposed to public ๐
probably tons of people did
I might Idk
guys
i may be new but i just discovered that discord users that don't set their avatar
don't have an attribute in their avatar.url
so if you try to make embeds with avatar.url it gives you an attribute nontype error ๐ญ
I wonder if I should make fake routes for these that supply totally incorrect info
LMAO thatโs a great idea
i learnt a hard lesson today
turns out i was storing the entire embed in my database
and realised if a million cards became owned just how much overhead/diskspace that would be had to rewrite the entire logic to index all metadata
which is funny coz it was the same thing i did years ago when i was 15 but had even less idea what i was doing
literally every piece of info was being stored rather than a a bunch of intergers representing the card metadata ๐ฎโ๐จ
am smooth brain

managed to shrink my card data by 80%
by indexing
im so dumb i swear
4x more cards with the same diskspace/overhead
yes, when they dont have an url, you need to replace it with one of the default discord avatars
time strings can be stored as milliseconds, and if you want to go even further, UUIDs can be converted to binary and stored as a blob
nice
binary crossed my mind i just know nothing
so i didnt know if it would work
thanks for this btw
That's an interesting take โ I prefer pushing more logic into my application than using database functions / jobs
Not that what you're doing is wrong ofc
I used to do that, do everything locally so I dont need any special db setup etc
What changed?
but Ive slowly gone away from that since its just a CREATE EXTENSION "pg_crypto";
and its nice for stuff like sessions so I can search sessions from the db instead of having to fetch and decrypt
At scale, I've been bit in the ass by letting folks run wild with postgres extensions / scheduled jobs.
Hard to know what's going on when custom extensions are running all over the place. For a single-dev project though, it's totally fine.
well im definitely not gonna mess with schedules, those are just going to be confusing
It's also fine if the agreed upon extensions are judicially chosen tbh
On that note, do you run scheduled/cron jobs for anything? And if so, do you leverage FaaS using CloudFlare / Lambda or do you just run them in your domain code?
I havent gotten to cron jobs yet, I will just run them on the "primary" application monolith
Are you using a monolith framework?
https://github.com/pterodactyl-rs/panel
a single big rust app for the backend
Good on you for learning Rust โ I'm not going to touch that language with a 10ft pole haha
The closest language I'll get to being that low is GO โ and it's still fairly high
eh, rust with tokio and sqlx is definitely lower but not really low
you dont have to worry about memory management either way, like go
compiler does all the checking for you
oh really?! I was under the impression that the rust purists managed their own memory.
Side question for anyone out there:
- Do you all have a preferred wiki technology / documentation framework for publishing discord bot documentation?
I'm hitting a point where I need to start documenting the commands and various ways to use them in a consolidated fashion.
oh hell nah, rusts borrow checker does it all for you, dropping, borrowing, etc.
it is practically impossible (like 1 very specific edge-case currently being fixed) to get a memory error without using unsafe { code
Great to know! That gives me a little inspiration to go down the rust route at some point haha
I guess, at the ending of the day, it's less about the language and more about the use case I'm currently building for. For example, if I'm building a web application that won't hit substantial scale, I'll just do NextJS and build everything in-house within the framework.
I just haven't needed Rust for anything โ I don't build for that type of scale ... and I'm happy to not deal with it haha
๐ its best to always use the lang you are most comfortable with
for me thats rust and typescript
Basically, my mental:
-> I need top-tier performance for scale? Go.
-> I need an easy drop-in solution for a front end? NextJS
-> I need an easy drop-in solution for a front end that isn't tied to vercel? not sure
-> The company I'm working for is all typescript? TypeScript for everything I guess
-> I'm building something AI related? Probably Python ... not for the speed but for the open source community projects behind it
-> I'm building a CLI? Go.
-> I'm in a CI/CD context? Python for glue ... easy to understand for everyone
-> I need a database? Postgres.
-> I need to deploy infrastructure? Open Tofu or AWS (if company is fully AWS)
Honest opinion, do you think this help command properly explains how to use the config commands to like an idiot whos never used a bot?
Yes
my mental:
-> I need top-tier performance for scale? JS (c++ node addon for heavy things).
-> I need an easy drop-in solution for a front end? JS
-> I need an easy drop-in solution for a front end that isn't tied to vercel? JS
-> The company I'm working for is all typescript? JS with JSDoc
-> I'm building something AI related? JS (jk i dont work with AI)
-> I'm building a CLI? JS.
-> I'm in a CI/CD context? JS
-> I need a database? SQLite.
-> I need to deploy infrastructure? definitely not AWS
xDDDD
Oh interesting โ you use JS + JSDoc over TypeScript?
Also, not sure your disdain for AWS?
dw I will find a way to get you to like rust
JS is definitely fine, but I personally just think that language sucks
yup, i like it much more
stupidly expensive and overcomplicated
My entire professional career has been in AWS, building on top of AWS, and cost optimizations for AWS. Once you narrow down AWS to it's select 5 - 10 services that actually matter ... it's not really complicated.
So I'm biased ๐
and the pricing?
If you know what you're doing, the pricing is abysmal / comparable to other vendors.
But yeah, it's a trap for inexperienced engineers.
I'm not going to deny you there.
every single thing they have has scaling pricing, a single mistake and resource leak can cost a lot
i prefer paying a fixed price for fixed resources
That's totally fine too
for example my $5 vps at hetzner
When you're running things at scale that requires coordination amongst different departments / teams ... AWS is the CLEAR winner.
I may have spent many hours doing infra from scratch, but I saved much more money by doing so, with the same uptime
It's basically the Walmart / insert mega shop chain here of cloud vendors.
People tend to over complicate things, and the same can be said for infrastructure management. In AWS, all you really need is an EC2 instance (start with a micro/nano) and you can manage your own TLS using something like Caddy.
As you scale (more requests, more ram, more CPU etc.) you can stretch the same instance or go to a model of horizontal scaling. If you're doing horizontal, it's easy enough just to use a load balancer between the instances. Put the TLS termination at the load balancer.
Congrats, you're basically ready for the most scale you'll ever need.
i cant speak for myself since i dont have hands on experience, but what i got from hearing stories, news and generally how corporate environments work, quite simply they dont care about infrastructure, they have corporate connections and exclusivity contracts and they pay thousands monthly for infrastructure that is 100% overkill and underefficient for their business
That is 100% true
yeah I currently just run 6 vms with 4 load balancers, a bit cursed but it works
cf ->
lb1 -> eu1 & eu2
lb2 -> us1 & us2
lb3 -> sg1 & sg2
exactly, everything you need is pretty much a vps instance and a load balancer, both of which are much cheaper elsewhere than in aws
Are these multiple services?
yes
Yeah that's fair
Load balancer is actually stupid expensive when compared to other vendors in AWS.
imo the only reason to go for AWS is if your company already has a contract with them
Or they're willing to grant you hundreds of thousands of dollars in credits ... which is basically what you're saying.
same for google cloud
a big problem I have is the database costs with most vendors
I can just throw 1 replicated pg db on each node and be done
no extra cost
I've been an infrastructure engineer for US fortune 500 companies. One of which was very meticulous about its cloud costs. I respected it and enjoyed being apart of that team.
It's still what you said, @quartz kindle โ "my boss's nephew works as a VP for AWS and gave us a discount to lock us in with the vendor"
I enjoy managed solutions for databases. I HATE managing them myself.
yeah and even with said discount your company is still paying thousands of dollars, a part of which ends up in someone's pockets
I use Neon right now ... still in their free tier though
crazy
When you look at raw infrastructure costs, sure โ but when you look at it from the perspective of people cost it starts to become a different story. An infrastructure engineer is nearly 1.5x -> 2x the cost of a product engineer.
yeah i've never had to think about that, always been a team of 1
:^)
If you're a team of 1, then by all means manage your own infra haha
:^)
i have google's free tier for testing
What in the world have you built that requires this scale? haha
i only use aws if i need to test compatibility there
some libs i made had issues on their amazon linux
lots of statistics and hash lookups
That's interesting โ is postgres typically considered an analytics database?
I dont think so, its mainly for replication simplicity
statistics are done via a materialized view
Depending on the use case, you may have been able to get away with running it on docker
Not needing an entire instance
well, some people were trying to run it on lambda, and some on ec2
Same thing โ the image is available opensource for both
it required compiled code which wouldnt run there
I'm familiar with that problem haha
because amazon linux had non-standard paths for some build tools
gotta love it
Yep, totally understand this 100%. I have hit this in production.
Sadly.
Whenever I hear the term "materialized view", the "you need a data warehouse" alarm goes off in my head. Have you looked into those types of solutions?
Not all the time, but you also included the idea of statistics
nope, havent looked into much
I totally get keeping it "simple"
But a data warehouse that's postgres compatible would be a suitable bet for that high of read activity.
Cheaper too
well currently it costs nothing for me, it runs on the same servers as the application itself
I used cloudflare D1 in the past but I have ptsd from it (constant downtimes, no read replication)
D1 Database
Create serverless SQLite databases to query relational data.
oh lol โ gotcha
is that cloudflare
yes

i had to leave mid way through some work but i suddenly realised what my error was. couldnt fix it then bc had to go. came back to my note i left
Hi
hi
does topgg have a cookie consent screen?
or do they only show it for EU/UK users?
and do they not show ads if someone rejects it? 
i love my life
[CRON] - Error refreshing Discord token: { error: 'invalid_grant' }
cookies dont affect whether ads show or not
it affects whether ads can use your information to display better ads for you
i meant like, dont you gotta collect consent? before showing ads
oh
the consent is not for showing ads, is for them to collect data about you
Cookies are just stores of data, they are useful for targeted advertising
for example, if you give them consent, they can access your browsing history, patterns, likes, and other stuff to build a marketing profile and send you ads that are more likely to get your attention
ads coming from facebook can access your facebook habits, ads coming from google will access your google searches, etc
I am very proud of this
let mut directory = tokio::fs::read_dir(&full_path).await?;
let mut directory_entries = Vec::new();
let mut other_entries = Vec::new();
while let Ok(Some(entry)) = directory.next_entry().await {
let is_dir = entry.file_type().await.map_or(false, |ft| ft.is_dir());
let path = entry.path();
if server.filesystem.is_ignored(&path, is_dir).await {
continue;
}
if is_dir {
directory_entries.push(entry.file_name());
} else {
other_entries.push(entry.file_name());
}
}
directory_entries.sort_by(|a, b| a.cmp(&b));
other_entries.sort_by(|a, b| a.cmp(&b));
let total_entries = directory_entries.len() + other_entries.len();
let mut entries = Vec::new();
if let Some(per_page) = per_page {
let start = (page - 1) * per_page;
for entry in directory_entries
.into_iter()
.chain(other_entries.into_iter())
.skip(start)
.take(per_page)
{
let path = full_path.join(&entry);
let metadata = match tokio::fs::symlink_metadata(&path).await {
Ok(metadata) => metadata,
Err(_) => continue,
};
entries.push(server.filesystem.to_api_entry_tokio(path, metadata).await);
}
} else {
for entry in directory_entries
.into_iter()
.chain(other_entries.into_iter())
{
let path = full_path.join(&entry);
let metadata = match tokio::fs::symlink_metadata(&path).await {
Ok(metadata) => metadata,
Err(_) => continue,
};
entries.push(server.filesystem.to_api_entry_tokio(path, metadata).await);
}
}
Ok((total_entries, entries))
fast paginated directory listing with sorting
no wasted syscalls
technically I could save time on sorting the entry vectors when only 1 is needed
but thats too far
nice
i swear the kind of comments i leave in my code
#1 so far
now only god know what my code does
Not even god can decipher my code
rusty crab
Crusty Crab

ah yes
Hi
Do you all have a preferred observability platform/tool?
Now that my discord bot is reaching a level of maturity where I want to publish it, I also want to start sending "usage" analytics /events to some platform where I can have filtration of certain discord users and such that use it the most.
I could track this at the database level myself ofc, but I just prefer to leverage some sort of event system where I have the freedom to aggregate whatever I want too
This would likely have to be built out by yourself in accordance to some privacy policy
i've used this a couple of time before
there is another one that is open source that I don't remember that would be great
This would be very easy to make
dang only 2500 events/month for free
posthog has 1M events/m but that was to little for me as well
just selfhost sentry
sentry uses like 30gb ram
posthog is "open source" as well but they're both horrible to selfhost
eh, my sentry container uses 16gb
I just figured that a docket stack with grafana, click house and a small go invest server is way easier
way too much for just simple analytics
my cloud server only has 12gb and my bare metal one 48gb
mhm
that entire server rn uses like 2gb rn
Sentry is nice but it's gotten so resource intensive and bloated
I can't use the error tracking of sentry anyway โ it causes huge memory leaks for me
we use glitchtip
selfhosted
and just use the sentry lib for it
Yea this is why i want to add my own sentry support logging in my project ๐
Also glitchtip dosen't seem to support certain sentry versions and payloads
Sentry uses some weird json protocol thing that has double or triple jsons
{}
{}
{}
idk works fine for us
With every passing day, I tend more towards making everything myself because implementations by others usually suck for performance or have shitty restrictions
Had to make my own build script for my bot that takes mono-repo packages as deps into account because turborepo was failing too much
I should work on error logging with sentry next tbh ๐ welp time to dive in
I can feel the pain
tho I don't have the issue as much with rust as with ts
reinventing wheels is our job
yes
i am first timing svelte/sveltekit for a website
and i already ran into weird ass issues
it builds the website into a hybrid SSR package using Vite
and running Vite on the vps was crashing and running out of memory just from trying to build the project
...
i could built the project on my pc but not on the vps
i was able to fix it by upgrading to vite7 with the new rolldown bundler, which is in beta
and it worked
but gives a bunch of warnings on my logs
@_@
I had to write this recently https://github.com/pterodactyl-rs/panel/tree/main/wings-api/generator-src
open API to rust generator
there was nothing that worked with my setup
it's definitely not very Performant but it doesn't need to run often
takes maybe 500ms
was a ~4h sidequest
Going for the glitchtip aproach for error logs that will be per-project, this means i can also use the projects stuff for other things too ๐
rip
never understood the need for anti nuke stuff
People dont for some reason get to not give every person fckin admin. So people join and get admin then raid the shit
So i figured my bot's role is already above others. it should have it added.
servers with 50 members: 5 admins, 10 mods
me with 4k members: one mod, 3 people with only timeout and delete message perms (unmarked)
Ive also seen servers with 100 members. 90% are administrator perms
"hep my server got nuked"
Yeah\
there are different servers. For example: 4000 thousand, but only 100 are active, and there are some where there are only 100 people and 95 of them are active. Do you feel the difference?
Honestly like every server is odd so ye
show me any server with 100 members an 95 active 
and the servers that I meant usually only have the people active that are amins
ok my d key broke wtf
amen
Lol i had this happen to me once. While coding to.
it just randomly stopped mid talking lmao
i've had worse
my keyboard started randomly typing stuff on its own
imagine coding like that
let it think, its optimizing ur code
i found out it was a faulty touchpad driver
it would stop happening if i uninstalled it
but then i would lose most touchpad features like double tap, 2-finger scroll, etc
No one optimizes tims code
the code optimizes me
actually i have plenty of bad code, some of it i cant bother optimizng, too anoying
new drives installed ๐ฅ time for a bigger minecraft earth map
root@HDE-03:~# btrfs filesystem show
Label: none uuid: 2d52f08b-27bc-4ea0-b596-6f529cf99a36
Total devices 2 FS bytes used 375.68GiB
devid 3 size 3.64TiB used 380.03GiB path /dev/nvme1n1p3
devid 4 size 3.64TiB used 380.03GiB path /dev/nvme0n1p3
root@HDE-03:~#```
Time to do sentry error logging my own style ๐
what is it im your gal
i need to develop a performant method to search/predict the datetime when a specific planetary event happens
currently i have an exponential search into binary search, but the exponential search needs to be replaced with a better method, its too unreliable
I thought it was the ugly nephew
thanks
yes
which one tho
thats the important question
the orange one
both
impossible sir
not in that universe
someone is trying to create a character with my bot in some server i dont know and i got this in console
Failed to edit message due to HTTPException: 401 Unauthorized (error code: 50027): Invalid Webhook Token
this is something about their server's permissions right?
What the heck
no, its not permissions
jellyfish simulator
No
Ahaha no
did you guys see the coconut simulator?
It's a similar game to Steal a brainrot or Feed your pet
No lmao
We are making all the models ourselves
Steal a command? #commands
While learning
Is this related to the earlier message of you saying how to model a cat?(Idk if that was you(
Coconut Simulator is a game in which you can become a coconut.
This game will give you a meditative gameplay. You can stand and contemplate the beauty of the beach around you living your life as a coconut. You can also perform actions that coconuts usually perform (stand in the same place).โฆ
$0.99
260
Yes
I still can't figure that shit out
๐
Damn tail
I can do the eyes and mouth but that damn tail
then what it is? bc i swear everything works fine
can you describe how your command works? is it a slash command?
WAYYY too expensive ngl
yes its a slash command it seems to give an error when the player select their class and continue to the next embed,view for customization
btw the game has a "realistic mode"
which is a black screen, because coconuts dont have eyes
the thing is, is that i cant literally re-create the error
it just happens sometimes in who knows who's server
does the process usually take long?
no
interaction tokens have a 15 minute time limit
all views have a baseview i made which has a timeout of 60 seconds
if you exceed the 60 seconds it timesout and it kicks you out of the interaction
Unless you're a discord favorite cough cough
(the wordle bot can reply to 24 hour past interactions)
do you have any logging setup where you can see in which part the fail happens?
if its in the beginning or somewhere in the middle
depends
not really
the probem is that it happens 1/1000 times
in NEVER in my server
like i wish i could see it myself
i have logs for which interaction view crashes
for debugging
your command works in multiple steps, right? each step uses a followup message?
it edit the current message
i dont like chat spamming
my whole game is in 1 embed x player
ok, so the command triggers a reply, and subsequent interactions trigger an edit on the existing reply, correct?
yes
and i use view.set original response
to keep reference everytime i edit next
so its not that neither
i swear discord sometimes choke or something
you're not wrong
bc sometimes like 1/100 times when im exploring for PVE battle
i hit explore
and get "interaction failed"
then i try again
and it works
????
that happens to me too
it seems discord truly hate not spamming messages in chat
do you use interactions via websocket or via http webhook?
if you're using a library, then its most likely websocket
well... unfortunately there is no fix for this issue
all you can do is add logging and check on which part the fail happens
bc it happens really rarely
if its on the first reply, or on which subsequent edit
so far i see it happens only in 2 places
- character creation
- exploring
i have shit like PVP and matchmaking going on and there are 0 issues
character creation just kill itself xd
if it fails on the first reply, its failing the 3 second rule
ok so when you /login without a character you have a embed + view when you select the class you want
if it fails on subsequent edits, it could be that the original reply was deleted, or the token expired due to 15 minute rule
you hit "customize"
THAT where it dies
but like 1/100000000 and never when im trying to recreate it
i sat one day trying my best to crash it on purpose
with god knows what kind of spaghetti spam
and nothing
no fucks given
no api restriction neither
but Timmy69 from the server "the magical wonderland of fuck you" it crashes it
lmao
but since it aint my problem i aint worrying "for now"
it happened to me a lot, i dont even know if it still happens because i stopped checking logs
bc my bot forces you to have 1 interaction x player
which means if you /log you get logged on a list
so if that crashes
youre on a list still
if you /log it doesnt work
it tells you "youre already logged in"
so im gonna have to do some magician bs to handle that
you need to do a rollback on reply fail
0w0? is that a thing
well, you can make it yourself
whatever functionality you have on that command, you can undo it, if the reply to that command fails
can i just add that to my custom class?
bc i made a custom view class so i have default behavior that inherite to all my views
possibly yes, idk how you structured your code
such as "interaction check" "timeout" "logs"
instead of calling the view from discord.ui.view i call it from my_own_class.bas_view
you can also do a channel.send as a fallback
if reply fails, send a regular message
never im gonna just pop it off the list with the rollback on reply fail you just said
im REALLY againts sending many messages
xD
and everyone who has been using my bot is saying they are really glad this one doesnt spam shit 24/7
like whenever i try a bot not only i gotta learn 49274929 commands but my chat becomes a star wars intro
my bot uses 1 slash command and everything is a menu with 1 embed
yesterday i also finally made pvp snycing 2 instances was so cancer bc im a shit programmer uwu
you could make a hybrid then, which uses two messages:
1 ephemeral interaction reply
1 regular message
every thing edits the regular message instead of the interaction reply
but then you will need permission checks
well, its jsut an idea
oh i use ephemeral only for telling you that the menu youre trying to use aint yours
but do the logging i told you first, check if the fail happens on the first reply
but then again this is the kind of person youre talking to rn
if its the first reply, then yeah, not much you can do, its discord's 3 second rule
but if the fail happens somewhere else down the line, then there might be something you can do
the thing is the error doesnt point me at any like yknow
problem with my class or file
but the error suggests it happens when editting a message
it just says http error
and i wish i could recreate it but i cant
i tried everything and gave up
and im really not in the mood in breaking something that aint broken
xD
did you try manually deleting the message from the channel
well i wish i could
idk in what server this happened
my bot is in like 80 servers rn
i mean, did you test that in your own server?
if you have a 60 second timeout
what happens if the timeout runs after an admin manually deletes the message?
well it depends lets say the character creation i set it to 180
my idea was that
they /login
forget about it
kick the bot
the bot tries to timeout the player
but cant reach the message
yeah thats one option
but it could also happen if an admin deletes the interaction response
xD
nope
i like how i made this logs who knows when
and i forgot about it
i think its the first time i see this
hmm]
can you think of any scenario where the whole command would take 15 minutes?
question
like navigating back and forth between steps?
what do you mean by command
1 command
OR
a whole class
left on
i mean a view
bc whenever you interact to a new menu i call view.stop()
so i stop the timeout
its a fresh new embed, view but same message
so do you mean that for 15min?
but even then
theres no way someone could sit in character creation for 15 min
because when you select class i dont call view.stop()
i call view.self
are you sure? you never know xDD
so timeout will go either ways after 180 seconds
view = menus.class_selection_tab.ClassSelectionTab(interaction.user.id, interaction.user.avatar.url, "Rogue", timeout=120)
await interaction.response.edit_message(embeds=[embed1, embed2], view=self.view)
its actually 120 seconds
can these menus go back? like can a person go to a previous page to change something they already selected before?
yes
and it calls view.stop()
and im 100% sure of this to all my menu
bc thats why i have the log
so what if a person goes back and forth for 15 minutes and never finishes the character creationl?
bc if timeout would trigger at any point without me wanting to, i would see it bc
- logs
- the fucking menu closes
(before the log system i had to guess what class was trigerring timeout)
(it wasnt fun)
(i really wanted to kms back then)
but yeah this is what it does when timeout triggers
self.view(stop)
and all buttons.children = none
yeah but the timeout is per view, right? once you go to the next view, a new timeout starts
yes
and the previous one is interrupted
otherwise it would still tick in background
so if you go back to the previous view, the previous timeout would start from the beginning
and randomly disconnect me
yes
im not sure i dont think anything has set there playing for 15 minutes
but how would you sit 15 min in class selection
if it triggers timeout after 120 seconds
regardless of you changing the selected class
the timeout wont trigger if you switch views before it ends
no it wont as it should be
i only use timeout if ppl just go afk
i dont want random embeds open
i want clean menus
so, you go to the first view, wait 100 seconds, switch to second view, wait 100 seconds, go back to first vieew, wait 100 seconds,repeat
do that 9 times, and the discord interaction token expires
since its valid for 15 minutes
and you get that error
and thats great but
this still doesnt explain to me
how timmy does /login
and crashes in the first screen
ah well, that what i told you before, check if the crash happens on the first reply
if it does, its the 3 second rule
the first reply to an interaction must be made within 3 seconds
well so far i saw that problem like idk 3 times out of 14 days
the only REAL bug that i should fix is that if someone doesnt have an avatar on discord it gives me the user.avatar.url = None
but i couldnt care less
i could fix it
but im petty
if you dont have an avatar
you dont deserve to play with my bot
๐ญ
dis one
d.js does
If you want to display default pfp for a non pfp user the consider using display_avatar instead of avatar. As display_avatar would return default discord avatar if no pfp is there.
lรช-mao
yes yes but
in every file
@quartz kindleunrelated but im building the world, enemies, npc, items ect as we speak like everyday i add more stuff and i swear i had to put a soft-lock cap to lvl 40 that you dont get exp bc im struggling
these mfs are speedrunning dungeons and shit
lmao
Use a non linear scaling
Or make enemies have a xp penalty when they're N levels lower than the player
So they can't farm low level areas
i already have that
exp is matching the formula i use
problem is these mfs would sit there an hour straight non stop
which is fine i don't want ppl to grind forever in a random discord game
Be evil and add a stamina bar
But I had the same problem, some people will just grind the game to dust
you can also just always add more characteristics too like cosemestics with more powerups and those have levels
already have that
this too
the main reason it takes me a lot it's bc i gotta add enemies, drops, npc, locations, ranks for all of those x leve, icons for all i just said so i have to draw and i hate drawing
real
just add id's and make it so they randomly lose matches/fights/whatever
and in the meantime im definetly not balancing the battle system
it's funny bc i get random ideas like "what if ppl want to edit their UI" so i waste like 30 min adding useless stuff like "swap UI"
Are these ranks for boss fights in a game?
Cause if you got igris in C tier you need to reevaluate those ranks. He was almost a general rank shadow in solo leveling
it literally says "idk yet"
That doesnโt answer my question
1 year without dust filter ๐ฅถ
geez
I mean sure but still ainโt no C tier
depends what the other tiers have xd
if S tier has antares on it
C or B would be fine for igris
do I need to understand this
I mean I guess but still igris even in the manhwa was rather strong
Next to beru
Though I guess the mage he later got was actually stronger in terms of firepower
its not sl bot qwq i have random stuff in it
going from half my bot using UTC the other half GMT to timezone is the best quality of life feeling i think ive felt in my journey
@azure trench hello is there anything you would need help with
hmm
im a vibe coder sadly
you would probably recoil at my existence
but am not really struggling with anything in my development phase yet
thought my bot was ready today after years of vibe code
and realised since i changed db structure from strings to indexes the whole thing needed updating
so did that all day
thank you mister scammer, now enjoy your ban
Got em
tim youre my favorite moderator
Tim is not a moderator, Tim is a goat ๐
lmao, ill never be a moderator
but thanks :3
:3
@quartz kindle
lmao
i need some math help
no
my issue is a two-part problem, but i'll start with the first part since it should be simpler
I know some math(addition) so i should be of much help
insert most obscure issue nobody has ever encountered on planet earth here
given two concentric circles (planetary orbits), the maximum elongation of the inner planet as seen from the outer planet should be the point where the line of sight from the outer planet intersects with the edge of the inner planet's orbit (ie, draw a line from point A in the outer circle, to point B in the inner circle, in a way that the line touches the inner circle only once)
something something tangents
now i need to get this angle and convert it to a heliocentric angle
ie the angle separation between point A (point in the outer circle) and point B (the point in the inner circle where a line from A would touch its edge only once) as seen from the center point
the input values i have are the distance between both points from the center
and their angle as seen from the center
this is the elongation angle
chatgpt gave me asin(rInner / rOuter) for the elongation angle, and acos(rInner / rOuter) for the angle i want, but idk if this is correct
you should get smth like
ร = 180 - 90 - (sin(r small / r big)) if not mistaken
maybe need to convert sin correctly to get the angle
hmmm, ah it should always be a 90 deg angle there right?
math savior joined the chat
Above my head
its the other way around...
well anyway
x = ร and ร is x in the drawing but not in the terms
i have the values for side XB (rbig) and side Xdot (rsmall), doing sin(rsmall/rbig) returns the angle of X or the angle of B?
so ร in the drawing I made but in the term it is the other way around
so angle B here would be the center point. to get that angle given sides a and c i should do the inverse of sin, so asin(a / c) = B?
No angle b is the elongation point and then you have to subtract it from the 180-90-B then you have your angle you need
ah yes, A is the center point here
yes
tim needing help is wild
i hate math
You could also use cos... I just noticed that 
with the right math you could use any trig function
i understand triangle math, but i dont understand anything about sin/cos/tan
dropped out of school before getting there
Yeah logical things are my thing, so math, developing, puzzles etc....
ditto
my issues is I have trouble understanding explanations/problems
so like i didn't understand what Tim was saying
but reading all you said what he wrote makes sense lmao
Ye me too, I had to google elongation but then it was clear-ish to me xD
Drop it 
the problem is, if we give these points in the orbit an angular velocity
let me try to draw
imagine this
there is a certain moment in time, where given the velocities of these two points, they will align in such a way that if observed from the red point, the blue point will appear motionless
it should happen shortly after the point of maximum elongation
it should be something like, the angle of elongation plus an offset based on when the speeds of both points appear to cancel each other out
but honestly, i dont really need this, i can get it using an iterative method instead, its just slower
so you need to find that speed?
i need to find the angle at which it hapens
I think this should be the point you are searching, cause anything else is a lesser elongation angle
But the math behind, idk tbh sry
"I understand spanish to a certain level" 
i might i just don't understand the question ๐ญ
yeah well, its not
it varies based on several factors, but the angular speeds are the more determining ones
Yea, planetary systemes werent really my thing 
here's an example:
time angular speed angular separation as seen from the center point
2456585.9999986337 0.11796338701927098 48.88108141257834
{ center: 67.3350568875677, inner: 90, outer: 22.664943112432308 } the triangle angles we just did
2456586.999998622 -0.008261598577950188 45.713492304742374
{ center: 67.68732916256758, inner: 90, outer: 22.31267083743243 }
Get chatgpt to write it as a math problem and i may be able to help elsewise im useless
the moment the angular speed switches signs (the moment it appears to stop and change direction) happens at an angle between 48 and 45 in this case
i've been doing this for a week now
it leads me in circles
and gives a bunch of stuff that doesnt sound logically correct
could you say, has you in, orbit?
lmao
i just suck at understanding problems but i have lots of math knowledge
it doesn't pair well
im the opposite :^)
chatgpt gave me this:
/**
* @param {number} v1
* @param {number} v2
* @param {number} r1
* @param {number} r2
*/
export function estimateRetrogradeHeliocentricAngle(v1, v2, r1, r2) {
const isInner = r1 < r2;
const sinTheta = isInner ? (r1 / r2) * (v1 / v2) : (r2 / r1) * (v2 / v1);
const sinPhi = (isInner ? r1 / r2 : r2 / r1) * sinTheta;
const phiRad = Math.asin(sinPhi);
const phiDeg = rad2Deg(phiRad);
return phiDeg;
}
but it doesnt really make much sense
also the results are way off
for example with earth and venus
time vel angle chagpt prediction
2456688.999997421 -0.01481896147217654 12.127992322477326 58.34411191097084
{ center: 43.17316355979284, inner: 90, outer: 46.82683644020717 } <- elongation angles
2456689.99999741 0.025346686018630202 12.737970401897257 58.35374576572803
{ center: 43.17905380945248, inner: 90, outer: 46.82094619054752 }
the elongation angles look correct, but when the actual moment when their speeds cancel each other out, and angle already closed to 12 deg
Lmfao
then it goes into some 20 line thing with some quadratic interpolation
which returns null
then it reverts to a dead simple 3 line function
which still returns non-sensical values
the more you tell it its wrong or it doesnt work, the worse it gets, it keeps spewing out worse and worse functions and make you run around in circles
Try gemini
grok might get this
@quartz kindle what are you looking for
Alvin and the chipmunks
I just trying to help you and y trollin?
Okey ๐ซก
always trolling :)
what did you want to help with?
Bro wanted to help Tim, rookie mistake
Sentry supported error logging lets go
wdym if we are cool with shards? lmao yeah we are cool with them, they are cool
i would definitely change something in there
go ask
Anyone specialise in SEO?
I'm wondering if i'm doing something wrong... i run a job vacancy listing platform where employers can... list vacancies.
These vacancies pages then get indexed but are subject to removal post-indexing if the vacancy is fulfilled or doesn't adhere to our terms.
This leads to 404's, and put simply i'm wondering if google doesn't like that? Or i get some spammy backlinks showing up on ahrefs and maybe that's the issue?
But i lost 5k of my indexed pages within like 5 days in may and i haven't fully recovered since.
soooo i run my bots using pm2 on my server
i couldnt find a good open source pm2 tracker, and i didnt want a paid one
solution, make my own.
enter rabbit hole. now building a full scale pm2 tracker for public use rather than a small simple one for just my bot
release v1.0.0-beta.1 (which is tbf actually super functional already in my opinion)
what has life come to
its also got a Prometheus style metrics server.
@quartz kindle btw i made the on_error function in my base_view and since i did, it didnt happen again so i cant even test if it works
print(f"[ERROR] {self.__class__.__name__} encountered an error: {error}") i have it logged too so if it did i would see it but nothing
bro just wanted to annoy me
lmao when i tell them its wrong they be like "Oh you appear to be correct, let me go and fix that" its still wrong. "Sorry, thats my fault! Let me fix that for you"
claude sonnet 4 rn has proven to be extremely good with node.js for me, I rarely have had to correct its work ( i still do heavy testing and read through it all before putting it into any actual use) but its speeding up my workflow quite a bit sometimes
i use it with copilot pro
but i think it works so well since it runs alot of code in a sandbox before sending it and also has access with gitlabs and github and major help with its reasoning system
i saw one reddit post saying its coding capabilities were "legendary" and so far it has been pretty good
?
What ur doing ?
try grok, a new version has been released and their convincing benchmarks claim its smarter than all other models
Hell na Grok is the biggest Shit out
intents application
aight
you'll never know unless you pay a small price of $300/mo to try the new parallel test time compute
which allows Grok to consider multiple hypotheses at once. We call this model Grok 4 Heavy, and it sets a new standard for performance and reliability
lol
dont make me send a pic of what grok did last week
I dont pay 300 for a ai lol
Real
it literally relies on elons opinions on things for its decision making
Grok is Propaganda fr
it tweeted something that made the ceo quit i think 
lol
same, submitted yesterday 
first attempt didnt have enough "description"
like bro if you allowed MEE6 you can allow any bot
๐ญ
true lol 
some people lie to get intents cuz apparently discord cant check if those features exist on your bot
you could use webhooks to send some dummy embeds and screenshot them to attach in your intents application
they are annoying as heck though, many people try in vain to get them
most often you will get something like "your feature doesnt need the intent, please use slash commands instead"
i video recorded my whole bot
like if they really can't accept it again i'll just ask them to send me some random discord mod github so they can look at my source code
i use slash commands but lets say tmw i wake up and i want to use prefix for debugging (i already do)
like its so unnecessary
let the community deal with it
they should be instead focusing of all the dating servers 13+ that clearly break tos but they just don't care(?)
They do care but people need to report them first. Unfortunately, this is not the first, second or third server like this, but the hundredth one, and they have learned from their mistakes how to avoid any bans (at the end of the day, they will be banned sooner or later anyway)
That's like saying Roblox doesn't do anything about adult games played by children. They ban them, but they pop up like mushrooms after the rain
yep, thats what i got so ive tried again but this time ive stressed that its really important for some features
that would work 
What's your guys opinion on the cloudflare changes with AI crawlers
hey this was at the top of my messages but u can do this without the message prefix
when i tried it about 1 year ago on a verified bot i had, it can still respond to @ mentions so instead of doing like !!hey you can do like @yourbot hey
yes, message mentioning the bot bypasses the message intent
i see
does anyone know how your bot can be online 24/7 on replit?
Replit isnt quite suitable for hosting a bot
what app would you recommend?
You could get a cheap vps
Or host it on smth like a raspberry pi, thats what im currently doing
thanks
sometimes i wonder if discord actually looks at the video you send them
i also got denied 
i gave a whole ass video review
"yeah you dont need message content intent"
videos shows me using message content intent
exactly mate i think they see the first 5 seconds and come to a conclusion
yea no im not giving u msg intents bye
no im saying that
because they said
"sounds well designed"
so im assumed
they didnt even look at the video
i see
"if you use a feature that needs bla bla"
like if a feature i wont to add wont work bc of intents i dont have now im not doing it ๐ญ
i aint sitting with my code half done bc i have to wait furrymuncher69 to approve my intent
in my case i requested for modules like message based triggers (autoresponders), afk and etc and they said it doesnt need message intents ๐คทโโ๏ธ
my bot was getting good reach towards servers and now im stuck at 100 servers waiting for some guy whos having a good day at work to be generous and approve my intents request
i like that they ask
"do you store any message outside of discord"
bro even if i DID do so
how would you even know?
like this is the kind of "are you 18+?" on corn sites question lmao
For marketplace notifications, you can implement opt-in systems through your game interface.
wait i never thought abt that 
"fuck you about ur code and change it bc im lazy to press (approve)"
exactly
i dont think bro understand
what i even meant
i asked "i need intent to make dms that can be toggled if players buy items to other players"
discord mod: yeah just make a notification in the already made in-game interface
oh yes, lemme just make the menu open by itself in some random server chat yes yes
lol
bc when you get a notification
is not in ur dms
no no no its in a public chat
yes
man im just gonna lie this time idrc anymore
the thing is 99% of the servers my bot is in are fake servers
idk what is this but most servers are
new
filled with bots
dead
yea they prioritise membercount over activity so its mostly botted by themselves or anyone that joins is an ad bot
and they cant do anything about the second case
but the servers are empty
they all look the same
"invite link has been changed to #join"
and it has 1 channel #join
i see
using the intent doesnt mean anything
wdym
they ask if i do use it
and why
so i said yes and showed why
wdym it doesnt mean what
to get the intent, your feature needs to pass two criteria:
- it cannot be made with slash commands (actually impossible to make, not just annoying or harder)
- they actually like it and think its good enough or interesting enough for them to allow it to exist
2 is also partly uniqueness
if your feature doesnt pass the first criteria, remake it using slash commands and move on
if your feature doesnt pass the second criteria, give up on it
its for debugging
literally
if i make something i test it with prefix commands
thats not a feature
^
you can create guild-only slash commands that only exist in your guild
and you can use message commands by mentioning your bot
you dont need the intent for that
discord doesnt like autoresponders or anything that happens automatically without user input. they want bots to only do something if users explicitly request them to
an afk detector still works without the intent though, since it doesnt need to read what the user sent, it only needs to see that the user sent something
@quartz kindle ok but tim
you want ppl to have the freedom to create their own stuff
but at the same stuff "well no actually you need to do it like this"
meanwhile there are bots that truly do fucked up stuff
like this system only annoys ppl who want to do things legally
lol
also all my commands prefixes dont work without my discord ID so even if it did listen it wouldnt work either ways unless its me
yes because of two reasons:
- privacy. people are not comfortable that every single message is being read by random bots they know nothing about
- resource usage. its expensive for them to be sending billions of events to tens of thousands of bots, slash commands avoid that
and heres my deal
who stops you from doing something else get approved
and then change ur bot
i could say "yeah i do X" then i get approved and do Y
nothing stops you from doing that, but good luck finding something that will be approved
"i do X" is the hardest part xD
lol
a lot of people try to come up with random shit just to get the intent, and it never works
because they will only give it for something actually interesting, and if you have something like that, you are not gonna give up on it anyway
do prefix commands use message intent?
if the bot needs to read the content of the message, yes it needs the intent
ok
but if the message mentions your bot, it bypasses the intent
lemme just
message intent allows you to get message content of any message the bot has access to
without it you can get every message content that mentions your bot
so if you mention your bot in the message, you can read the full message without having the intent
hello discord i need message intent
i miss that time on mobile where you can quickly mention user by clicking the username
i would click it accidentally 100 times and have to delete a lot of mentions
:(
but it does not need message intent, they work without slash, you would need a command/function that discord is okay with, and only work with message intent
no my question is
"does PREFIX need message intent => Yes"
ok then i make prefix commands
make it @mention create_character etc
or are you telling me they are gonna say "use / commands instead"
better than nothing
thats not a good enough reason, it doesnt pass the first criteira i told you
this is not my current bot
yes, they are
my current bot uses 1 / command
bc i hate ppl having to learn google docs of commands
but its annoying that i have prefix commands for debugging
and i cant
read it again, they only give you the intent IF:
- your funcionality cannot be made with slash commands (actually impossible to make, not just annoying or harder)
