#development
1 messages · Page 281 of 1
probably dylan this code post and get 😄
have not seen a cli-based request client @round cove ngl
try it out sometime
very interesting
i'm on arch and didnt want to deal with installing postman
also hi hope it's been eons
httpie
Okay bot devs that have to shard(t).
Having to restart 40 shards is like a dice roll some times, but I also don't know how feasible it is to have shards constantly connected and just be able to reload commands.
Sometimes shards literally just die for no reason and fail to reconnect properly, thus making some bot functions absolutely just die.
How do y'all handle shard issues, because sometimes it's getting super annoying lol
I completely separate the gateway cluster from bot logic and have some kind of messaging system whether you wanna use something like amqp for message queuing and worker consumption or something like a websocket
Ah, so you actually do something smart rather than being lazy and never moving off d.js.

That could be a fun challenge I guess.
There would theoretically be a way to hack in messages from another lib to d.js but that's internals I don't know
djs can consume raw messages and process them
It's just so frustrating that shards will die for absolutely no reason and never reconnect just to make any commands that depend on aggregating across shards die lol
And because that usually requires a full restart, well waiting for 40 shards to come online takes forever.
And then sometimes as they try to connect they just get stuck in a failing to connect loop !!!
:^^^^)))))
Is your max_concurrency still 1?
Well the gateway determines how many shards can identify at once. Larger bots are granted larger max_concurrency. I wouldn't be surprised if you were at least set to 2. Though idk if djs supports it! Personally I need to revise the logic in my own lib for max_concurrency iirc otherwise I already did it and I can't remember
I use the sharding manager from djs, I know you can manually spawn shards,
so I guess I'll make a get request rq to see what my max is
Oh. That's another thing that would be lost. The Shard class instances
Yeah >_<
So funny thing actually I maintain some libs and for a while I used djs and refused to get off so I wrote https://github.com/AmandaDiscord/Thunderstorm (don't use it pls)
Fuck
Eventually I bit the bullet and did a full rewrite and I'm glad I never went back
I'm sure it would be fun
My bot isn't exactly mission critical to anyone, or me, might just be a cool thing to figure out at this point
Y'know. It wasn't horrible. It was kinda fun working with the raw api. Also means I could implement newer Discord features like components v2 day -30 (there was a closed alpha period)
Nice
This seems funny given the bot is ~40k servers, I wonder when they permit you to have a higher limit lol
Auto focus search boxes on various pages so you can immediately type, now that's what you call good user experience
Someone can help me? Dms me


