#development
1 messages · Page 292 of 1
it looks fine to me

try this
says 19, but it is 21..
LMAOOOOO
what discord shows is an approximate number
what your code shows is the value of all guilds that discord sends you on gateway ready

OH 😭 so its never fully ocrrect?
It's 19 on invite too so this is probably the correct number
- it's cached and often lags behding
Yes
yeahh 24hrs behind usually
Ok that tips array is smart
I am somewaht smug I just made my own version of chalk because it was needlessly over complicated for what I wanted
The attack is kinda a nothing burger because the versions have already been pulled and it only affected web js. Any back end scripting was unaffected as it didn't install any RATs or any other persistent malware
It also only targeted web3/crypto
ah fair
why are people using console colouring for web js then? isn't that just litterally bloat since no one exept the dev is gonna see that?
then again its web3 so, figures.
I use it just for fun
For my bot however, I colour console so it’s easier to see what is what clearly
true but thats not a web app with the needless dependancy that users will download going onto the webpage and never see the affects off I mena
I colour my bot's terminal too but chalk its self has dependancies some how and it needed to be called in differently or something and I couldn't be asked so I just made a small log manager that does all that.
Oh I don’t use chalk, for web app I just colour the line sayings it’s live
Just because it’s fun
how long were the malicious versions available on npm? from the looks of it the attack mostly failed right? it seems the attacker's wallet addresses did not receive any transactions, but not all addresses were checked
bloke on another discord said this
epic fail
damn l3 switch is quite expensive for home lab
, i mean yeah right it's features are awesome
I hope you are at least getting 10gbit
that moment when u do stealthy strat on plague.inc but you're on mega-brutal and they develop a cure within 2 days
lol
They were available around 2 hours without either being yeeted or a patch uploaded
Surprised NPM hasn't taken any steps to prevent such things before, it's not close to the first time something like that happens
I managed to integrate discord consumable SKU's in my discord bot, and I am so happy, this took me ages
oh been discussed already
24 hours ping
I may or may not work for a large company and been scared for a slight bit
When did it happen initially? literally only 4.2.2?
Yep, I've been pwned. 2FA reset email, looked very legitimate.
Only NPM affected. I've sent an email off to @npmjs.bsky.social to see if I can get access again.
Sorry everyone, I should have paid more attention. Not like me; have had a stressful week. Will work to get this cleaned up.
-# (@charlieeriksen.bsky.social)
@bad-at-computer.bsky.social Hey. Your npm account seems to have been compromised. 1 hour ago it started posting packages with backdoors to all your popular packages.
160
Yeah it's literally painful to look at it
look, no clue what the debug dev has going on in life, cant blame them if they do
but
npmjs.help?
yeah likely stress or something
and literally 24 hours to act on it
Hi everyone. The 'next day' busy-ness has fully set in.
Since I still haven't gotten any followup from npm regarding account actions taken, and given that I have now been approached by authorities, I will need to hold off on the post-mortem for a day or two.
Sincerest apologies for the delay.
fair
though it was a miserable fail
Yeah
like
this much effort
but, literally nothing gained 
though supply chain attacks will happen more frequently the next few weeks and months
ehh not necessarily
mehhhh idk
node_modules go brr
other accounts got compromised yesterday as well, but there will be less now that the news of the biggest fail comes out
phishing campaign pretty much yeah
eslint-config-prettier?
or is that one older
not sure which ones anymore to be fair
though have to say: fuck up from the maintainer of debug
but well handled afterwards
yeah, happens to the best of us
real
I was worried a bit cuz I still have chalk on an old bot but I forgot I never update anything so the 4 year old chalk package I have is fine still
thought I converted my bots to my own solution but apparently not all of them.
i think the font size is too big, i can't see
not the place to do that
also that's not a good proposal, "I have ideas but cant code, so you make the app and we share profit when it's a success" is a tale as old as time (spoiler: it never works out)
still nope, thing is, it's very hard to have a bot become successful enough where it pays cost + generate actual profit, and usually the "idea guy" becomes greedy and pull the rug under the developer
it happens waaaaaay too often
but anyway, this really isn't the place to look for devs, you'll have better luck on freelancing sites
like indeed or fiverr
this server specifically
there might be servers that allow it, but I'm not in many servers so idk
also if you're planning to generate profit, do a market research
see which bots already exist and which niches are still unfilled
nearly every idea was done already, and things like multipurpose bots are nigh impossible to stand out among the crowd
Another thing, if you have an idea of the goal you’re going for, browse discord discovery, Reddit, bot lists and just general googling to see if any come up, if there are quite a few popular ones similar, you’re less likely to stand out. It’s what I did when it came to one of mine, like there were a few decent versions but none had the main goal I was looking for
xD
Hey how do I make my bot commands work in dms. Somehow some of my commands are working in servers that don't have my bot in it but it does not work in dms.
I'm using python
Also how do I remove specific commands from being used outside of servers that don't have the bot or dms
something like this
@app_commands.allowed_installs(guilds=True, users=True)
@app_commands.allowed_contexts(guilds=True, dms=True, private_channels=True)
@bot.tree.command(
name="help",
description="Get help with SassGuard commands and features"
)
blahblah blah
I'm using @client.tree.command for the slash commands does that change anything
that means you're having something like this client = commands.Bot()??
Uh I'll have to go check later I'm on my phone rn
Don't remember
asking in advance
I was curious lmao
So if I js add this above it should be good
@app_commands.allowed_installs(guilds=True, users=True)
@app_commands.allowed_contexts(guilds=True, dms=True, private_channels=True)
and for something like this say
ALLOWED_GUILDS = [GUILD1, GUILD2]
@bot.tree.command(
name="guildonly",
description="Only registered in these guilds",
guilds=[discord.Object(id=g) for g in ALLOWED_GUILDS]
)
async def guildonly(interaction: discord.Interaction):
await interaction.response.send_message("This command only exists here.")
this will restrict that command for only the allowed guilds
ya ya ya
above your @client blah blah
yeah ik that
How frequently are bots "hijacked" and used maliciously to raid servers?
Hmm okay. A server owner rejected using my bot because of that and kind've made it seem like it was a common problem... idk, maybe just something they've experienced
Even if the token was leaked, if the bot was already added to server without say admin, kick perms, etc, it wouldn't be able to have perms changed and mass delete members?
when you add a bot you can change the perms it has
if you are an admin / mod of that server
bots can't just magically mass kick / ban people without permission
Yeah thats what I said but they didn't believe me.. lol
Oh well. Thank you for your response 🙂
don’t forget to always add that .gitignore
Lol ofc
Also idk if discord has stopped it but they usually send you a notification if you’re bot token was likey found on GitHub and reset it for you
Because people often ask owners of the server to add their bot and the bot they are suggesting to add are usually a nuking bot to completely nuke the server
So yeah if someone asks you to add their super sketchy bot, don't accept, they could have malicious intents
they didnt, you cannot leak ur token in github at least
everytime u do they'll reset it
public pastebins then
@green kestrel hey, do you know why global_commands_get always succeeds but std::get<dpp::slashcommand_map>(discord_response.value) never works?
m_cluster.global_commands_get([this, callback](const dpp::confirmation_callback_t& discord_response) {
if (discord_response.is_error()) {
return callback(false);
}
auto body{dpp::json::array()};
if (const auto commands = std::get_if<dpp::slashcommand_map>(&discord_response.value)) {
for (const auto& command : *commands) {
body.push_back(command.second.to_json());
}
} else {
// this always runs
return callback(false);
}
});
is this because the list of global applications commands is empty?
can i sell discord bots here
nope
my imposter syndrome prevents me to charge for anything i code :^)
Oh dear
Rules say no self advertising
hey i feel the same

