#development
1 messages · Page 276 of 1
looks like they followed the documentation
:^)
drizzle = slow
the experimental docs
it's name is drizzle for a reason
I might go full on TS for my next project
even tho I hate ts now
but nah tbf at the end of the day its personal pref
so true
Waiting for inline type comments in js
Waiting for when I make it big with my unicorn company ideas
cause I have to interface with timescale to make raw queries
It will happen one day guys
Don't you worry
I wont forget you when I make a quick millie
this def isn't happening but yk
im still awaiting government approval of my business 🙏
Make a promising startup company and then get bought out and just dont work on it anymore
Well
This startup im planning on making rn Idm if it gets bought out
The other one ima hold onto as long as possible

I'd prefer if someone made a compelling offer on my projects I've worked on under my bot's org name
Pretty cool stuff!
Are they even publicly accessible to view?
Yup
Interesting
Amanda's client repo should be of interest as there are packages
so i rewrote my system to accept a Json file for a collection and it works now
it just doesnt support default...
??
idk why
Somewhat concerning that you can assign permissions via a create endpoint
Also you’re storing passwords in plaintext
That’s a very bad idea
yeah i coding bit flags rn
Bitflags has nothing to do with the password being in plaintext
You need to hash and salt the password
just hash the pass
i quit
my guy it takes like 30s
I’m in the early development stage of my swe class project and our passwords are hashed lol
ok
There’s nothing more permanent than temporary
so idk if i undersand this fully
const Permissions = new BitFlags({
APPROVE_IMAGES: true,
BANNED: false,
});
would banned allow them to not do anything or i am doing it wrong
Why is “BANNED” a permission and not a field
huh
Perhaps I don’t fully understand what you’re doing here
Is that permissions variable being assigned to something elsewhere?
this is what my code does
const Permissions = new classes.BitFlags({
APPROVE_IMAGES: true,
DELETE_POSTS: true,
COMMENT: true,
VALIDATE_POST: true,
CREATE_POST: true,
DELETE_USER: true
});
const userPerms = Permissions.combine("APPROVE_IMAGES", "DELETE_POSTS")
console.log(`Users Perms: ${userPerms}`)
console.log(Permissions.has(userPerms, "APPROVE_IMAGES"))
I see
Still don’t fully understand why this requires a package but to each their own I suppose
its just my own code
hey
also this is how i store it in the db
why is it still an object
done
why are you awaiting them
const flags = await global.Permissions.combine(...userData.perms);
``` module combines tho
them*
ykw i could remove that await in the user
and why is that async
huh
why is combine async
i'll run it without await
oh it actually ran quicker
actually
1: No await
2: await
singapore 🥀
Singapore is a weird location, when it works it is a decent location
but when it doesn't it REALLY REALLY doesn't wanna work or behave in any useful manner
so im wondering when a request is put in to update the perms of a user it also requires the person attempting to update someones perms to be passed along and check its flags there
is that a good idea?
I'd assume your users are based in Singapore? or is it just for a feature you have
I have 3 server locations, us-east, germany and singapore
germany has the primary db (for writes)
there were people complaining about slow api responses in asia so I added singapore
Hopefully that helps a fair bit ahah
😭
how would you be checking the permissions of the user that is attempti9ng to modify it?
you need to be able to uniquely identify a user based on a request, e.g. some sort of auth token
no i mean like so moderators can only update another persons perms
check the mods perms
I understand, but how will you be checking if the person sending that request is a moderator
hmm
welp i gotta find that out
You need auth tokens
You cannot trust the frontend at all, the only way to trust it (usually) is for the server to give the client a secret, then have the client send that secret back to the server for verification upon requests
Basically the server has a private key that it uses to sign an auth token/cookie given to the client upon logging in, then that cookie/token is sent in with each request the client makes. It uniquely identifies the user, and cannot be impersonated by some other user
also imo flags looks awesome
OMFG FOR THE MILLIOTNH FUCKING TIME IM GONNA WORK ON IT SOON
so should i encrypt before sending to the API?
What
no
you're literally saving plain text passwords
those are mongodb documents right?
oh
or objects
thats the db, and those are test users

Test or not, should implement same security practice
How do you login with test users
when the passwords aren't hashed
verifying the "hashes" wont work here
ok im gonna code it now
no, you send the password as plaintext to the API, then when the API goes to save it in the database, it puts it through a one-way hash function and adds a "salt" to it
That way you can check that the password is valid when attempting to log in, but you can't recover the password without a lot of work if the database gets leaked
kinda did it quick but
chatgpt did it quick 😉
lol
no shame in using AI as long as you don't want to learn much
can't lie I'm using it right now to write the frontend for my swe project
sick of this class and just need it done quick
was just a guess, I've seen some other stuff in your project that was ai-inspired at the least
I'm not judging, just sayin
fun
new error time
the second i remove the hash code it works 😂
welp ik my error
done, happy now?
there you go
I feel like thats a lot of unneeded information
eh
i like it
so does like 90% of my friends
I am confused
Is this for you and your friends
or for customers
Your average customer isn't going to even spend time looking at half that shit
they want immediate access to whatever they are buying
everyone
Tough news
your opinion doesn't matter much
Keep it, but your average person won't look at most of that
They want immediate access to whatever they are signing up for
thats why i added the login in now button
Such a massive improvement compared to Portainer in parsing label values for actual useful data 
?
Looks sick
actually ima move the buttons to the top
Just from my personal opinion this isn't needed
well that was easy
i'll remove it after
People will know what account they are verifying, they will know its now active since it literally says "Verification Successful"
and knowing when they verified isn't really useful to them
ykw actually if people really wanna see it, if they like info i'll make it a dropdown bc why tf not
but i'll hide it
do what?
oh
i just did this
also does the background image look good for the page?
Sure
i chose it bc its related to the site
I wonder what a blur looks like
lets see
nvm
stupid webkit filter wont work on it
I listen to a lot of EDM and monstercat when coding
ah i listen to country and rap
i grew up around both of those
apparently not
bruh its returning a string
Tiny name/email leak :3
oh thank you
HUH
Number() is a Js object is it not???
everything is a js object
im so confused
const updateResult = await collection.updateOne(
query,
{ $set: { "verificationProcess.currentCode": newCode } }
);
``` it has to do with this line
does updateOne expect a json object?
i actually dont know i was following docs on this one
my class for the db uses mongodb not mongoose
It depends on the field type set in mongo too, if your currentCode is set as a string instead of number in mongo, not sure if the js mongo lib converts it?
its trying to set this
this is the whole user:
{
"bsonType": "object",
"required": ["username", "email", "password", "flags"],
"properties": {
"username": {
"bsonType": "string",
"description": "The user's username."
},
"email": {
"bsonType": "string",
"description": "The user's email address."
},
"password": {
"bsonType": "string",
"description": "The user's password."
},
"profilePictureURL": {
"bsonType": "string",
"description": "The URL to the user's profile picture."
},
"flags": {
"bsonType": "int"
},
"verificationProcess": {
"bsonType": "object",
"required": ["verified", "currentCode", "codeExpiresAt"],
"properties": {
"verified": {
"bsonType": "bool",
"description": "Whether the user has been verified."
},
"currentCode": {
"bsonType": "int",
"description": "The current verification code for the user."
},
"codeExpiresAt": {
"bsonType": "date",
"description": "The expiration date of the verification code."
}
}
}
}
}
is newCode a json object or what
or wait no thats the schema nvm
newCode is an int Object
idk what Selector is
nor do i
it makes me think that query is invalid type
never had this error
send the value of query
query is my email: Query: replacedName@gmail.com
the query can't just be the email
const updateResult = await collection.updateOne(
{ email: query },
{ $set: { "verificationProcess.currentCode": newCode } }
);```
Yea as I thought
i think mongo hates you
its one error after another 😭
I wish that error would return what caused it to fail
oh
IM SORRY HOW DOES THIS HAPPEN
Bro forgot to floor
brought it back down to 6 digits and that fixed it
Lul
now to figure out how tf to verify them
nah rn this is all i use:
const randomCode = require("generate-random-code");
async function generateVerificationCode() {
let code = randomCode.generateVerificationCode(6)
return code
}
IM TOO LAZY TO WRITE CODE TO GENERATE ANOTHER CODE
luckily its easy to just swap it
build times go brrr
yeah i learned that
literally just randomly generate an alphanumeric letter
ezpz
if its numbers
numeric
these just kept causing cargo to take forever
i also just learned u can handle 404s on express
huh
i'd be more worried if you couldnt
very proud of this mess
is that fan simulating wind speed?
ye
amazing
final server code https://pastes.dev/sgMSpHfRQH
final arduino code https://pastes.dev/xfWgdTQDh0
guys can i ask where is the channel where it show i add my bot to top.gg and they add/decline the bot
Ty
I was pro mongo until I used any form of SQL
Because I wrote an SQL query to mongo query for fun as a developer command on a bot and then I decided "well why not just try it" have not left since
mongo has its uses but its definitely not for structured data like in most bots
I still reach to it for very simple projects or testing
mango > mongo
🥭
i like using postgres for everything
i pretty much use sqlite for everything unless i have a solid reason to use postgres early on
my only experience with sqlite is quick db 💀
i mean if you know how to deal with postgres you know enough to deal with sqlite
it's a lot easier working from a file than an actual network connection
Hey guys
i also just use postgres wherever possible
it's the same thing, except there's only one type for each thing
and you cant create procedures/functions, and triggers only support pure sql
ew
Hey mike
How you doing
Doing well about to head to class
That's good
Easy class too then mountain biking after
Okay
@prime cliff whats the link for ur docker thing again
Ima try and install it again
:p
Oh its in ur bio as well

Thanks
Ima give it a shot
Had to reinstall portainer so I thought i'd give ur project a try
What is Dev Space Agent?
Do I need both?
afaik it's purely so you can manage other servers
So its not really needed?
Fairs
I've been developing Discord stuff since 2016 ofc i have a server 
Yea
And to answer your question it basically works like portainers you setup the website and then install the agent on each server you want to manage docker with
Most of the docker/portainer feature are available aside from some issues with creating stacks, no container console access and no per-container/stack permissions yet
Other than that it's mostly stable and functional with some neat features already
Right so I caused an uh oh oopsie
Waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 56660 (apt)
Anyone know how to fix this

I just rebooted and fixed it
Everything I saw on the internet looked very sus
I see, and does this really use .net framework or is that a misinterpretation on my part?
I assumed it used .net core
It uses just .NET
.net framework is the very old 4.7/4.8 that's preinstalled on windows, then there was .net core up until .net 6+ where it just became .net
What are you having issues with? it should just be running the docker compose up -d
I have it running
its the setup process
Like the last time I tried using it, it freezes
Finally it responded

Does that aws have some kind of option to allow SMTP or something
Let me see where that error is coming from hang on
https://pastes.dev/v6JzjN244S this is what appeared in logs
Apparently it "aborted"
Hmm yea look like it's not connect to aws smtp somehow
I've had issues like this in the past
Where docker prevents SMTP
I dont really know how I fixed it
It might be that the container is missing a certain ssl linux package or something aws needs will do a bit of testing now
Alright
It also often crashes a lot during setup
devspace-web | Unhandled exception. System.FormatException: The format of value '<null>' is invalid.
devspace-web | at System.Net.Http.Headers.HttpHeaderParser.ParseValue(String value, Object storeValue, Int32& index)
devspace-web | at System.Net.Http.Headers.HttpHeaders.ParseAndAddValue(HeaderDescriptor descriptor, HeaderStoreItemInfo info, String value)
devspace-web | at System.Net.Http.Headers.HttpHeaders.Add(HeaderDescriptor descriptor, String value)
devspace-web | at DevSpaceWeb.Services.HealthCheckService.RunChecks(Object sender, ElapsedEventArgs e) in C:\Users\Brandan\Documents\Visual Studio 2022\Projects\DevSpaceWeb\DevSpaceWeb\Services\HealthChecks.cs:line 94
devspace-web | at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state)
devspace-web | at System.Threading.ThreadPoolWorkQueue.Dispatch()
devspace-web | at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
devspace-web | Aborted (core dumped)
This is what it throws
Constantly needing to restart the container
I'd report this in your server but idrk what channel im supposed to do so in
😅
Ah i see what it's doing
Since smtp isnt actually setup it's breaking the health check endpoint
Let me try some stuff
Sounds good
lmk if you need an aws smtp user
I can just let you use it to test
:p
unless u already got one 
Hu that's weird
@sharp geyser try running this docker exec devspace-web openssl s_client -crlf -starttls smtp -connect email-smtp.us-east-2.amazonaws.com:587
Oh no wait nvm
Do it with devspace-web instead docker exec devspace-web openssl s_client -crlf -starttls smtp -connect email-smtp.us-east-2.amazonaws.com:587
Quite literally nothing is being outputted
and its taking ages
I think its going to return with a refused connection
Hmm interesting is your vps provider blocking smtp or something
I use Digital ocean so it may be possible
Ok lucky you can use mine instead
you have one?
Yea the fluxpoint managed option
Will add a notice for that smtp block too thanks for testing
No problem
How much you pay AWS for the SMTP lol
Nvm that's cheap 0.10 per 1000 emails received
remember kids, gmail SMTP is free
iirc its more cheaper if you send from ec2 instance
like, a lot
Gmail smtp has a limit of 500 per day i think??
And other weird ratelimits.
SaltMiner.js:9 Refused to connect to 'wss://oliegrey.com/' because it violates the following Content Security Policy directive: "connect-src https://1348684765481402409.discordsays.com/.proxy/ wss://1348684765481402409.discordsays.com/.proxy/ https://discord.com/api/ https://canary.discord.com/api/ https://ptb.discord.com/api/ https://cdn.discordapp.com/app-assets/ https://cdn.discordapp.com/attachments/ https://cdn.discordapp.com/avatars/ https://cdn.discordapp.com/embed/ https://cdn.discordapp.com/ephemeral-attachments/ https://cdn.discordapp.com/guilds/ https://cdn.discordapp.com/icons/ https://media.discordapp.net/app-assets/ https://media.discordapp.net/attachments/ https://media.discordapp.net/avatars/ https://media.discordapp.net/embed/ https://media.discordapp.net/ephemeral-attachments/ https://media.discordapp.net/guilds/ https://media.discordapp.net/icons/ data: blob:".
how do i use websockets on discord activities. making a game in godot using websockets to communicate to my VPS which has a secured connection set up.
if anyone was curious, the solution was to add a url mapping in my settings then use wss://1348684765481402409.discordsays.com/.proxy/<prefix from url mapping> when i create the websocket, which proxies to my server
is working multiplayer activity now
just need to get my server re-launching itself on a github pull and i have everything automated and can finally focus on the actual game
🙃
Bruh
nginx vs traefik (response time)
of course it was written in go
this is what basic auth does to your response time children
is that what caused the huge difference in performance?
i wouldnt expect nginx to be much slower if slower at all
it does look interesting though
i dont like how nginx locks some of its features behind a paywall so it would be cool to move away some day
have fun with this
from experience, I had trafaek die under load multiple times
traefik once like
certificates died
for precisely 6 hours
it just wouldnt respond to tls messages
would just ghost
ok 1 that's a lot
this was like 4-10 req/s
nginx can be whack, a lot of things can affect its performance
config, version, plugins, etc
was that mainline 1.27?
latest docker afaik
ah idk about docker, i have it installed on host
i use kong
instead of nginx directly
for this exact reason
yeah there are a lot of stacks that are built on top of nginx these days
like SWAG and NPM (nginx proxy manager)
there are also nginx forks like Angie, which also add a lot of features from those stacks as built ins
Empower your development with the world's most adopted API gateway. Experience unmatched speed, flexibility, and scalability. Discover why developers trust Kong Gateway for their API and microservices journeys.
More than just another GUI to Kong Admin API. Contribute to pantsel/konga development by creating an account on GitHub.
angie has brotli and auto ssl
swag is a docker container which includes nginx certbot autoban etc
npm has a web dashboard for configuration or something idk
though I need to move off konga apparently
Caddy looks cool
i was watching some benchmarks
realistically nothing really beats nginx (except haproxy), but if you're within 90% of its performance you're good enough
but nginx's default config is ass
all those benchmarks that show X being faster than nginx its because they're using nginx default config lmao
the only downside with caddy is its written in go
but but but
I like go 
Time to make my own nginx like proxy
I already studied HTTP 1.1 quite a bit trying to make my own stream based client because the built in ones don't play nice with an audio server I would sometimes request from backed by SHOUTCast/ICECast
All because they didn't put the HTTP/1.1 at the start of the payload
Time to learn HTTP 2 and Quic
why is my messageCreate event not firing for dm messages?
good luck
xD
well its not bad, but it does lose an edge compared to C-based webservers
fair
but then a lot of things lose to C
for good reason 
:^)
Thanks. I heard Quic is really hard to impl
supposedly nginx supports quic
yeah it took me days to figure out how to enable it
and honestly i dont even remember how i did it
ah i remember now
i had to explicitly allow UDP on port 443
completely forgot quic works on udp lmao, we are so used to web being tcp all the time that didnt even thought of it for a long time
does enabling quic actually do much?
only some clients support quic, but it's much faster to produce a response
for regular websites and modern browsers yeah
the more small files it has the bigger the difference
yeah, its like
http1 = turn based game
http2 = timer based game
http3 = real time game
lmao
the most ass analogy ever
There is an http3 already?
Yup. That's Quic
I wonder when it will be fully adopted
Which I guess is realistically all that matters
idk. HTTP/2 isn't even that common
Though nginx does HTTP/2 front facing and converts the traffic to HTTP/1.1 for the backend
Dunno why the nodejs team focused so hard on undici when HTTP/2 is yet to be common in js
Why is http2 not common?
There are quirks with HTTP/2 where you can't as cleanly translate your application. Typically, your web server is stream based where you'd write your headers then your body and then call res.end() indicating the end of the response. With HTTP/2, you can reuse a socket to fulfill multiple requests through multiplexing. This adds a not insignificant amount of complexity to optimizing your app if you wish to take full advantage of HTTP/2. Browsers still send HTTP/1.1 as a supported alpn since if you're gonna treat HTTP/2 as HTTP/1.1, might as well use HTTP/1.1
Quic also adopts this multiplexing on top of being UDP based along with some other hard to implement protocols like being encrypted basically out of the gate
A major slowdown for internet traffic was handshakes and the fact that it's built on TCP for its rigidity against packet loss. Now Quic implementations may take even longer to become available and even longer to be mainline
Quic does have its own packet loss prevention protocols
What the hell does this bs mean
Did you refresh your cache
Can you make requests from some kind of cli
How do you do that again 💀
➜ zitadel curl -I https://lovewithnikki.rocks
HTTP/2 526
date: Wed, 16 Apr 2025 03:59:03 GMT
content-length: 0
server: cloudflare
cache-control: private, no-store
cf-cache-status: DYNAMIC
cf-ray: 9310c4909f7e18e6-FRA
alt-svc: h3=":443"; ma=86400
➜ zitadel echo | openssl s_client -servername lovewithnikki.rocks -connect lovewithnikki.rocks:443
Connecting to 104.21.70.159
CONNECTED(00000003)
depth=2 C=US, O=Google Trust Services LLC, CN=GTS Root R4
verify return:1
depth=1 C=US, O=Google Trust Services, CN=WE1
verify return:1
depth=0 CN=lovewithnikki.rocks
verify return:1
---
Certificate chain
0 s:CN=lovewithnikki.rocks
i:C=US, O=Google Trust Services, CN=WE1
a:PKEY: id-ecPublicKey, 256 (bit); sigalg: ecdsa-with-SHA256
v:NotBefore: Apr 5 02:34:17 2025 GMT; NotAfter: Jul 4 03:32:51 2025 GMT
1 s:C=US, O=Google Trust Services, CN=WE1
i:C=US, O=Google Trust Services LLC, CN=GTS Root R4
a:PKEY: id-ecPublicKey, 256 (bit); sigalg: ecdsa-with-SHA384
v:NotBefore: Dec 13 09:00:00 2023 GMT; NotAfter: Feb 20 14:00:00 2029 GMT
2 s:C=US, O=Google Trust Services LLC, CN=GTS Root R4
i:C=BE, O=GlobalSign nv-sa, OU=Root CA, CN=GlobalSign Root CA
a:PKEY: id-ecPublicKey, 384 (bit); sigalg: RSA-SHA256
v:NotBefore: Nov 15 03:43:21 2023 GMT; NotAfter: Jan 28 00:00:42 2028 GMT
---
Server certificate
-----BEGIN CERTIFICATE-----
MIIDvjCCA2OgAwIBAgIRAKiAeYOer1MmDQHveKxjMowwCgYIKoZIzj0EAwIwOzEL
MAkGA1UEBhMCVVMxHjAcBgNVBAoTFUdvb2dsZSBUcnVzdCBTZXJ2aWNlczEMMAoG
A1UEAxMDV0UxMB4XDTI1MDQwNTAyMzQxN1oXDTI1MDcwNDAzMzI1MVowHjEcMBoG
A1UEAxMTbG92ZXdpdGhuaWtraS5yb2NrczBZMBMGByqGSM49AgEGCCqGSM49AwEH
A0IABANiivrdXKY8NoS66oUjxeWVSVThhKkXidocTqfrkk/BDFDle37m5Ir4y9/8
pxNHa0rs9KxQK8/f3S88zOwq0K+jggJjMIICXzAOBgNVHQ8BAf8EBAMCB4AwEwYD
VR0lBAwwCgYIKwYBBQUHAwEwDAYDVR0TAQH/BAIwADAdBgNVHQ4EFgQUJlb6Gaja
Uqcls/PzFc2UiCsmm0QwHwYDVR0jBBgwFoAUkHeSNWfE/6jMqeZ72YB5e8yT+Tgw
XgYIKwYBBQUHAQEEUjBQMCcGCCsGAQUFBzABhhtodHRwOi8vby5wa2kuZ29vZy9z
L3dlMS9xSUEwJQYIKwYBBQUHMAKGGWh0dHA6Ly9pLnBraS5nb29nL3dlMS5jcnQw
NQYDVR0RBC4wLIITbG92ZXdpdGhuaWtraS5yb2Nrc4IVKi5sb3Zld2l0aG5pa2tp
LnJvY2tzMBMGA1UdIAQMMAowCAYGZ4EMAQIBMDYGA1UdHwQvMC0wK6ApoCeGJWh0
dHA6Ly9jLnBraS5nb29nL3dlMS9wVkhrQWJiSUx3WS5jcmwwggEEBgorBgEEAdZ5
AgQCBIH1BIHyAPAAdgAS8U40vVNyTIQGGcOPP3oT+Oe1YoeInG0wBYTr5YYmOgAA
AZYEA3hEAAAEAwBHMEUCICzSJvuWmnGvhRrMiImR7O7LkGpdoXBfekUKrB0AYKs8
AiEAx0VXHCkN2tWJLC861YfPKaJUpFiYdVi+xmnXHelVCi0AdgDM+w9qhXEJZf6V
m1PO6bJ8IumFXA2XjbapflTA/kwNsAAAAZYEA3xqAAAEAwBHMEUCIAvNpfkYKpz9
G3hFljEFseyriPoKOaad1LTTQfaX601kAiEAgZyUgchQvBZi9+QYeizSUSpZjDs+
YsJkOLwgR2UO0u8wCgYIKoZIzj0EAwIDSQAwRgIhAIhYgeg3FHLja0wjJhlFkVzk
HoNSoMYZ//DM8++c3qcFAiEAwBCtKIKylfotvpW+4+IQIyFbT0551nr3dQ54FZh7
/Mc=
-----END CERTIFICATE-----
subject=CN=lovewithnikki.rocks
issuer=C=US, O=Google Trust Services, CN=WE1
---
No client certificate CA names sent
Peer signing digest: SHA256
Peer signature type: ECDSA
Server Temp Key: X25519, 253 bits
---
SSL handshake has read 2851 bytes and written 416 bytes
Verification: OK
---
New, TLSv1.3, Cipher is TLS_AES_256_GCM_SHA384
Server public key is 256 bit
This TLS version forbids renegotiation.
Compression: NONE
Expansion: NONE
No ALPN negotiated
Early data was not sent
Verify return code: 0 (ok)
---
DONE
dk if this matters
Is it...not using the wrong cert?
Shouldn't it be the key thats available
or am I wrong
Ah so it doesn't matter if its your browser or some other cacheless client thats requesting. CF acting as a proxy is the one saying your SSL cert is wrong. Either misconfig or expired
you using cloudflares origin certs?
yes
yes
using 1 file or a .key and .crt
using a pem, key and crt
I've never given nginx a full chain
:^)
literally ever in my life
lmao
I normally just give it Key / Cert and it works
Interesting
I've always given it full chain
And it always works
I have regened the certs in case that was the problem but no dice
How would the nginx config look?
you have to with origin server on cloudflare
I normally just give it the cert and key from cloudflare and it works
I use Full (Strict)
for everything
and I have never used that
do you turn on Authenticated Origin Pulls?
Where you generate the origin certs
How does your nginx look then
I’m confused on how you don’t give it a full chain
Do you even use origin certs?
Or are you using let’s encrypt
I do use origin certs
How
we do for topstats too
You aren’t supposed to be able to
Without enabling authenticated origin pulls
it just checks the SSL certificate from the server is the right one
and lets traffic through
I’m so confused
I have to enable authenticated origin pulls or I get a different 5xx error
which 5xx error
I don’t remember off the top of my head
Something like that
Yea uh
It’s been a while
You literally just need to give the Key / Crt as the key / crt files
I’ve never gotten a 526 tho so this is new
Sure
I’ll try it out tomorrow
But before it would always tell me I had an invalid origin certificate and the only way to fix it was to use a client cert with authenticated origin pulls
I use origin certs
Then what is client certs
No idea
Ive never touched them
origin cert is literally just an SSL certificate for Cloudflares proxy to validate your server
Flexible: allows https -> http
Strict: requires HTTPS -> SSL 443
im so confused
I disabled authenticated origin pulls right
and deleted the client stuff from nginx
restarted nginx
and still 526
uhhh
like bro
I know why
is this shit just cooking me rn
I just noticed

Yea

apparently my pm2 stuff got destroyed when I rebooted
cause the pm2 script is missing
pm2 resurrect
I have to save this shit now??
lol
I always thought my pm2 stuff was just broken
never knew I had to run a cmd
No wonder
Well it works now
great
Thanks Mr Villager
now me go sleep or my gf might get pissed off at me when I wake up late asf

if im using djs is it not possible to scale the bot with sharding?
like do i have to manually specify the shards? on each machine?
it is possible
how?
i read this before like way back and implemented it, but like if i start the bot in 2 different vms the commands start duplicating which means same shards are being spawned in both the vms
one way i found was you manually specify the number of shards you want it to spawn like [1 - 10] in vm1 and [11 - 20] in vm2, but this isnt really an effective way of doing things
was wondering if there a way to automate this
you can make a program to get request to /applications/@me as stated here https://github.com/discord/discord-api-docs/discussions/3252#discussioncomment-6443155 to get the bot's guild count, and then you count yourself how many shards you need on each instance
every time you change the total shard count, you need to shut down the entire bot, change the shard settings on all vms and restart them
Yeah but that’s so inefficient
Thanks
Isn’t this still kinda inefficient cause like imagine more and more servers keep adding the bot. And the shards keep growing, I can’t manually keep calculating them no?
How are big bots managing this?
yeah but changing shard count is something you should do very rarely, ideally you do it every time your bot doubles its guilds, for example from 16 shards to 32 shards
you dont need to go for any inbetween
I see, hmm
I just wanted to see if I could auto scale it or something
Not have to do anything manually
you can, but it will involve shutting down all shards, otherwise good luck filtering through duplicated messages
because every time total shards change, guilds get reshuffled into diffetent shards
Right
so when you start a new shard, you need to get all its guilds and send a message to other shards to ignore those guilds
until all new shards take over
got it , thanks!
Bap
anyway, @warped glacier
cluster 0 is what is going to recieve the webhook
port 1738 (couldnt think of anything else
)
Works lol
they all share the same db
Make a table then named like "Votes"
yup already there
ive been testing locally and it works wonderfully, basically procrastinating pushing it to prod now lol
wrong screenshot thanks windows
Store them there and have all clusters make a interaction check. Something like.
@discord.id = "id"
SELECT *
FROM votes
WHERE discord_id = @discord_id;```
If it returns the value. Just assume true
alright yeah will do
Let me know how it goes
OOF
fml 😭
Thats why i dont do clusters. Its hard to figure out what branch to push plus why do you need a cluster. Just shard it!
unfortunately having 25 shards running on a single instance just doesnt work
(I also hard code it. No pretest 95% of the time lol)
my bot was soooo slow
Actually?
When i was origionally ssetting up my shards i did 30 (It was in like 100 servers i was pre setting it up due to how fast its growing) And i was only having 1-2 sec delays
All of those shards were being invalidated because there arent any guilds filling them
so ofc there werent any delays
my bot is in around 22k servers, over a million users
shits crazy at these numbers lol
had to setup a grafana instance so i could view my clusters logs too
No i need privlaged intents. There not responding
still working on bringing my previous changes up after pushing to the wrong branch
I really dont want to cluster my bot but know ill have to later. I run PTERODACTYLPANEL also so that will be fun
Does it work on ubuntu?
Yes ofc
I use proxmox for my vms. My clusters are on 1 vm, and my other services are on other vms
in my cluster vm, i have other shit in there too
Ill look into it. PTERO is intalled on a system in my ubuntu pc called casaos. I would have to look it up and take a look into it.
Mine would be odd as ubuntu for me is GUI system.
Should still work tho
and that was just bc i was too lazy to setup a proper remote access.
proxmox is very neat. Everything related to my services, bots, etc is under vm 100, the other vms are unrelated but its all the same machine
real
ive heard good things about proxmox. The system is old and wants to die.
already had to replace the HDD. now trying to upgrade the ram
You will need a beefy system. as you can see mine is pretty well used
the ram is cached, so its not actually using that much, but that much ram is being assigned to other vms
agreed
proxmox is cool
See the system has room to be upgraded. CPU is decently beefy. Just low ram amount and low storage (Upgraded it to a 1tb HDD)
its not a proper server either. Just a old pc i modified to run as a server.
Nice.
bc i dont want to fork a ton for a proper server
which host you with rn
Just rent an ovh bare metal
thats what im doing
how much is that
like 120$ a month
Self hosted with old pc parts
something like that idr off the top of my head
I cannot afford to rent a ovh
nice
okar back to work
got this cpu for free 🔥
NICE
0€/month 🔥🔥 (ignore electricity)
i need a better cpu
i need to just build a pc to run my shit
Pi my beloved
well
temp doesnt matter that much, but its insanely loud when all nodes are doing stuff
(well the heat did kill 6 sd cards already but eh)
i mean it is a server
well yes
full noctua setup though, when only one node is active, 100% cpu usage cannot be heard
why not watercool?
I have alot i need to do with my setup. Its ssry just a open pc sitting on the ground. I cant get a proper rack as my ISP will shutoff my internet if we have a server (Plus in a apartment) So what i prob need to do is build a BEEFY pc and set it up to run as a server
lol
I love debugging ip issues
DoSeNT EvEryOne?
7900X3D 96GB DDR5 6600 (air cooled)
9900X 32GB DDR5 6400 (water cooled)
5900X 64GB DDR4 3600 (water cooled)
5800X 32GB DDR4 3400 (air cooled)
And the way my server is setup i cant even nmap to see if my port is actually open or not
dying
#fails 2025
WHY!!!!!!!
why wat
Half air half water???? WHY DID YOU SET IT UP THAT WAY!
Touche
I kinda want to make a custom loop for the rack so that theres a radiator on my roof
Why dident you water cool the 96GB tho over the 32?
if its a 96GB system its obviously designed to handle more. Wouldent it need the cooling more?
LETS FUCKING GO https://i.hep.gg/dqL-huhua
WOOOOOOOOOO
does top.gg require https webhooks
pls say no
NEVERMIND WOOOOOOOOOO