Huh?
cc @round cove
afaik max_concurrency goes directly from 1 to 16 when you reach like 100k or whatever it takes for them to label you as a "large bot"
there is no in-between
which is stupid af lmao
also not sure if djs actually supports increased concurrency, last time i checked it didnt, it was hardcoded to spawn 1 shard every 5.5 seconds
ew lol
For those that use SQL databases, do you typically store the discord id as TEXT? Or another data type?
I store it as varchar(22) but I believe a bigint is optimal
Yeah, that'd make sense. I'm overloading the column by using any vendor id so I made the assumption that TEXT is the best choice. I was curious if there were major performance challenges or anything.
as long as the column is indexed it isnt really something you will notice that much, obviously a bigint would only be 8 bytes though compared to around 22bytes for a varchar(22)
I ran queries on a 2mil row table with text hashes instead of storing them as bytes, it was only around 10% faster after switching to the optimal format
Does
@app_commands.allowed_installs(users=True, guilds=True) # Allow users to install this command
@app_commands.allowed_contexts(guilds=True, dms=True, private_channels=True) # Allow execution anywhere
Work for group commands?
Because cant be found in dms
Anyone here use typing in their Python source?
At this point, I'm not sure I could use Python without it. uv + ruff + pyright is an insane combination.
But I am curious, for those that do it, what's your preferred? Pydantic vs. dataclasses vs. typeddict for modeling structures of data. I'm not referring to the difference between schemas / models ... just curious what your preference is at the domain layer for your DTOs / internal models.
Will this required the member intent?
interaction.guild.members.fetch(userId).catch(() => null);
Using .catch like that is not good
So i have this website made in nextjs and im hosting it on my vps.
I send a bunch of requests and it gets stuck at random times.
Like the vps isn’t overloaded it simply gets stuck
Keep in mind I access it via the ip
As its kind of private
But it annoys me how it just randomly gets stuck at loading requests
Add more log statements to try to find the cause for that
no, if you fetch a single user by id you dont need the intent
My ass has them stored as string lmao.
This is insane lol.
Also hi Tim! Long time no see
it surely not a dev server right?
yup
could it be the connection between your vps and yours?
@long marsh I personally haven't had performance issues honestly. I store message / role / channel ID's as strings and I query by them all the time.
I figured for my scale it won't be bad ever
What's your scale currently?
I have one discord bot that has anywhere between 10 - 15 concurrent players (in 800+ servers). 1 concurrent player equates to 1 - 2 database reads per initial click ... and cache hits after that until the TTL expires. I have a write-through cache so the cache is frequently updated + database is written to every click.
A click from a player playing typically is done a handful of times over a 5 - 10 minutes session, every 2 - 3 seconds.
Yeah I wouldn't expect any issues to arise from that size.
Even if the game got to 100 - 200 concurrent players, it likely wouldn't be a problem if we're being honest.
And I imagine your DB relationships arent too complicated either.
I'm not using Postgres for that one haha
What're you using?
But I'm comparing the scale of that one with the current one I'm going to be building.
DynamoDB – a lesser used one.
Oh wow
I work with it in my day job, so I'm fairly proficient with it
It's completely free and will likely be free until I'm reaching thousands of concurrent players.
It's all about how you model your data / the access patterns you create upfront.
How are you communicating with it? I would expect you to have to either host your bot in an ec2 instance, or have a cloudfront instance exposing it which I thought required RDS?
I made a RDS instance, never used it, and got charged $90 in like my first week of it just existing.
Yeah checks out
Yeah lol..
I never manually spin up anything – everything is through AWS CDK
Ah
Are you having to use IAM to communicate to your gateway? How're you preventing "potential" public accesses to it?
For now, I just have an API Gateway that is public to the world (it comes with a WAF). If it becomes a problem, I'll create an authorizer lambda that will prevent unauthorized access.
I'm using discord's HTTP interaction endpoint option – so I need to allow discord to send outbound webhooks to it.
Ah so you're using lambda's for your bot?
Nah – the cold start would be too problematic
A 40 second cold start would be a code smell lmao
The most I've seen is between 2 - 4 seconds.
And, in production on a highly used API, the # of cold starts are minimal
I also use Discord's HTTP interaction option with the 3 second response. I never callback into discord.
I think I'm thinking of azure's blob storage
Damn
Yeah it's actually a super neat option
I defer literally everything just for the sake of it
It's a fair assumption to do that – I just took on the constraint myself to always respond within 3 seconds haha
My bot is a clicker bot, so that shouldn't be a problem.
My full stack on AWS costs about $17/mon.
That's including:
- EC2 costs
- Network ingress/egress
- DynamoDB
- DynamoDB stream via a lambda
- Elasticache (Valkey)
- Elastic container registry (docker images)
- API Gateway
- Another lambda to process cron jobs
- S3 bucket
I had an issue were my bot was getting interactions like 5 seconds after they occurred on my end so I can't even respond to them.
Are you using a framework?
yeah :V
Which one?
d.js lmfao
oof – yeah I could see it taking 5 seconds to get to your domain logic through that damn web of functions lmao
This wasn't an issue until I hit ~5k servers
I don't use any framework.
and now I'm ~40k so each shard has to have only 1k each
I'm tempted to do a rewrite now
I have a server at home and host my bot there. So the bot lives with the PSQL db, it has no reason to ever be slow.
You may need one for all the things you do, but for the interaction HTTP endpoint ... it's fairly trivial to spin up a command registry, an API to handle the routes, and then just route to your commands.
Seems like too complex of a setup for a discord bot. I’m also a SaaS hater tho so idk
fuck saas 🤝
I just explicitly listed everything. In reality, it's just:
API Gateway -> EC2 -> Cache -> DynamoDB
The ECR was extra because I wanted to publish my images automatically / have it update containers without me having to login to the server
I still hate integrating saas into a discord bot, I’d much prefer just using a docker image to run a Postgres instance
And the cron jobs I could have ran on the EC2 ... but figured the lambda would be easiest
Oh wow – hard disagree
I respect it, but I'd rather delegate the management of the postgres instance.
At a minimum, I'd spin up my own server with postgres installed / no docker for that.
I hate it because I'm so paranoid about exposing things on the public net and also the amount of money it cost to run it lmao
that's my cope
I have billing alerts setup. If something like that ever happened, I'd be notified immediately
I prefer paying 0 money to AWS
I'm not an AWS hater by any stretch haha
I'm actually the opposite
It's provided me income, it's given me the infrastructure chops to sell software to enterprises, and I'm an "AWS Community Builder". So only bias towards it from me haha
But, like said, I definitely respect your hustle @wheat mesa
I’m a uni student so I’ve got light pockets haha
Exactly! I would have done the same shit
Stuck everything into a single server, called it a day.
when I was in uni I hosted my bot on a rpi for a couple years
I have an rpi that I host things on for proof of concept, then if needed I’d go for cloud infra
I had mine on an heroku instance when they were still free.
Half of those things can just be run a normal vps with half the cost xD
I hate subscription fees in general, I’d much rather run my own small server
Plus I learn so much more managing it myself
You also don't really need S3 buckets or fancy "API gateways"
For sure – but I already have the technical know-how, the money to spend, and it scales immediately if needed
I mean $9 vs. $17 is such a moot point
just build your own server like me for the cheap price of 1.2k
k 
That's also true. Could easily host the files on an instance, use nginx to serve them statically
it unironically is great to be able to have physical access to your own server at times
Use ufw to disable certain ports, maybe put cloudflare in front if you're feel spicy, etc.
Both great and bad haha
the only time it sucks is when tornados spawn outside and power goes out, but it's so rare and it's only short outages that in the grand scheme it doesnt matter
No UPS?
Ironically speaking, you spending $1.2k on a server will likely be more than I'll ever spend over the lifetime of my 2 bots hosted on AWS
thankfully I host more than just my bot on it
Do you have a NAS?
I've got game servers and other friends bots on here too
I hope you charge them!
nah
Refund them the dollar if it goes down due to power outages
they make money off their bot and need it more than I need it
I just wanna help some friends
Even $1?
no point in charging for $1
fr lmao
Haha, that's nice of you. I used to do that a lot in my youngish years
I got taken advantage of eventually / it just led to me getting pissed off
If you have a healthy relationship with your friends, that's all that matters.
tbh the ram was way cheaper than I expected, it was only 300€
build a server good enough and it looks like it's never used
yes yes
sadly my main server is very used
i cleared up 300gb disk space a few days ago
nice
I also use moved away from google photos and use my server with immich which replaces it
same!
/admin/server-status
yeah i hoard my photos
they are dating back to 2005
yes
is this immich?
yes
yeah it's nice
How do you mess up an input box that bad....
hai :3
someone forgot overflow
what are you doing nowadays, Tim? If you don't mind me asking
not much, working on a sveltekit website as a freelance gig and working on my house's construction when i can lol
and also procrastinate as much as possible :)
That's sick! How are you liking Sveltekit?
its pretty nice so far
I assume you're using svelte + sveltekit in that?
ye
On that note, I'm not aware if sveltekit can be used by itself 🤔
i dont think so
How do you typically find your freelance clients?
in this case they found me on linkedin and emailed me
That's pretty neat!
I had a friend who would work half the year and earn 6 figures when he did contractual stuff
But it was always run-of-the-mill boring shit that no one wanted to specialize in. Typically Java + Spring Boot.
ew xD
What kind of projects?
I'm currently running a discord bot, working on another.
Work a full time SWE role in my day time though.
im good at starting shit and never finishing it lol
Analysis paralysis? Or just lose motivation?
idk, i guess i lose motivation when it gets to the packaging and marketing stage
i like the problem solving part
i hate turning it into a product
Arguably, the product parts should be prioritized first before a finger is lifted for the solution imo
See if there's a market that will pay for it, so to speak.
Even if you solve a complex problem, if no one cares enough to pay for it ... then is it worth it? From my capitalist perspective, probably not. Then again, we'd never have open source software if everyone thought that way.
hello folks
hi hi
# SERVER_ERROR: [Error: Missing credentials for "PLAIN"] {
code: 'EAUTH',
command: 'API'
}
@quartz kindle you've used nodemailer
can you explain this
cause like
const transporter = createTransport({
host: process.env.SMTP_HOST,
port: 587,
secure: false,
auth: {
user: process.env.SMTP_USER,
pass: process.env.SMPT_PASSWORD,
},
tls: {
ciphers: 'TLSv1.2',
},
});
I am supplying it
I have already checked that those envs are valid
SMPT ?
Oh nodemailer
I love using that
the issue was exactly this, i had to many logs clogging the vps 😭
well
make them clog the toilet instead
Caused a problem with my nextjs app
Introduced a loop that would just continiously redirect to / in my middleware
Now after fixing said loop it just refuses to load the page
type Session = typeof auth.$Infer.Session;
export async function middleware(request: NextRequest) {
const sessionCookie = getSessionCookie(request);
if (!sessionCookie) return NextResponse.redirect(new URL('/', request.url));
const { data: session } = await betterFetch<Session>('/api/auth/get-session', {
baseURL: request.nextUrl.origin,
headers: {
cookie: sessionCookie ?? '',
},
});
if (session && request.nextUrl.pathname === '/')
return NextResponse.redirect(new URL(`/dashboard/${session.user.id}`, request.url));
return NextResponse.next();
}
export const config = {
matcher: ['/', '/dashboard'],
} satisfies MiddlewareConfig;
I think I fixed it anyway right?
I am not making another mistake?
I'm just gonna ask if anybody knows how to work with time zones in python discord? I got regular time down, but no idea how to deal with time zones so for now it defaults to UTC+0.
How are you getting their timezone?
time = datetime.now()
Added
from datetime import datetime, timezone
to get it to always store it UTC+0
time = datetime.now(timezone.utc)
No idea how to get it to show it in the users time zone so for now it stays in UTC+0.
I don't. On my end it the time will be shown in my time zone and on the official bot online, it is shown as +0.
Then...what are you having problems with?
Forgive me if im slow but you can't show it in their timezone without getting their timezone
I was trying to see if when the user checks like say their high score listings if the time can be shown in their time zone instead of default UTC+0 thing if that makes sense.
That is what what chatgpt told me. In that case, this makes things pretty easy.
Well you'd have to acquire it somehow
from what I know discord doesn't give it to you
I found something that converts it to the users time!
And it actually works after testing.
Mind sharing it?
If you’re trying to show in a user’s timezone there is a formatter to do so
You never get shown the actual user timezone
It’s a client side tjing
<t:UNIX_TIMESTAMP:R> or something like that
There’s more options than that but it’s just what I remember
<t:1747710178:R>
Well yeah I guess you could do that too
Yeah the above was right.
I'm using visual studio code and the greenish color after import no longer shows and I been with chatgpt for like one hour trying to figure it out and it giving me a headache.
The colors came back oddly.