@swift barn I still get the registration error
i give up
PS the only part you need in the code is the posting commands to top.gg thats all, might wanna jusr remove any commands syncing to discord (im thinking you have conflicting commands trying to sync to discord , hmm but yehh important thing is, your commands are posted to top.gg need coffeee hate js
@hot olive try now just updated.....again,
dont clone old commit
nevermind, tried a manual fetch() and got this, so it should've been returning a result
discord_response.is_error() is false soooo
what's up with this?
iirc it's not slash command map it's a vector, different type
theyre returned in the same format you can pass to bulk register
btw where do you get that experienced role?
xiuh gave it to me after luke mentioned that i deserved one
huh?
I do have some code for this somewhere
ah, I don't bother to use the API to fetch them it's a waste of a call
instead I just output the same vector I would use to register the commands
but that's for a specific use, a bot list that wants the commands json to build a help page
a new Top.gg API endpoint needs this (POST /api/v1/projects/@me/commands) so that bots could have slash commands listed on their bot pages
localhost:3000/stripeapi?creditcardnumber=45387498573945
localhost:3000/stripeapi/:ccnumber/:mm/:yyyy/:cvc is better
Anyone over here has experience with ffmpeg, i am trying to convert a mp4 to transparent webp and i am getting a few green edges/artifacts over edges of the subject in my webp output, the background is pitch black for context.
I am having the issue with my discord bot not the actual command posting code
Ohhhh
code was fine then LMAO
Welp check what ur doing wrong in yours
im doing nothing. I added your code to my index file and ever since I have gotten the error
Because this is a problem with the fact that you have the "activity" option activated in the developer panel
If your bot is not an activity, why did you enable it, and if it is, why do you want to remove the entry point?
How did you find that out?

Can someone give me a idea to make for a bot? I’m bored and can’t find anything to make
Make a bot that safely stores credit card Information for faster retrieval
come make tcg cards 
where is your commands tab
s!help?
I dont use slashes yet
-# and I really need to finish the tutorial I was making in figma
ohh now I see what u meant, in the site?
I've yet to rewrite it, it was made when I still liked react native
OMG! Yes
I won’t use the information 
encrypt it with the user's discord id and tell them it is stored as encrypted (dont tell them anyone can get your id)
its ok u can just submit a json with commands instead
i should probably add it to allow you to set the prefix in that view
wait, topgg now has a command list feature?
yeah
damn, never realised it
oh, right, I just marked the channel as read when I saw the ping 
I'll see if I write the command descriptions soon to upload them then
but yeah setting the prefix for the list would be nice
btw, does it support localization?
i have 1 question i submit my bot in portuguese..
you can submit it in portuguese yes
if the reviewer cant speak portuguese we will translate it yes
but your content will stay in portuguese
would be epic but hard to manage :p
well my portuguese is not the same as brazilian
Does anyone know how long it usually takes for Discord support to respond to an intents approval request 🙏
1 day
Good luck is nothing for other world
ah, it’s been almost three days at this point so i was wondering if it took up to a week or so
they do take a while
especially for intents
also be prepared to have to reply their emails a couple times cuz they cant be bothered to read
unless ur lucky
lmaoo alright, thanks :)
I think it took 33 hours from applying to getting a response for me
what
thats mad
damn TIL error responses use an application/problem+json content type
amazing error:
its an RFC
very interesting
ye but i like it 
yah fair
all those APIs using different error formats sometimes is a pain
i like discord's one though
yaaah
wait wtf I need to update my voting handler
at last there's a timestamp for when they voted
Hey folks, whats the easiest way to get the commands json from my bot? Discord.py python :)
just make a simple http request to discord
yeah but what do i do lmfao thats what i want to know
thank you
that was what i wanted
c++ finally added a print function https://en.cppreference.com/w/cpp/io/println.html
(that resembles a print function that you can find in basically every language including C)
didn't print already exist?
I mean technically from the C stdlib
doesnt count because its c!!
c++ almost always clones c functions and puts them in their standard library
mainly to add safety/exception support
though c++ focuses too much on runtime safety in their standard library in my opinion, at least rust gives you unsafe alternatives to most of it but not c++
Time for the non standard library
👀 Time to work on a new project
🙂
@prime cliff clean as always
Happy to see components v2 being adopted
,
Looks interesting
It definitely looks better for sure, just a shame I can’t mix containers and sections 😅
Decided to migrate over to components v2 as part of the next update I plan to rollout tho 🙂
What library ?
js
Ah makes sense 😪still finicky for discord.py
yeah i was going for this design, but as you see above it didnt really work out well on mobile due to resizing
Yeh no mobile view isn’t the very best
takes away the beauty
But that tho is coming along quite well actually
Mines quite simple with the basic container and selection
containers fix the issue with ipads where the top and bottom rows of the 9x9 are hidden (embds for you xD)
im going to take a look at how it looks with the 3 buttons underneath the the 9
doing it as above, did fill the empty space at the side tho, if containers and sections could be combined im sure that would have kept the display nice on mobile, trying to find a layout i like that is unison across screens
hi~ apparently, ppl who 'vibe code' using ai/cursor have no regards to security at all?
i was sent sm1's startup yesterday, like: https://cdn.hamoodihajjiri.com/ED5vbCUuYl
along w/ the dude's sitemap enabled for his entire website, too
it's obviously only for development if the env keys are missing!! totally safe dev only
lmao
are there any of you that have used Nextjs >v15, and have migrated from using <img /> components to Next's <Image />?
I ask as I'm doing such a migration myself, and since I'm using a cdn for the src prop of the component, Next requires that I add that hostname under images#remotePatterns in the next config. Thing is, I have done that, using both the "object way", and the "new URL" way (remotePatterns: [new URL("https://cdn.mysite.com/**")]) but both have failed to resolve the error
I've tried removing the output: "export" from my next config, assuming that maybe static exports could cause an issue - but to no avail
If I disable emojis
They fit
I also removed “Box” from the grid selection, so it’s just 1-9 now as it let them fit
V2 components mention users even inside the embed thing, right?
yes, thats why its yellow 🙂
"🙂" got it, fanks
i guess until we get proper container/section support, this is pretty without the emojis since its now unison in the locations i wanted xD
its a shame were limited with button colours too, that would be a good thing to utilise for this
need to test how the emoji themes work but this is getting somewhere (it auto removes conflicting notes if i insert normal sized number)
emojis look tiny
i kinda like the emojis lmao
So do I, but without them I can keep that layout on mobile 🙂
I guess it’s too much for a single line with it, but I did make the note system work with the button turning green when it’s enabled and red when disabled, it also disables pencil mode when you back out of the cell 😅
Conflicting notes (same grid, row, column) automatically get removed if you input a number into a cell, haven’t figured out a way to auto add them back if you clear the cell again sadly tho
tested mine, nice
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by GSL Networks (Helsinki) [1.12 km]: 1.835 ms
Testing download speed................................................................................
Download: 2085.42 Mbit/s
Testing upload speed......................................................................................................
Upload: 2015.28 Mbit/s
although thats only megabits so its ok for a server but nothing impressive
id expect this to be much more on one of their dedicated servers/more expensive plans otherwise they have no way to compete with other hosts
dedicated is 1gbit capped
thats quite underwhelming
1gbit is more than enough
for an average site i guess but if youre going to be adding any sort of uploads/downloads and streaming and have more than X concurrent users that will struggle quickly
not really most of your content will come from a CDN
your actual response html is barely 1 mb
Depends on your server specs, stack, cloudflare, ect but generally file uploads are not intensive
You could also use S3 buckets AWS/Contabo
yeah but im talking about a completely barebones stack
your server can in theory handle anything... if you include enough aas services or external providers
i will abuse my servers and squeeze as much as i can from them until they physically cannot process one more request
Hello everyone, This is Glitch may I ask smth? Today I have got my bot token grabbed nuked my support server and sending invite links. I cutted the host connection re generated the token and now it works fine. but I am sure my codes is fine with no problems, And I see people talking about server got abused or smth. If anyone know what should I do after that and is this the discord fault? Or mine (I didn't leak or send or show anyone the token I am very sure)
I joined the server btw found people from my language and other English people he was swearing their mothers etc. If anyone got through the same as I said consider dm me the server name invite or ask me for invite to know if it was the server.
You leaked your token somewhere along the way
You may not realize it, but you leaked it somehow
+1, based off the info you're giving us and the fact you didn't send it to anyone, the only way you could have done that is perhaps when you made the code open source (if you made it at all open source) and you somehow accidentally left the token exposed in the repo you had all of the code stored in.
🙂 will have some decent ticket stuff
Even though the description isn't as long you should make the icon line up with the rest for actions
Yea i'm just spitballing some ideas and features into placeholder UI stuff and then go from there.
Will have a placeholder preview of this soon.
🙏🙏
could even have different icons for the different tabs
hell yeah premium 🔥
Hi, one question, how can Discord bots have a message next to their profile picture?
It's a custom status
I have tried to find out about that, the only thing that appears to me is the presence of the bot, which is what says watching, playing, etc.
How can this custom status be added?
Yes and you can set it to "custom"
Depends on the library I guess
in python
It's a programming language, not a library. There are few popular libraries for Python
oh
For discord.py
Set the custom status to “custom”
There’s idle, online, dnd then also “custom”
no
A status is not an activity.
discord.Status != discord.ActivityType
https://discordpy.readthedocs.io/en/stable/api.html#discord.Status
https://discordpy.readthedocs.io/en/stable/api.html#discord.ActivityType.custom
That's how you set a custom status
await bot.change_presence(
activity=discord.CustomActivity(
name="blah",
emoji=discord.PartialEmoji.from_str("🗿")
)
)
not sure about the emoji but docs says it works
No I don’t mean status being an activity
I just call it status like how you would call it a “bio” or “about me”

Well, you still mentioned idle, online, dnd and "also custom". So no, there is no custom property on discord.Status which is where idle, online, dnd, etc. are on
Fairs fairs

I am sure I didn't. I don't even show it to someone and replit cant leak my token right?
i mean if your replit is public thenyes it can be leaked
Aren't replit projects public unless you pay them or something?
yeahhh eg i found this bot code on replit (the token was there)
replit core $25
@hot gull you likely was on a free plan ?
#[inline]
pub async fn all_for_root(database: &crate::database::Database, root: &Path) -> Vec<Self> {
sqlx::query(
r#"
WITH prefix AS (
SELECT $1::varchar[] AS arr
),
prefix_length AS (
SELECT
COALESCE(array_length(arr, 1), 0) AS len,
arr
FROM prefix
),
path_info AS (
SELECT
path[prefix_length.len + 1] AS current_entry,
array_length(path, 1) AS path_len,
files.*
FROM files, prefix_length
WHERE
array_length(path, 1) >= prefix_length.len + 1
AND (
prefix_length.len = 0
OR
path[1:prefix_length.len] = prefix_length.arr
)
),
directory_check AS (
SELECT
current_entry,
MAX(CASE WHEN path_len > (SELECT len FROM prefix_length) + 1 THEN 1 ELSE 0 END)::boolean AS is_directory,
SUM(size) AS total_size
FROM path_info
WHERE current_entry IS NOT NULL
GROUP BY current_entry
)
SELECT DISTINCT ON (pi.current_entry)
pi.current_entry,
pi.path,
CASE
WHEN dc.is_directory THEN dc.total_size
ELSE pi.size
END AS total_size,
pi.*,
dc.is_directory
FROM path_info pi
JOIN directory_check dc ON pi.current_entry = dc.current_entry
WHERE pi.current_entry IS NOT NULL
ORDER BY pi.current_entry, pi.path_len
"#
)
.bind(
root
.components()
.filter(|c| c.as_os_str().to_str().is_some_and(|s| !s.is_empty()))
.map(|c| c.as_os_str().to_string_lossy().to_string())
.collect::<Vec<String>>()
)
.fetch_all(database.read())
.await
.unwrap()
.into_iter()
.map(|row| Self::map(None, &row))
.collect()
}
wake up, new cursed query dropped 🔥
the language syntax is more cursed than the query
lies
pi.current_entry,
pi.path,
...
pi.*,
``` hell yeah
im NOT touching this query again
it does its job on https://files.mcjars.app
and not too slow
xD why don't you merge the prefix and prefix_length like
WITH prefix AS (
SELECT $1::varchar[] AS arr, COALESCE(ARRAY_LENGTH($1::varchar[], 1), 0) AS len
),
``` less CTE
definition of if it works, dont touch it™
Unless you pay, replit code is public - gotta use secrets https://docs.replit.com/replit-workspace/workspace-features/secrets
i need opinions, if these are the 'features', do i combine them in the select menus so that there are less options for the same stuff or do i have the option for each one? here are currently the options in the menu
does this rust sql driver support sqlite3?
im using rusqlite at the moment and looking for something better
no async support sadly
with or without underline for headings (the lighter text in the image)
Probably without
ok
this is so much nicer, cleaner too than what i previously had 😁
should probably add a little heading by the select a category i think
actually nvm, looks better without
Yeah,I knew how now
Moved to Glitch now
I highly recommend using a proper host
You can get a free tier oracle VPS at no cost to you permanently, 1 vCPU, 1gb ram
Should be enough for basic hosting
considering glitch closed their project hosting on the 8th july, how did you manage to move to that?
Hello cutties
I have one question
How can I Transmute one imagem to napi-rs/canvas?
Like put an image on a canvas or you made a design and you want that on the canvas?
Your best bet is to use the different canvas methods to draw it like fill rect and such
Hmm
Like if it's a leaderboard with different rectangles, then you would use fill rect
hello my disk partition just decided to vanish but i managed to recover the folder with my database now question.. theres a way to recover the structure of the database or read the content so its easier to rebuild the structure? bc 35 tables off memory rebuilding it 100% as they were before its impossible.

dude how are you so productive
I need to be doing whatever your routine is lol
xD
I'm basing this off of halo psa which is a really big but very costly like $100 per-user
You sure about that? https://support.glitch.com/t/glitch-is-ending-hosting-what-you-need-to-do/75736
Glitch is ending hosting on July 8th, 2025. Here is a guide that will break down everything step-by-step and help you focus on the future: Don’t Panic 🧘♂️ This is a big change. Start Downloading 📩 @wh0 created this script to download all of the projects onto a folder called “projects.” Depending on how many projects yo...
What’s your question
That’s why I asked how because they closed their project hosting months ago 😂
wait, how did u recover the database but not the content?
well i do have the content
i dont have the structure
the structure is not stored in the same folder as the database bc (idk)
Hello, i changed my bot how can i change botId in top.gg because votes..etc going to old bot
...what database is it?
id is unique per bot and unchangeable, you'll need to submit it again
for all matters it's a different bot, even if the code is identical
innodb xampp
xampp is a server instance manager (made for testing, not production)
but in that case, it's mysql what u use, innodb is the engine
the files you saved are the data, but not a restorable data probably
you dont make database backups do you?
i mean
i wanted to but lets say
i dont kinda expect to wake up one day, start my pc and see (C:) drive and (X) Empty
considering they are from the SAME drive
-# i need to get new puter
backups are especially for when you dont expect
like i technically have to remake all the tables as they were before
but is impossible XD
if you expected something then it'd not be called "prevention"
but well, the issue isn't remaking the tables, they are there already (mysql data cannot exist in a vacuum)
the issue is that the files you saved are not supposed to be saved
its missing the metadata? or w/e is called
the structure
like id -> BIGINT -> bla bla
mysql doesnt save data in the same way sqlite does (in which you can simply copy the database file)
so this is useless? :3
I applied again and made it clear in the application that I want to delete the old bot and replace it and it matched all the description and everything except for the different bot ids. Am I on the right track?
sadly, I believe so, as I said the data cannot exist in a vacuum so you either already have the tables with it or you have neither
you could try to create another database and paste those files there, but I doubt it'd work since it's not the same database
well no it doesnt
afaik the only way to actually save/restore your data is by using dump files
i look it up and apparently im supposed to re-create the table as it was before
then paste the .ibd file from that table with the same name
and it should work
thing is i just dont remember everything on memory XD
you created the database by hand didnt you?
sometimes yes sometimes just SQL command
well, if you didnt change default settings for each column you could try reading your queries and guessing by them the correct datatype
but if you ever changed the field length you'll also need to guess it correct, else the data will be misaligned and the database wont open at all
exactly 😭
and i know i did change it
only god knows
😭
I mean u didn't create the database by code
as in, if you started the bot in a clean slate it'd recreate the database
are you selfhosting the bot?
I think you'll need to manually copy the info onto the new bot
just open one tab for each bot and ctrl-c/ctrl-v onto the new one
I did that
and applied from the same account to prove I'm the same owner.
write in the reviewer observation that you're the same owner, just in case
selfhost until i'm done with it
'-'
i already host different bots with domain
and I suppose it's windows
-# pls don't ask me the technical part is just ssh on vscode and paste bot directory and kaput bot online :3
no its some linux thing in germany
the pc where the database was
i always tell me friend to revert the console but he keeps trolling me
oh wait yeah if you mean database i'm working on
yes
asked cuz you could try checking if there was a restore point before you lost everything
oh no no
it's all gone ahah
the few things i saved were some github projects and backups of the database
using disk driller or whatever is called
are any of those backups actual backups?
it's the folder of the database from xampp >:3
that's a no
well please start making daily backups 
and upload them somewhere that's not the same machine
as for how, mysqldump -u [your_username] -p[your_password] [db_name] > [output_path]
-p doesn't have a space intentionally
I should probably start doing that lol
i just zip my portable cassandra database mounted to cassandra container and store it somewhere as a backup 😎
I do full daily system backups via restic, have a 10tb hetzner storage box for it
I just have a bash script in a crontab schedule
oki :3
I am not using Glitch as a host, I mean for coding.
Not for Hosting.
you said you moved to glitch instead though? so i presumed thats what you meant?
Bruh, I didn't mean for hosting, I mean for coding.
you cant code on glitch tho
Oh,my bad.
How?
because coding on glitch requires having a project on there, which they closed in july
Old Projecct working for me.
Just replaced files.
maybe its a lag.
I will move to github then.
Yea, Thank you.
glitch was alright though back when it was running
it was good as hell.
you just had limited free hours a month
I always found it to be super slow ngl
True.
it's funny that they bragged about allowing bot hosting after that one other site stopped allowing it
Not for me
and now they died too
yeah it was for free projects on my end too
Unfortunaly.
but i used to pay to boost them, since I enjoyed it, now i pay less for the hosting part on the one im on now than i did for glitch. though i still pay relatively the same amount as i requested a dedicated ip
glitch premium was pretty overpriced
thats the price of the package without the dedi ip that i would have paid
Could handle 7k requests per second without an issue and I never exceeded that anyway
yes and no
it was like 8 pounds a month, 10 usd a month i think it equated to?
Yeah that sounds right if they did direct conversion
But some services I saw were just doing the same value for all
$9.99 or £9.99 (cheaper in usd lmao)
i remember paying a lesser number than the shown price in dollars, so i think they did direct conversion
off topic af, I love your site
With the literal hamburger menu
Thats awesome
thank you 😁
it was initially a dashboard but then it sort of become a mini portfolio, though eventually ill have a redirect to the actual dashboard for one of them
at this point im just gonna write a minimal database for some of the data that i dont need 24/7
replicating 11gb across regions is really not good
and its only going to grow
No managed CDN?
cdn is storing ~1.2tb
holy
this infra is hanging on with tape
as most are
yes
problem is that I cannot have any downtime
so switching things is always annoying
probably just going to write a basic db that stores historical data as compact as possible, postgres has quite the row overhead for stuff like that
-# this is why im just a hobby dev for now.
Just ask your questions! Maybe people have experience or can lead you to help
I want my Discord bot to fetch data from a database (like user balance, coins, or ranking) and then render that information on top of a custom image (using something like Canvas or Jimp). What’s the best way to structure the database (users, ranking, balance) and integrate the backend (API/DB) with the bot so it can put the these images for commands like /rank and /balance?
Depends on if you’re using a relational database or a document based db
Im using relational database
It looks like most of your functionality is just an attribute of users
Something like a users table with a column for balance, xp/ranking, etc
Obviously if your structure is more complex then you’re going to need relationships between entities
But if it’s just a simple balance and xp counter, you basically just need columns for those
I use mongo and structure each collection in regard to the main categories of my bot, for example: users (this holds user information like their balance and cards they own), settings (simple list of bot settings like maintenance mode), battlepass (holds all information for each user about their battlepass)
Then I list all of these collections in a db python file and load them on start using asyncio
Index call what you need into each command, for example if a command you're using only needs to display the users balance, you needn't call all the other information from that collection
for example this is the /balance
so, profile picture in top left, what goes in top right/
I really don't know about this. Do you think you could help me? I'll pay you lol
I'd be happy to help if I knew canvas 😭 it's not something I've looked into at all
😭
My assumptions are you'd have to define your areas for information, for example, with the profile picture slot you'd define your 4 corners as your pixel locations let's say 10,10/20,10/10,20/20,20 or something like that
Then use some kind of canvas tool to layer the image you've chosen over the top of that
Lemme look into it rq
canvas is not hard
Could you help this guy then? I haven't learnt anything about canvas
sure
From what he's said, he wants to call information from a db and sort it onto a background image for his /balance command
almost there

a few tips
- check how big the image is when rendered inside the discord chat, and resize your background to that size, because canvas performance scales with image size, so you dont want to make images larger than they need to be
- load the background image into a canvas layer and keep it stored in a global variable or something
- inside the command code, create a new canvas of the same size, and copy the image data from the already loaded canvas onto it
- from that background, you will probably want to draw the avatar first, and then the background on top of the avatar, so that the cropping is correct, much easier like this than using mask paths, the rest of the info can be written on top afterwards
Mongo is great for this
It’s one of the reasons I love it
Another tip, if this is for things like balance, you could add a function to use short hand numbers such as 49294 becomes 49.29K, makes it less cluttered for larger numbers
Yeah it's been great so far, I originally picked it because of its horizontal scaling
But honestly it just has so many nice features for optimisation and it's very well organised
@lyric mountain yo i did it
im using a script to read the files that are left and it gave me a txt file (after trying different ways)
some tables like these are okay
and some
XDDDDDDDDDDDDDDD
"google" "hello" ????????? HAHA
schemas are your best friend
Damn good job
optimization and mongodb usually dont go well in the same sentence
you cant really beat a table and schema based db in terms of performance because for variable schemas it becomes hard to optimize and make assumptions in terms of record size, columns, values, etc
but its definitely a nice databse if you want flexibility and have lots of relational data that would perform or look horrible in a typical RDMS database
also like how they let you send custom js to the database and have it executed when evaluating records
Could you give me a really basic rundown? I don't think I've looked into those yet
Well for me it's been great, I'm currently storing around 3k+ user information and I haven't had any issues with latency on calls yet. When I was learning dbs for discordpy it felt very user friendly
I'm always up for learning more though
3k users isn’t much data, mongo tends to explode at scale without proper planning
Let me finish tidying and I’ll explain about it 😁
the same that are sent to discord to create slash commands
So the script itself?
yeah part of it is that its friendly, its a good database and even at a large scale if you index correctly it will perform well (albeit probably more resource heavy)
its a really fun database to use, when i started out i found its features much more interesting than typical sql databases which are boring
Sounds good, tysm 🙏🏻
The screenshot above shows an example schema I wrote.
A schema is basically a blueprint for your data. It tells MongoDB three key things:
- What variables (fields) exist.
- What type each variable is (for example, text is String, numbers are Number, etc.).
- What default value each variable should have (so the field never returns null or causes errors).
For example, in my pet schema I set the pet’s happiness to 100 by default (with the type Number). That way, when a new pet is created, it always starts at full happiness.
In MongoDB Compass (where you can view and modify database data), schemas group data into collections. Collections let you organize related data separately — for instance, I can have an economy collection and a pets collection. This makes it much easier to manage and update.
At the bottom of my schema file, you’ll see this line: module.exports = mongoose.model("Pet", petSchema, "pets");
The important part is the last argument, "pets". That tells MongoDB the collection name.
So when someone runs /pet:
The bot looks in the pets collection to see if the user already has an entry.
If they do, it loads and uses their existing pet data (which may be different for each user depending on their interactions).
If they don’t, it creates a new entry using the schema’s variables and default values.
i gave the example so that you can visually see what im explaining, if youre still confused im happyto explain further
all css and html is supported
just not structure tags (<html>, <head> and <body>) or javascript
well I did say javascript
the browser would just ignore that though 
so much to do, slowly coming together
may focus on daily challenges out of that list next, not tonight ofc 
3k users you can keep in memory without issues
i doubt you'd hit any perf issues with any unordered list until like 100k
top.gg had to move away from mongodb because it was not able to do many of the queries we needed at 2.6m records
slowly....
make sure you do a backup as soon as u finish it
im not finishing any time soon XD
considering i need to test each table to see if all columns actually match the ones in code
and all the connection references
only thinking about NPC and quests make me wanna stop
this thing has been 1v9 so far
perhaps you need to check bad sectors on your ssd if your partition suddenly went poof 
Woooo lets get this properly working
What’s the with user option?
apparently it was microsoft update
my friend has told me in the past windows updates have corrupted partitions
i had my updates disabled for who knows how long and when my PCIE usb card stopped working i thought i was drivers and who knows what so i forced updates and wallah
lost partition 1

@lyric mountain SLOOOOWLLLY getting everything to work again
oh another one? since the issue i know is that the whole ssd gets bricked, not just a partition
no just the partition
was gone
it went from partition 1 to "free allocated space"
XD
That just means the ticket is waiting for a user response back
Oh, that update
!!111!!!
I think my servers are safe
its probably intended for apple only so that they can add their "liquid glass" to apps that use webkit/safari or whatever under the hood
i like to call it liquid ass
I don’t understand why everyone is hyping this liquid glass stuff up. It looks like a visual effect designed to drain my battery even quicker to force me to buy a new phone
I keep hearing everyone talking about it like it’s something revolutionary
Maybe I’m not seeing it but I really just don’t understand what it’s hyped for
Because it looks cool
How does one obtain the certified developer role?
i see stuff like this is really typical in the apple ecosystem, they release a feature other devices have had for ages and the fans are acting like its revolutionary, probably because apple hypes it up to be as much, and probably since the apple ecosystem doesnt usually see stuff like this outside of it
i remember the hype around widgets when android had it for a decade by then 😭
One doesn't
its an old role that is not given anymore, like the early verified badge
What's stopping them? They'll be removed from the site
yeah but how is anyone gonna verify that it's fake?
The number of servers is displayed on the bot invite screen
@lyric mountain guess what
if the iso could talk it woud say
"well well well guess whos back"
no, the iso would say "im arch btw"
not me struggling to install linux for the past 3 hours
and i still cant get it to install
does any god want the paste of the errors and tell me why its not working? :3
Never used arch so idk if I can help
Arch Linux users after spending 5 hours debugging why chrome isn’t installing
no no why archinstall is not working
Even better
i swear idk what they did but nobody can get it to work
The OS itself won’t even install, tells you everything you need to know about it
i just replaced the error fall off to "input("shit didnt work press enter")
AND IT STARTED
XDDDDDDDDDDDD
-# i am manually starting services now but HEY it works
does anyone use d++ for bot development?
can someone help with getting user & bot permissions in d++?
@green kestrel he might be able to help lol
did you already ask on dpp server? what do you need to know, what sort of permissions from the user so you need? server? channel?
sooooo, I've posted my bot on the site. now it's waiting for approval. is there anything else I can do?
no
Learn to crochet
question, my bot needs perms to create and delete channels and permission to manage messages. is that going to be a problem for the approval server?
not if it shows a proper error if it doesn't have the permission
and that it asks for the permission it actually needs and not for example the bot asking to have ban permission for a kick command
i thought brain automatically woke up from hibernation after seeing d++ mentioned but it was because he was tagged
Oh. I'll make a return message on missing perms.
Anyone that is an Admin or Owner of a server wanna be my test subject?
this code is haunting me but I think it finally works https://github.com/mcjars/www/blob/main/backend/src/files.rs#L53
yea i asked but no reply. i dont need any permissions from user. I just need to check if the user has those particular permissions to run the command and if the bot has the particular permissions to run the command.
i am literally stuck here since 1 day
very... interesting code
what is the aim of this?
caching cdn files locally while still serving them at the same time
😩
async execute(client) {
const guild = client.guilds.cache.get(config.guild_id);
await guild.members.fetch();
if (!guild) {
console.error("Guild not found.");
return;
}```
hey guys, that guild.members.fetch() returns me:
- Error [GuildMembersTimeout]: Members didn't arrive in time.
- Error: Client network socket disconnected before secure TLS connection was established
any knowledge as to why?
you have the required intent?
That's d.js right?
For the first one - https://discordjs.guide/popular-topics/errors.html#members-didn-t-arrive-in-time
@sleek cradle

Dm ?
Please use #staff-tickets
hello, i'm trying to work with zero trust's short lived certificate, and i'm unable to make it work. i've generated the certs using cloudflared access ssh-gen --hostname xx and make POST request https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/access/gateway_ca to get the CA. but the certs' signing CA is never the same as the generated CA's fingerprint. i only have 1 account so there's 99% chance i put the wrong account id. if anyone know anything, let me know
ahhhhhhhhhh yessssss cloudflare my beloved 😍 😍 😍 😍 spent 6 hours reading docs, trying this and that, nothing works.
https://developers.cloudflare.com/cloudflare-one/applications/non-http/short-lived-certificates-legacy/#3-generate-a-short-lived-certificate-public-key stated
A row will appear with a public key scoped to your application.
hell nah it doesn't. when i looked through the network activity which i just did, it turns out there's the shit i'm looking for, public key. cloudflare did not show that after creation.
at least i can fill my free time
Peak code.
Peak setup.
Even more peak
WAIT IS THAT OUTSIDE?
ofc
so many files 👀
didnt even notice 😭
so many buttons.
😭
Oh wait that pic is select menus
The joys of using v2 components for config
you get to use buttons everywhere
assets are just the files for the themes 
-# theres about 2 or 3 time more buttons than you can see in that one pic
meanwhile all my buttons are setup in interactionCreate

At least it's organised-
My bot used to be everything in one single bot.py file
I regret not organising more ngl
Would be nicer to have all buttons in their own folder sections
It's never too late?
interactions/buttons/config/set_logs.js
Rather than reading every name till I find config_set_logs.js
your right, im just too lazy to seperate everything now tho
😭
You never just clicked search -> config_set_logs?
Real
Turning my bot to separate files took like a week of pain
how did you get the little file type icon next to the names though
the actual chaos doesnt bother me, it just makes it annoying
its different than mine
Visual studio?
fileicons extension
lemme see what one im using
Mine just came with it lmao
its different to the default xD
tyty
you can set the file icon theme
looks so much nicer than this
yeah i hate the default
i had another that includes folder icons for like src, models, config etc
but i dont have that one installed on my laptop, just my pc
omg you can make them colourless
colourless looks weird af
its all white
grey
this one is pretty
i have used this one since like 2018, used it for too long to switch without things looking weird
Oh hold on I thought you were saying you had no icons at all

nono xD
That makes more sense
also i just completely glazed over this that would be chaos if i did that
it is
but thankfully i can minimize the pieces of code im not working on, since i have them in if statements regarding their cstm id
to very different interactionCreate files lmao
i keep everything seperate and handled
my interaction create is quite literally if(<type of interaction) then use <type>handler
THERES A BANANA THEME
turns all files into bananas
their description?
.js? BANANA!
.py? BANANA!
.exe? BANANA!
node_modules? BANANA!
That weird file you don't remember creating? STILL BANANA!
i wouldnt be able to work with this
its funny 
i use file icons more than i even do file names or extensions
what about gravity falls?
that ones cool
right??
im gonna get it, whats this one called
tyty
my eyes would die using that
colour coding seems fun
https://marketplace.visualstudio.com/items?itemName=SergeyEgorov.folder-color
this does it too but you can change individual files as well
Is there one which makes every single bit rainbow? Like each letter is rainbow separately, file icons etc. now that would be obnoxious
not sure
if not make one
If there isn't I will try and get chatgpt to code one because I cba
may aswell use track pad at this point
i just died trying to figure out why my bot wouldnt log messages.
-# i forgot to turn it on in config
Edit: no rainbow puke theme exists
only thing i dont like about that fileicon them is the folder icon
and i cant change it
does topgg library provide vote timestamps through its API methods??
so that i can show
Vote Expire in:
Next Vote Available:
I don't know if the libraries have been updated to use API v1, but it seems that such a timestamp exists in the API itself
https://docs.top.gg/docs/API/v1/projects#get-vote-status-by-user
beautiful
Hi! Do you think I'd be able to get a bot certified if it basically works like a global chat, syncing a dedicated channel across multiple Discord servers so everyone can talk together? Or will that be a problem with the API and everything?
"Certified" for what exactly?
I assume it's not about verification because it's automatic
its automated now?
ok i will
oh right yeah i was thinking about privileged intents here
ah xD
💔
Support/help desk scam
They will tell you to send them money or something for verification xd
Probably crypto scam too
@quick nest you lied to me crypto bro please give me bot support
this is the most random thing ever
thats a scam???
Yea, they are trying to scam everyone, even people without any crypto
for +100 servers
wtf fr ?
@solemn latch support scammer, description has invite and etc
Yea, bot verification is automatic but intent requests are still checked by Discord, that's why I asked what do you mean exactly
oh, it's been a long time since i made a bot
how fun
That's deep
i want to make a bot that synchronizes messages in each room to create a "common" room with all the servers having the bot. i don't think i need intents
bro that guys account got obliterated
Then respect the ratelimits
yeah
Hi
thx for the help !!
Where is your bot?
not in this server :3
it can be found tho, im not sending links because self advertisement rules
Thanks
-b 1335886139185168420 support scam
davidanderson0344_83237#0 was successfully banned.
i feel like the emojis next to the headings is too much
I dont think so
really?
yeah
been trying to improve it but wasnt sure how, figured they would have been too much
nope, if its all emojis its obnoxious, if its used to like accessorize i think its good
those are the only 3 badges so far as well but eventually possibly more can be added 
like for example my bot has a country related thing and instead of just the name i made it have the flag next to it. its not obnoxious, its just accessory
fair enough
@lyric mountain WE ARE SOOOOOOOOOO BACK
recovery just got sped up by 900%
from handwriting the whole structure to finishing 34 tables in 2 min HAHA
Gdamn you did it
yay my bot has been approved. what do I do now?
idk
._. wanna add my bot to your servers to test it out for me? any volunteers?
Nah
damn, I tried
just know that advertising multiple times can get you muted/banned or whatever
and when you're banned here, your bot is gone from the website
my bad
Sure
I'll test yours and you'll test mine ?
Of course
Come dms 🙂
I've heard of "follow for follow" or "sub for sub" but "test for test" is crazy
🥀
😭
toasts and exp now :D
support server has a higher reward, not by much though, and daily puzzles have a higher than other servers but lower than support server since daily puzzles go in dms xD
progress?
ignore the incorrect xp required part, we got that fixed just after the ss
V2 components and images have not been friends every time ive tried to do stuff like this
Spill the technique
Im actually gonna write this down so I take a look at it later
Bc I couldn't for the life of me get images to be inside them
Have you found like for the rank card for example, is there a width that works best?
obviously i define the stuff im using on the card but it essentially works the same if you wanted a different image
for mine, it just spans to the width of the container
So it goes smaller on smaller screens
Oooh nice
another example of images in containers is this, this is how i add the sudoku image of the game to a container
its simpler than the example above
thsnks for showing me how you did it, i couldnt figure it out before and i may just be dumb but i cant find any good docs for working with v2 comps
its all good 🙂
im working on getting the anonymous tags better rn, instead of using a random id which looks like spam itll be bakery themed for the nicknames if you want to hide your username on the leaderboards
my goto for random id is always UUID in most cases out of me just being lazy
But themed anon names is actually cool sounding
we generate a bakery themed name and save it, while also checking if the name already exists when they create a profile
so everytime they turn on anonymous mode, they get set to the name stored for them
i do need to make a settings command so that settings like this can be toggled on/off
does having the setting name bold appear better?
Yes
Is that the banana theme you have on?
Emphasises what it is, easier reading
no xD
ended up changing it 😭
it looks nice with multiple like this tho
Yk the
Owo
Thing
Eh fair enough
Ahh okeeee
I’m currently using an amoled shiny theme
That one looks sorta nice
Ah cheers
had it installed but didn’t enable it on my man project

ive used this theme forever
the fact i only have this left to do compared to how long it was is such a great feeling
part of that cant be implemented until dashboard
Javascript is amazing https://jsdate.wtf/
Never
So I've been trying to add a card to the components v2, but it just doesn't allow me
What’s it saying?
I use new Date()
Funny enough I just had to read the mdn docs and some stack overflow for a few things I was working on (I hate reminders. CAN DISCORD PLEASE GIVE US A DATE PICKER)
root@remotedev:~# du -sh projects/0x7d8/panel-rs/
39G projects/0x7d8/panel-rs/
root@remotedev:~# du -sh projects/0x7d8/wings-rs/
72G projects/0x7d8/wings-rs/
root@remotedev:~#
im suing rust
the tech isn't there yet /s
was there any error/how were you attempting this?
I figured it out; it has a syntax error, and my script to check errors was also broken
ok i think i can tweak the package to do this 
i dont have enough xp
get more xp
this enough?
im trying
bignumber.js bypass the integer limit, max that out then it’s enough.