i used hetzner for a while
yeah I have some self-hosted and some hetzner
moved to ovh due to latency issues because hetzner is in germany lol
(everything that needs 100% availability is hetzner)
100ms Latency to discord is fine
I know of a few large bot devs who use hetzner
so :^)
ive had 100% availability on ovh
clustering is pretty goated tbh
Instead of having to restart my entire bot, all i need to do is restart a specific cluster while i test these changes
lets go
need to fix the multiple embeds, but i dont think it'll happen during normal votes
it doesnt happen during normal votes
HOW TF
I want to do this. Tried to do it and failed
i dont understand their API Tbh
It is nice. I want to see if i can setup my server to run a test bot and if i run a commad like /go it pushes it to my main
i just dont know how
google is your best friend for this
(And gpt if i had the energy
Yeah but like i said. It involves a odd pterodactyl panel instulation and alont PTERO runs 2 docker instances so i would have to figure out how to send across a docker instance.
And CASAOS not stopping it
I have a thought and would like to know if anyone has done this. I can run a GITHUB (Private) And send the code there as a cloud instance. Could i then have a reboot command and on boot pull the latest instance from github?
you can
simply set up your credentials on where you'll be pulling the code
I kinda like this idea as it also gives redundent backups
Because then ill have 2 backups in 2 places
I might make this change later
🐍
Forcing myself to fix it today
Complete rework including fixes to some delays when im banning users.
Love how DO blocks typical smtp ports
so you can't even use AWS smtp normally
You have to hope the SMTP provider has a rest api

@prime cliff one critique (minor), if you only have one team, or even if you have multiple teams. Why doesn't it just put you to the team's page, or even the page with the list of teams when you login
Especially since clicking My Team is the only initial option you have
unless you click elsewhere in the top nav
I have to do a lot of navigation just to get to where i want, which isn't that big of a deal tbh just wondering why
Yea i could do that it's also currently set to redirect you to the last page if you use oauth login too
I see
Also removing containers and stacks seem a bit buggy
Was throwing errors like the container not being stopped even though it was
fuck, it is indeed understanding my code
Wtf is this
intellij junie
Some jetbrains AI shit?
yes
yep, I asked it how can I detect whether a player intentionally lost a match, cuz I have a certain problem with throwers
it went through the code to find how and found players can selfdamage, tho this is not exactly my intent but I asked poorly tbh
still reading its train of thought
I just clueless on this, need to somehow separate griefers from bad players
if you have a bot (not just app) and include identify scope, yep
Do they have to share a server with said bot
for that I'm not sure, would need testing
I've never used a user installed app so idk
Right
So you can dm them without them sharing a server with the actual app
When they authorize a user install app, one of the permitted permissions is sending direct messages
aight, managed to make it understand what I want
lets see what it cooks now
lmao it gave me a plan approach
including an implementation suggestion holy shit I'm scared
👀
apparently it can also analyze query results
Hmmm, free with github student?
probably? it's included in IJ community
tho I nearly spent the whole month's quota today 
but ngl this feature is making me consider getting a paid plan for higher quota


ok, now I know where to start from, time for some heavy data crunching
1190 matches as sample size
Can someone help me fix this
class BackupBypassView(discord.ui.View):
def __init__(self, callback_bypass, timeout=60):
super().__init__(timeout=timeout)
self.callback_bypass = callback_bypass
@discord.ui.button(label="Bypass & Continue", style=discord.ButtonStyle.danger)
async def bypass(self, interaction: discord.Interaction, button: discord.ui.Button):
print("[DEBUG] Bypass button clicked")
await interaction.message.edit(view=None)
await interaction.followup.send(":hourglass_flowing_sand: Continuing deployment...", ephemeral=True)
asyncio.create_task(self.callback_bypass(interaction))
self.stop()
@discord.ui.button(label="Cancel", style=discord.ButtonStyle.secondary)
async def cancel(self, interaction: discord.Interaction, button: discord.ui.Button):
print("[DEBUG] Cancel button clicked")
await interaction.message.edit(view=None)
await interaction.followup.send(":x: Deployment cancelled.", ephemeral=True)
self.stop()```
I am stumped
Not unless you give us your problem
What’s it doing that you aren’t expecting
Any errors?
Are you replying to the interaction
You only have a small amount of time to reply before it fails
Unless you defer it
I have it set to take 60sec till timeout. Im within that window. Ive tried deferring also. Nothing
Any errors in console?
none
Just do breakpoints or console logs to see if it's actually being run and/or if you're using websocket or webhook interactions
We get to the point of the buttons. The buttons use to work and that has not change. They broke when i tried to hide them
i dont think theres an event like "on_install" but you could dm if they do a command and you havent dmed them yet
Hey, how come that some ppl have channel names like Ticket | 53252 etc etc
Doesn't discord require you to use '-' to be url safe?
just a channel
Normal text channel?
love you
Only text channels have restrictions
thanks!
No problem
No idea im assuming?
Sorry
I am currently having a issue of my own that I’m dealing with so I’m distracted
np
To answer your problem I’m not entirely sure
he probably doesn't recognize me
From an initial glance everything looks fine
i used to run these streets
I know who you are Mr AI guy
but i took a break

Even a AI i use to debug is clueless. So welcome
this is acceptable 丨
You can’t use | in text channels no?

But even then