hi
@zinc fable
got it
@zinc fable
tyty
Nice
Do y'all think ts is possible?
If so, are there any that are public rn?
@shell tundra can you give ur thoughts on ts?
Just wait your turn
yknow im bored. Yesh that is agents TOS as it logs users IP to determine VPN attempts. Also tracking users is not allowed either
well idk about viewing the info but if you want to detect alts there's bots like altdentifier
Idc if its against TOS, is it possible tho?
I mean bots that gives someone's alt
anything is possable. But this is the wrong place for that
and would u perhaps know where to find such bots
i.g dark forums or sum
Wrong place to ask
possible? yeah, but also easy to bypass or get your bot banned
aside from being unable to have it verified in either topgg or discord
<style>
body {
margin: 0;
padding: 40px;
font-family: Arial, sans-serif;
color: white;
background: url('https://i.imgur.com/AfPAkxt.png') no-repeat center center fixed;
background-size: cover;
}
.card {
background-color: rgba(0, 0, 0, 0.85);
border-radius: 16px;
padding: 40px;
max-width: 900px;
margin: auto;
box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
}
.fly-left {
opacity: 0;
transform: translateX(-60px);
animation: flyLeft 1s ease forwards;
}
.fly-right {
opacity: 0;
transform: translateX(60px);
animation: flyRight 1s ease forwards;
animation-delay: 0.6s;
}
@keyframes flyLeft {
to {
opacity: 1;
transform: translateX(0);
}
}
@keyframes flyRight {
to {
opacity: 1;
transform: translateX(0);
}
}
h1 {
text-align: center;
color: #00ffc8;
}
h2 {
color: #00ffc8;
}
.highlight {
background-color: #1a1a2e;
padding: 10px 15px;
border-left: 5px solid #00ffc8;
border-radius: 8px;
}
.buttons {
display: flex;
gap: 12px;
justify-content: center;
margin-top: 30px;
flex-wrap: wrap;
}
.btn {
display: inline-block;
text-align: center;
width: 120px;
height: 50px;
line-height: 50px;
font-weight: bold;
font-size: 15px;
border-radius: 12px;
text-decoration: none;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
transition: transform 0.2s ease;
}
.btn:hover {
transform: scale(1.05);
}
.btn.invite {
background-color: #ff3366;
color: white;
}
.btn.vote {
background-color: #2b2f31;
color: white;
}
</style>
<div class="card">
<h1>🔒 AntiScammer – Your Community's First Line of Defense</h1>
<!-- English Section -->
<div class="fly-left">
<h2>EN:</h2>
<p>
AntiScammer is a powerful Discord bot designed to protect your community from known scammers and potential fraudsters. It automatically bans flagged accounts, scans for suspicious activity, and helps your moderators take action before damage is done. With real-time detection and an ever-growing scammer database, AntiScammer ensures a safer space for everyone.
</p>
<p class="highlight">
⚙️ To activate protection, server admins must run <strong>/setup</strong>. This links a report channel where scam alerts and escalations will appear. Without setup, the bot will not take action.
</p>
</div>
<!-- Spanish Section -->
<div class="fly-right">
<h2>ES:</h2>
<p>
AntiScammer es un poderoso bot de Discord diseñado para proteger a las comunidades de conocidos estafadores y banear cuentas. Escanea por actividad sospechosa y ayuda a los moderadores a tomar acciones antes del daño. Con detección en tiempo real y una base de datos que crece todos los días, AntiScammer proporciona un espacio seguro para todos.
</p>
<p class="highlight">
⚙️ Para activar la protección, los administradores deben ejecutar <strong>/setup</strong>. Esto conecta un canal de reportes donde se enviarán las alertas y escalaciones. Sin este paso, el bot no funcionará.
</p>
</div>
<!-- Buttons -->
<div class="buttons">
<a href="https://top.gg/bot/YOURBOTID/invite" class="btn invite">Invite</a>
<a href="https://top.gg/bot/YOURBOTID/vote" class="btn vote">▲ Vote (0)</a>
</div>
</div>
you wrote html/body/head blocks
not only you dont, but if you put them they'll make the whole thing not work
topgg is already inside body
put styles inside a <style> block and consider everything else to be body
So like this?
OM
actually just style alone, pretty much nothing else will work
style and the actual body
<style>
your styles here
</style>
the actual content
anything aside from that will either be ignored or blocked
Its in style block
yes, your current msg should work
lul, it's a common mistake to attempt to use actual site html inside longdesc
it makes sense when you consider you are inside body already
its for personal use
just write a site and have it send the acesser's IP back to your API and register in a database
same IP = probably same user
but it's easy to bypass anyway
I mean I need it to check other people's accounts
not exactly someone who'd trust me to open up a site
I mean, there's no magic that'll give you info like that
every altchecker bot relies on data collection and statistic
apparently there is coz ts bot just got done
is there a public database or sum I could access
then they're guessing
there's literally NO connection between two accounts without the target giving you info
How about a bot that verifies someone on a server
if there was you'd be commiting federal crime by using it
Yeah there is no way to definitively say. This is also somewhat skirting the line of legality
GDPR isn't to be taken lightly
There are many verification bots
they'd still need to authorize on a site
Keep in mind that tracking alt accounts without prior consent is definitely a privacy violation and amounts to at the very least a violation of TOS
the magic is in the site side, since there u have a lot of info about who acesses it
Id say get off this chat since its circling legality issues
who cares about legality
illegal chats are awesome
who wants to rob a bank with me?
Haha u dont need chats for this reach the bank we can plan stuff otw
Hi guys, I'm starting to work on a project that will be multiplatform. And i want to have one central API.
For database i have it set to use postgres, idk if i should use prisma or not.
This project might get lots of concurrent users, and idk i really don't know if i should go with express or something else. But it has to be in TS
Any suggestion would help
I personally like kysely and use that at wamellow
and for http server Id go with fastify or hono
although since I use bun I use Bun.serve
i tried fastify on a simple project this week
its great
and no Bun is a big no no
it's been acting up on my vps's
works fine for me
looking at kysely rn
How about something like uws.js. It has a higher learning curve but its performance is great
Is this not how you do route groups so you can have diff layouts?
When visiting localhost:3000/dashboard I get this
I guess not
Wow gee thanks for that input
Np :}
what does () do?
You have (dashboard)
Yes, because its route grouping
interesting, never seen or used that feature before
Guess it was a nextjs hot-reload issue
But now im wondering whats the point of this if the layouts don't change 
Nevermind
Forgot to add my styles file 💀
Just wondering has anyone here implemented Google authenticator into their site and how hard is it. Just trying to figure out before I start
you can check out lucia
they have a guide on webauthn
Which includes TOTP
postgres with some native nodejs driver, no framework
nginx or similar reverse proxy in front of node
for node itself you cant really go wrong with node's native http, but if you must, fastify is fine but there are better alternatives
depends how you code it
Ill be caching lots of stuff as well
which part did you never do before?
No framework
for http or postgres?
its pretty simple to use, but depends how complex you need your routing to be
i can show you how i use it
It will get a bit complex
Since i will have different roles
The endpoints need to be secured properly
Blablabla
You know it
I was thinking on using better auth for the auth part
Sure
basically the gist of it is like this:
const server = http.createServer(requestListener);
server.listen(port, () => {
console.log(`Server started on port ${port}`);
});
async function requestListener(req, res) {
const path = req.url?.slice(1) || "/";
// check if route exists
const route = routes[path]; // define your routes somewhere, like a js object
if(!route) {
respond(res, 404, '{"error":"Invalid endpoint"}'); // basic 404
return;
}
// check if request body exists (for POST requests)
let data;
try {
data = (await readStream(req)).toString(); // read request stream
if(!data) {
throw new UserError("Received empty request");
}
} catch(e) {
respond(res, 400, `{"error": "${e}"}`);
return;
}
// check if body is valid json
let json;
try {
json = JSON.parse(data);
} catch(e) {
respond(res, 400, `{"error": "Received malformed request: ${e}"}`);
return;
}
// check if body is valid object
if(!json || typeof json !== "object") {
respond(res, 400, '{"error":"Received empty request"}');
return;
}
// call route
try {
const result = await route(json); // route function is obtained from the relevant route file
const response = JSON.stringify(result);
respond(res, 200, response);
} catch(e) {
const error = /** @type {Error | UserError} */ (e);
if(error instanceof UserError) {
respond(res, error.code || 400, `{"error":"${error.message}"}`);
} else {
console.error(error);
respond(res, 500, '{"error":"Internal server error"}');
}
}
}
although this example is for a POST only JSON api
auth is done via api key in auth headers, which i dont show here
but essentially that is what soemthing like fastify will do for you behind the scenes when you use app.post(...)
i just like having more control over each step
Oh
for example, stuff like express/fastify will have parameterized urls, like "/path/:param", which you can access using its functions
using native http you would need to do that yourself from the req.url variable
and for post requests you dont have access to the posted data directly, you receive it as a stream in the req variable, which you need to read yourself
other than that there isnt much difference between an http framework and native http
aside from all the routing helper functions and middleware system, which you can easily do yourself imo
But is there much benefit to it?
more control over what happens on each request
im not a big fan of a library/framework doing stuff to the request before i can see it
So basically less stuff that can go wrong
and also, less dependencies to manage :^)
yes yes
I do think that depending on what you are doing, readability can be more important than squeezing out all performance
assuming we are talking about the central API for your project, you can further scale it like this:
nginx multiple upstreams -> multiple nodejs instances
or
nginx upstream -> nodejs gate/auth -> multiple nodejs workers/child processes
for multi-process caching i like lmdb for local, or one of those redis-esque things for remote cache
although i personally dont see a point in remote caching
an even better cache is to use ip hashing in nginx so that the same ip always ends in the same node process, so you can simply cache in local objects/maps
but if you need persistent cache that survives restarts, lmdb is the way to go
now i see why i do dumb things i created a whole class for config files 😭
arguably using global is more frowned upon than that lmao
If you’re going to go through the trouble of making a class for this, why not just use a simple hashmap
From the looks if it you’re just reinventing the wheel here
Actually you don’t even need a map, I forget that objects in js are just magical and you could simply load your configuration into an object instead of having to write your own methods
what should I use instead?
put configLoader in a file and require that file when you need it
Ive used global to call my db, cdns, logging classes and like global variables across all files and thats it
yeah its not a big issue, but its generally not considered a good practice
Like does it pose any type of risk?
there is no "risk" per se, exept that it makes the code more complex and less maintainable, its essentially a big global variable that all files can access, and consequently any file can make changes to it and affect other files that use it, which can lead to issues
Hmm good to know
as long as you're aware of those characteristics its fine
Yeah In reality all I do is assign classes
Told you from the beginning it’s not good practice
doing stuff like that you're essentially removing any chance of making something unit testable
realistically you should be doing dependency injection but it doesn't matter much for a discord bot cause who actually wants to write tests for those
I made my own fake server once to unit test my bot
The files are lost to the void tho
🔥
I objectively gave up on discord bots
DI for a js discord bot is just overkill ngl
If it were C#, sure
nice
sexy
does this look good?
@zinc fable
tyty
np
@zinc fable
🙏 ty
so im redoing a lot of my api and that includes removing any use of global and using a core file
yeah thats better, but why not just export an object? does it need to be a class?
idk im overcomplicated
xD
it works thouhg
though*
like its easy to add new things
plus i think for the rewrite i'm gonna make my own Enum directory
how about something like this?
import config from "./config.json";
import Logger from "some_logging_lib";
import DB from "some_db_lib";
export const config;
export const logger = new Logger();
export const db = new DB();
Sir Tim, when will you join the dark side
Rust
ah
lmao
idk never tried getting into it, im more used to c++ syntax, but even that i barely use
I had some difficulties switching from ts to rust but now that I'm locked in, I've never felt so productive
I especially love rust """enums""" (they aren't enums)
lmao
Ts and rust is night and day arent them
im still married to js, so i cant, that would be cheating
i just added an easier way to check bitflags imo
You gotta have an open relationship is what I'm saying
🙏
Then use rust to make wasm
tbf i did a bit of emotional cheating already by using a web framework for the first time
sveltekit
Mhm
My current project is https://github.com/0x7d8/wings-rs
It was a total pain because I'm rewriting from a go codebase
what does it do?
Are you aware of the pterodactyl game panel?
also i need some feedback should i change anything here? (used password visibility to test)
This is a replacement for it's go based daemon that runs on all nodes to control the server containers
my only feedback is to change the music
lmao jk
...
looks good
i forgot that on the dev version i didn't remove the remember me toggle 💀
oh you're working on pterodactyl stuff
nice
i also made it so i can update a toast ui when its on screen
oh you work for pterodactyl?
ah
The project itself is kind of dead
thats cool tho
Yes yes, 5 figures per year
looks cool
nice, hopefully 90k and not 10k like me xD
A bit high lol
it was weridly hard to make
It's not that crazy
i've never had a "normal paying" job xD
Weren't you a teacher?
yeah, part time, and on a per-course basis, 3 weeks at a time, only when needed
paid like 500 bucks per course
Not bad
is it actually better to do this over const?
Oh bruh
im doing a freelance job now on a sveltekit website, paying 25/hr, but im only allowed to work 10hrs per week
...
Nice pay
I work at a hosting company and also get 25/h
No limit but there's just nothing to do lol
wdym over const?
i used to require the module but is they really a difference between the two?
there*
ah you mean require vs import?
yes
there are many differences under the hood
but it doesnt really matter that much
to use import you need to declare your project as a "module"
and there are syntax differences, like being allowed to use import/export or not
and the loading system is also different
require loads files synchronously, import is async
import also does a lot of more stuff under the hood
most people are gradually moving towards using import everywhere, so its fine to go that route
but for some time it was complicated because of certain incompatibilities between the two
A battle has raged on for millennia, claiming numerous casualties in its wake, where no single individual, corporation nor entity was safe from the wreckage that followed in its trail; hidden deep within the binary bunkers, there festered something so awful, so terrible that mankind is still reeling from it today.
Of course, I'm speaking of the dreaded 20-year war that is commonly known as...
COMMON JAVASCRIPT (CJS)
VS
ECMA SCRIPT MODULES (ESM)
rn i fell like what im doing with the start server may be wrong i cant tell:
async function startServer() {
try {
core.logger.info('Starting the server...');
core.db = new database(databaseCfg.databaseURI, databaseCfg.dbName)
core.logger.attempting(`Attempting to connect to the database at URI: ${databaseCfg.databaseURI}`);
await core.db.connect().then(() => {
core.logger.info('Database connected successfully!');
}).finally(() => {
app.listen(httpCfg._proxying._port, function () {
core.logger.info(`API server started and listening on https://0.0.0.0:${httpCfg._proxying._port}`);
})
})
} catch (error) {
}
}
startServer()
didnt code in the catch stuff yet
Whats the problem
you generally dont mix async/await and then/catch
since they both do the same thing
idk tbh just wanted to see if what i was doing was correct
// async/await with return
async function abc() {
try {
const result = await xyz();
// do something with result
return result;
} catch(error) {
return error; // or throw if you want to catch it elsewhere
}
}
// then/catch with return
function abc() {
return xyz().then(result => {
// do something with result
return result;
}).catch(error => {
return error; // or do something else
})
}
// then/catch without return
function abc() {
xyz().then(result => {
// do something with result
}).catch(error => {
// do something with error
})
}
i just ran it without it and somehow the db is connecting wayy after
Hey, just need some feedback on an idea here. I wanna redo my API key system and include bit flags to limit the abilities of some keys. is this a good idea?
yes definitely thats a very good idea bit flags make your storage efficient checks r fast, you can easily add more flags later on etc
just mind how many flags you intend to have
byte can hold 8 flags, smallint can hold 16, int can hold 32 and bigint can hold 64
this is what ive done rn
i store it as int
that's plenty
wait does mongo work with bigint?
Yea monogdb has it as Int64
i had to disable it on my napi lib
y
bru
i debugged it with help from voltrex and turns out some linux distros have non-standard locations for their build stuff
so the linker was not found during build
lmao
ye probs
1m 52s to build one binary on github actions 🔥
Im going to move my build stuff home soon probs
I miss voltrex
so I can abuse my 9900x for rust
He's banned here or what?
Left here
Ohh
I didn't know I just knew he wasn't in gere
And haven't really talked to him in awhile
I mean, he's still on DDevs but he's not active there at all
Yeah I have 4 servers in common with him not really active in any
[*]
ah cool
so rn im kinda stuck here im trying to work with JWT but it keeps returning 401 even though im supplying the token
API:
const JWT_SECRET = "m9X!4rN#7vL@zQ2pFs8WdYjKtGhB5CeU";
const token = jwt.sign(
{ id: userData._id, email: userData.email },
JWT_SECRET,
{ expiresIn: "1h" }
);
return res.status(200).json({ result: true, token });
Web-Frontend:
fetch('/backend/verifyLogin', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
email: email.value,
password: password.value
})
})
.then(response => response.json())
.then(data => {
if (data.result === true) {
const token = data.token;
localStorage.setItem('auth_token', token);
console.log(token)
document.getElementById('signin-success').style.display = 'block';
fetch('/backend/authUser', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${token}`
},
body: JSON.stringify({})
})
.then(res => res.json())
.then(userData => {
console.log("Authenticated user data:", userData);
})
.catch(err => {
console.error("Auth request failed:", err);
});
} else {
document.getElementById('signin-error').style.display = 'block';
}
})
Web-Backend:
const express = require("express");
const router = express.Router();
const passport = require("../../handlers/passportAuth");
const { v4: uuidv4 } = require("uuid");
router.post(
"/",
passport.authenticate("jwt", { session: false }),
async (req, res) => {
try {
const user = {
id: uuidv4(),
email: req.user.email
};
res.json({
result: true,
user: user,
});
} catch (error) {
console.error("Unexpected error:", error);
res.status(500).json({
result: false,
error: "Internal server error",
});
}
}
);
module.exports = router;
anyone know why it keeps returning 401?
I'm testing it on Postman with the token itself and now its saying Unauthorized as well
show passportAuth.js
const passport = require("passport");
const { Strategy: JwtStrategy, ExtractJwt } = require("passport-jwt");
const speakeasy = require("speakeasy");
const JWT_SECRET = "m9X!4rN#7vL@zQ2pFs8WdYjKtGhB5CeU";
passport.serializeUser((user, cb) => {
console.log("[Passport] Serializing user:", user);
process.nextTick(() => {
cb(null, { id: user.id, email: user.email });
});
});
passport.deserializeUser((user, cb) => {
console.log("[Passport] Deserializing user:", user);
process.nextTick(() => {
cb(null, user);
});
});
const opts = {
jwtFromRequest: ExtractJwt.fromAuthHeaderAsBearerToken(),
secret: JWT_SECRET,
};
passport.use(new JwtStrategy(opts, async (jwt_payload, done) => {
console.log("[Passport] JWT payload received:", jwt_payload);
try {
return done(null, jwt_payload);
} catch (err) {
console.error("[Passport] Error in JWT strategy:", err);
return done(err, false);
}
}));
console.log("[Passport] JWT strategy initialized");
module.exports = passport;
does it log JWT payload received?
yeah it never gets logged
is the router path correct? add a console.log in the router function
Okay one second.
it logs
now im confused more
according to the docs:
secret: JWT_SECRET
should be
secretOrKey: JWT_SECRET
it is
const passport = require("passport");
const { Strategy: JwtStrategy, ExtractJwt } = require("passport-jwt");
const speakeasy = require("speakeasy");
const JWT_SECRET = "m9X!4rN#7vL@zQ2pFs8WdYjKtGhB5CeU";
passport.serializeUser((user, cb) => {
console.log("[Passport] Serializing user:", user);
process.nextTick(() => {
cb(null, { id: user.id, email: user.email });
});
});
passport.deserializeUser((user, cb) => {
console.log("[Passport] Deserializing user:", user);
process.nextTick(() => {
cb(null, user);
});
});
const opts = {
jwtFromRequest: ExtractJwt.fromAuthHeaderAsBearerToken(),
secretOrKey: JWT_SECRET,
};
console.log(opts.secretOrKey)
passport.use(new JwtStrategy(opts, async (jwt_payload, done) => {
console.log("[Passport] JWT payload received:", jwt_payload);
try {
return done(null, jwt_payload);
} catch (err) {
console.error("[Passport] Error in JWT strategy:", err);
return done(err, false);
}
}));
console.log("[Passport] JWT strategy initialized");
module.exports = passport;
apparently i copied the wrong version earlier
remember to change the JWT secret btw 
is the jwt.sign?
jsonwebtoken
i just went through some of my code and in the sign its called a null id
wait nvm
im stupid
it is calling the correct id
on what?
I am not fine 😞
on the token you created using jsonwebtoken.sign()
Jk 🐦😂
Let him cook
cook some nice pasta
SOMEHOW ADDING THIS FIXED IT
....that.... makes zero sense?
thats what im saying...
Damn
idk man, ghosts
If adding logging fixes my errors my life would be 1000 times better
okay so it wasnt that log that fixed it
but something did fix it
and idk what did
He cooked too hard he forgot what he cooked
I FOUND IT
WHEN I USE CONST IT BREAKS
WHEN I USE VAR IT WORKS!??!?
HUH
explain that to me plz
there is no explanation lol
Scoping issue?
i went on stack overflow to see how others did it and i tested that and that worked...
and if you undo that it stops working again?
that makes literally zero sense
i'll show u one seocnd
NOW ITS WORKING WTF?!?!?
i am lost for words
now im more confused then ever
is the api and the front/backend in the same server?
no
check the server time in both servers
API = Seperate Server,
Backend/Front = Same Server
usually its on a VPS but im on the dev version
the only thing that makes sense is somehow the expiration date set in one server is invalid in another server
if it started working out of nowhere after some time, one of the servers having an incorrect system time would explain it
okay now my isAuth aint working
wtf
const passport = require("passport");
const isAuth = (req, res, next) => {
console.log("[Auth] Incoming headers:", req.headers);
passport.authenticate("jwt", { session: false }, (err, user, info) => {
console.log("[Auth] Error:", err);
console.log("[Auth] User:", user);
console.log("[Auth] Info:", info);
if (err || !user) {
return res.status(401).json({ result: false, error: "Unauthorized" });
}
req.user = user;
next();
})(req, res, next);
};
module.exports = isAuth;
isnt that jwt supposed to be filled? 
you dont call next() in there, passport already does it for yuo
ah
are the incoming headers correct?
its not setting the token i think
but idk where i would do that for each request
oh wait
hold on
im just setting the location
mb guys
i am very new to JWT...
is it working now?
gonna test rq
the jwt token needs to be added to every single request you make
is there not a way to redirect in EJS while sending headers?
EJS is only a template engine, it doesnt do any routing
i meant JS in general
i just did some janky things and got somwhere
.then(userData => {
console.log("Authenticated user data:", userData);
fetch("/dashboard", {
method: 'GET',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${token}`
},
}).then(response => {
if (!response.ok) throw new Error("Unauthorized or other error");
return response.text();
}).then(data => {
console.log("Dashboard response:", data);
window.location = "/dashboard";
})
.catch(err => {
console.error("Auth request failed:", err);
});
})
[Auth] Error: null
[Auth] User: {
id: '680474384ea222c6a57a1887',
email: 'I removed this',
iat: 1748052020,
exp: 1748055620
}
[Auth] Info: undefined
afaik its not possible to set custom headers in a browser navigation
you can either set the jwt in a cookie, or you can put it in the url as a query parameter
i like the url idea is that safe?
well, its easier to steal the token
the thing with jwt is that there are no sessions, a single token defines everything
yeah, it will work anywhere and everywhere
if you copy the url to another pc, it will still work there
because your login status is not bound to any particular device or session
thats how jwt works
yes, cookies are safer, make sure to set them as httpOnly and secure
ima go insane
okay that broke wtf
it wont set the cookie 😭
const express = require("express");
const router = express.Router();
const passport = require("../../handlers/passportAuth");
const { v4: uuidv4 } = require("uuid");
router.post("/", (req, res, next) => {
console.log("HIT");
passport.authenticate("jwt", { session: false }, (err, user, info) => {
if (err) return next(err);
if (!user) {
return res.status(401).json({
result: false,
error: "Unauthorized",
});
}
req.user = user;
next();
})(req, res, next);
}, async (req, res) => {
try {
const authHeader = req.headers.authorization;
const token = authHeader && authHeader.startsWith("Bearer ") ? authHeader.slice(7) : null;
if (!token) {
return res.status(400).json({ result: false, error: "No token provided to set cookie" });
}
res.cookie("token", token, {
httpOnly: true,
secure: process.env.NODE_ENV === "production",
sameSite: "lax",
maxAge: 24 * 60 * 60 * 1000,
});
const user = {
id: uuidv4(),
email: req.user.email
};
res.json({
result: true,
user: user,
});
} catch (error) {
console.error("Unexpected error:", error);
res.status(500).json({
result: false,
error: "Internal server error",
});
}
});
module.exports = router;
oh i forgot credentials: 'include'
if you are doing the request using fetch you need to include credentials
yeah jsut found that out
and nope...
doesnt show up
but its in my local storage
ah fixed
Yeah def go with the cookie approach, pretty much anything else is unsafe to XSS attacks
I am stumped. Anyone have any ideas why discord says the command is outdated (Im rebooting client each reboot so i am getting latest)
At the end isw a
client.run(TOKEN)
I jsut cut it as it has my token
When you patch your commands with new commands, it takes Discord a bit to update the commands on their end so while they're doing that, they don't want to send you old commands where the arguments may have changed and break your bot. Give it a while before they update and they should be okay. Though it's not recommended to try to patch your commands every bot restart. You should have a REPL function do that
i think it's near instant nowadays
it's probably caused by the fact that you remove all the commands and then add them again, not very ideal, i'd just set instead of remove and add
It is instant but this "error" is due to the cache and usually restarting Discord is enough
Guild commands are instant but global commands do take time
Both should be instant tbh
i play around with global commands a lot, all it takes is a refresh, it's really fast if not instant
global commands taking a long time to register was only because of cache and they solved that a while back
i reboot so i mpull the new cache and i still get it
Wdym "reboot"?
kill discord via taskmgn then reopen i9t
Thats always how ive resynced my command
Ctrl+R is enough
still though. It is not letting me use the command despite multiple recaching attempts
Yeah like its been 10hrs and im still getting
2025-05-24 14:18:30 ERROR discord.app_commands.tree Ignoring exception in command 'setup_tcp'
Traceback (most recent call last):
File "/home/container/.local/lib/python3.12/site-packages/discord/app_commands/tree.py", line 1310, in _call
await command._invoke_with_namespace(interaction, namespace)
File "/home/container/.local/lib/python3.12/site-packages/discord/app_commands/commands.py", line 883, in _invoke_with_namespace
return await self._do_call(interaction, transformed_values)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/container/.local/lib/python3.12/site-packages/discord/app_commands/commands.py", line 871, in _do_call
raise CommandSignatureMismatch(self) from None
discord.app_commands.errors.CommandSignatureMismatch: The signature for command 'setup_tcp' is different from the one provided by Discord. This can happen because either your code is out of date or you have not synced the commands with Discord, causing the mismatch in data. It is recommended to sync the command tree to fix this issue.****
Do you run bot tree sync on startup?
You are getting the error bcz the commands on ur code arent synced with discord they prob have some old ones
yes inder my init
def init(self):
intents = discord.Intents.default()
super().init(intents=intents)
self.tree = app_commands.CommandTree(self)
self.config = self.load_config()
async def setup_hook(self):
self.tree.clear_commands(guild=None)
self.tree.add_command(self.setup_command)
await self.tree.sync(guild=None)
You are not forcing the sync
Try
def init(self):
intents = discord.Intents.default()
super().init(intents=intents)
self.tree = app_commands.CommandTree(self)
self.config = self.load_config()
async def setup_hook(self):
self.tree.clear_commands(guild=None)
self.tree.add_command(setup_tcp)
await self.tree.sync()
Btw i changed the name of the commznd make sure to update it wherever u define it
Let me try that rq
Traceback (most recent call last):
File "/home/container/app.py", line 118, in <module>
client = TCPBot()
^^^^^^^^
TypeError: Client.init() missing 1 required keyword-only argument: 'intents'
...
one second
i shouldent need anything there due to how its configured
My mind is soo confused
Fixed?
nope
/\
OOP
It literally tells you it's missing an argument lol
WRONG BOT
TypeError: Client.init() missing 1 required keyword-only argument: 'intents'
Intents is defined earlier and used
Yea but it's not saying that for a reason
If intents are already set in startup it dosent need to be restated. This is how i do all my bots.
client = TCPBot()
Is discord.Intents.default() wrong or returning null
nope.
You need to pass intents in tcp bot init
somehow it broke again...
Just give up at this point 😂 jk
woke up and not its refusing to set the cookie or find the header
OMFGGGGGG
class TCPBot(discord.Client):
def init(self):
intents = discord.Intents.default()
super().init(intents=intents)
self.tree = app_commands.CommandTree(self)
I did this. Says it needs the keyword. Pass the keyword. Dosent like 2 args
wtf now its not even getting a payload
How did u build the bot in the first place did u code it yourself?
YEah
ITS BACK UP. FCKJ
Ok i can deal with this
What function u getting the arg error on?
\Not that. I patched it. Now its just not seeing my config file lol.

there we go
What are u cooking
that fixed it
2025-05-24 15:10:54 ERROR discord.app_commands.tree Ignoring exception in command 'setup_tcp'
Traceback (most recent call last):
File "/home/container/.local/lib/python3.12/site-packages/discord/app_commands/tree.py", line 1310, in _call
await command._invoke_with_namespace(interaction, namespace)
File "/home/container/.local/lib/python3.12/site-packages/discord/app_commands/commands.py", line 883, in _invoke_with_namespace
return await self._do_call(interaction, transformed_values)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/container/.local/lib/python3.12/site-packages/discord/app_commands/commands.py", line 871, in _do_call
raise CommandSignatureMismatch(self) from None
discord.app_commands.errors.CommandSignatureMismatch: The signature for command 'setup_tcp' is different from the one provided by Discord. This can happen because either your code is out of date or you have not synced the commands with Discord, causing the mismatch in data. It is recommended to sync the command tree to fix this issue.
its not really top.gg its for news
Were back to step 1 yey 😡
You know u can just copy paste the error and the lines to chat gpt and it would help better than pasting it on discord
😂
No it wont. Ive tried last night,
i always do. GPT thinks its discord being dumb (Its not its on the code.)
This is what it has said for the last 5 hours
lol
imagine saying "ask chatgpt for this issue" for an issue that chatgpt doesnt have context for and wont be able to provide a viable solution for
I've given it context and use a gpt specific for dpy
No mods :(
huh?
Someone pinged you to join scam server
oh what?
Yea, server called "Support Desk" with 1,5k members 
...
What do they even do in these servers?
They are trying to scam you
But seriously, it's something with crypto wallets. They probably tell you to send some "verification" payment
Also this is how their message looks like
The hell
:/
Does anyone know a place where I could get my bot tested for feedback or bugs? Idk if there’s like a server that does that or not or where I could testers
usuaIIy news websites don't require Iogging in
or at least they give you a quick sneak peek before you get asked to register
and idk how seo would work with content that requires authentication
also you can add a red dot at the end of your website s name on the navbar
we do bc some of our stuff is locked
oh thats good so you have some pubIic content section?
yes
bc we only do news relating to first responders we can paywall stuff
i only do that bc we need to handle costs for operating and equipment
thats lit that way you catch them with the public content and then get them to sign up
Looks at X, TikTok, Instagram, Linkedin and any other social media site that locks profile viewing, comments and other things behind login
but you can still view the content tho
not fully limited access
like we lock commenting to being logged in and then we have stuff we have blocked behind subscriptions
thats why we require login
I should make a server for this (it will get 3 members)
I'd be your first member xd
Yo there are people who can help the server develop
hey bro i want to contact to staff rn
About what exactly?
This channel is simply better than any other 
@solemn latch
Woo pinged in 3 different channels 😔
Lol
How can I achive buttons positioned inside the embeds of webhook?
You must use components v2. This will disable use of both content and embeds and you must build out your message using the new components
Depending on what lib you use, it might support it already. Update just to make sure and then go from there
Pretty cool stuff
Yes it is a message flag and then that will enable you to use the new components
anywhere you create a message or interaction, you must set the new message flag
lol last time we spoke papi was in 2021
I have little to no memory of 2021 tbh tho I also have no idea what I ate yesterday
but happy to see old faces 
i know what you ate yesterday
and also the day before
and also before that

Same to you tim
lol
I developed that not-chan bot during covid
Crazy how much i've progressed from then lol
thanks for being for me there and continuing to support those wishing to improve
oh yeah? what did i eat then?
what
i see i see
but i remember seeing you more times and more recently, not just 4 years ago
nop
idk where you;d see me from then
here?
Not plausible
then i must have confused you with someone else with a similar username i guess
¯_(ツ)_/¯
-botinfo 1356575287151951943
Use $commands.
This is a Multipurpose bot packed with giveaway, poll,ticket,games,etc
1356575287151951943
PrimeBot
$
0 servers
7 monthly votes
7 total votes
create-polls, emoji, giveaway, poll, ticket-system, utility
@fierce shard
Just a quick question, because the slash commands when u press / list all the commands for the bot do i need to make a help command for my bot for it to get approved? Because I see no point in doing it with the fact discord already has the feature built in.
I believe you are required regardless
Even so when I migrated from message based commands to / commands, I just included a help command as it was inconsequential
Yeah i guess makes sense I will put one in
if you're talking about top.gg i dont think its required to have a help command, as long as the commands are explained in the bot description or it has a link a website where the commands are explained
Since forever
Even if all your commands do show up, some people may find a large list daunting and may want some kind of entry point
where is that stated
On the form to submit a bot, you need to put in an entry point command
i dont remember doing that when i was submitting my bot
I submitted mine without /help, but it depends on what your bot does
if it needs some kind of setup, /help is a good idea
When I was making the bot, I also made a help command for those "less experienced" users, and there are probably a lot of them on top.gg
founders sold it out to fastly, fastly probably only bought it to poach a few engineers and left it to die
a lot of people prob have a lot of nostalgic projects on there so would recommend you download all of them asap before theyre all gone
Luckily I have never used this site. I knew it existed but I haven't heard about it for a long time
yeah its been dead for quite a while with only a few people still using it
ive started out programming on that platform so have lots of projects i wanna fetch and archive
damn, been a long time not hearing glitch
lmao
companies finding out that offering free hosting is not a good business idea
I mean they did it for years so
Kinda a them issue at that point if they only just now found out it was a terrible idea
they released their employee handbook and holy shit do glitch employees get treated well
they get really really good benefits
@quartz kindle@sharp geyser they pitched away from free hosting for a while, they added this thing called project hours which basically means you cant really host a bot on it for a long time without paying for their plan
but their plan was awful, barely had anything, and too expensive for what it offered
repl.it did a much better job at expanding and probably why theyre still in business
this change also made like 90% of the free people turn away from glitch completely
so they were left with pretty much no community and no paying customers
that shit still existed?

one of the glitch employees said "this hurts me more than it hurts a lot of you" yeah i'd be hurting too with those employment benefits
But if i make the setup on a website which is what im doing, does that then still mean I require a /help command?
Because the bot will DM you with the link to set it up.
Just make a help command with gives the link to the website. Problem solved
People are more likely going to do /help after adding a bot before doing anything else
If the users have DMs blocked or off, that’s an issue
Yeah tbf I guess that makes sense, ill just make a help command that cycles through all slash commands and display them through pages. With a link to the website in the description of the embed.
I had a reeaaallll basic help command initially. It rarely gets used, but it’s still helpful for newbies.
Mainly just has link to support server, link to add bot and link to vote nowdays
Yeah i mean I remember when i first submitted a bot to top.gg, had no clue what i was doing i made a help command that listed every single command in one embed and typed each command out manually instead of cycling through them like i do now, and when i did that top.gg required a help command to be there.
But the whole point of me doing this dashboard is to make it more user friendly for the new people
I don’t think it needs to fully list each command, that could be overwhelming too. Just details how to use the bot. But yeah, if you have a dashboard, then a link to it I think would be perfect. There can also be the issues like Dyno and some other bots have had with dashboards where people are logged into discord on browser as one user and discord app as another, so it gets confusing
I’m just lucky my bot doesn’t need any config, so I don’t need any of that stuff
Yeah I guess it can in terms of different users logged in, but I still feel like people would prefer a web interface instead of doing commands like /security setup /log setup etc etc
Yeah totally understandable
implemented a dynamic extension system for my rust app 🔥 (still very wip, not quite proud of how it works rn)
use wings_rs::extensions::Extension;
#[unsafe(no_mangle)]
#[allow(improper_ctypes_definitions)]
pub extern "C" fn load_extension() -> Box<dyn Extension> {
Box::new(ExampleExtension)
}
#[unsafe(no_mangle)]
pub extern "C" fn api_version() -> u32 {
wings_rs::extensions::API_VERSION
}
#[repr(C)]
pub struct ExampleExtension;
impl Extension for ExampleExtension {
fn info(&self) -> wings_rs::extensions::ExtensionInfo {
wings_rs::extensions::ExtensionInfo {
name: "Example Extension",
description: "An example extension for demonstration purposes.",
version: env!("CARGO_PKG_VERSION"),
author: "Your Name",
license: "MIT",
additional: serde_json::Map::new(),
}
}
fn router(
&self,
state: wings_rs::routes::State,
) -> utoipa_axum::router::OpenApiRouter<wings_rs::routes::State> {
utoipa_axum::router::OpenApiRouter::new()
.route(
"/example",
axum::routing::get(|| async { "This is an example endpoint." }),
)
.with_state(state)
}
}
What exactly is the point of this if I may ask?
hello im currently making my own bot and i
- want to test it
- need updates for what really is needed
can anyone help
- just test locally, use a beta bot for it ( just replace the token etc with the beta bot's)
- cant say what would be needed without knowing what your bot really does. can you describe it and what your vision for the bot is?
For now its a simple bot for discord server owners to have their discord server in their hands but easy
A ticket system but not specially in discord but a website i made that is connected with your account and all the servers. You can write in discord /ticket and you fill in the basics and you get a link. In the website the owner or admins can help all tickets. You will be able to see the server stats but also like.
If you have a decent server you get a new mod he does not big tasks but the admins you trust will be able to access your servers site and handle everything
peeps any advice on how to grow discord bot? like to get more users and get more people to try the bot
anything else 
im alr there but it doesnt really help with growth cause the bots with more votes are always on top



