#development
1 messages · Page 303 of 1
can i know how ppl got colored text and the different animations on thier bot page of top gg?
Custom html/css
could ya help me to add some like basics
😭
i really liked the animation one in someone bot page icl
Perhaps you should try learning some front end instead of having someone else do it for you every time you need a change or something new
americans pronounce it car
Yay I love Discord bugs They're fun to fix
There is a reading this I meant to say discord bot not discord
since you fix discord bugs, can you fix its memory usage without an automated restart 
jst say yes/no yappachino fym everytime i asked how didnt asked all dat
its ight tho
ty

I mean like. It's there on the bot edit page so that's how
but unless you never looked or overlooked it, I took it as you want someone to give you html to put on your page which is why I put my suggestion as it'd be the most beneficial in the long run
Might automatically restart if it crashes
Maybe buy more memory

Don't need more than what I have
Your bot obviously are using up too much ram
Electron's just horrible
I guess you're mixing up Discord with Discord bots
You mean your discord client is using too much RAM lol
I mean Discord is
You fix discord bugs
It shouldn’t
No, I just got bots
I also miscommunicated
Especially when you don’t get much sleep when you work
Discord is made to use memory because Electron does that by design
I meant discord bot not discord

My brain’s been having a fart
Haven’t had much sleep for the last three days
So brain is currently not functioning
lol
I’ve been trying to take a few days off this week to reset my brain
There’s one thing I do miss about old discord bots when you should be able to do ! even though you can still do it I prefer the/commands now
@harsh nova Bro, it's been 14 days and my application hasn't been reviewed yet.
@cedar crescent
Our current average review time is <1 week.
Some bots may take longer to review than others depending on their features. Because of this, we can't guarantee your bot will be reviewed as quickly as someone else's, and there's no exact timeframe for approval. There's also no way to check your position in the queue - but remember, you're not first or last!
You're free to edit your bot's page anytime, both before and after review. This won't affect your place in the queue.
💡 In the meantime, please make sure your bot follows all of our Bot Guidelines for a quick and smooth approval!
our review times are 1-2+ weeks

i had no idea Discord dms you when your bot hits 75 servers
i got notified and thought i got termed or somethingn 😭
a
You can also copy its ID and ban it from your server
I remember when there was a rumor about some app that it was better to ban it from your server because it was spying or something 
Discord spies on you, so you should ban it!
I literally talk about something in a vc and then get served ads about it 5min later when I watch yt while eating
Saw this going around and tested it myself, and I can confirm that this is unfortunately legit. Four hidden bots have been placed in any existing or newly created Discord server that are harvesting data, images, and most concerningly, one seems to be a face swap bot.
Due to them being invisible, banning them from your servers isn't possible without their ID's, which I've typed out for easy access.
1153984868804468756
1288638725869535283
1090660574196674713
1104973139257081909
Banning is done with the /ban command with each string pasted in one at a time. Four ban commands in total.
Image proof below and further information. This was in my PERSONAL server that has existed for +5 years. Discord is harvesting your shit without your consent, fight back.
-# #discord
User apps are called spyware kekw partially true though imo
Yes, this one xd
Just because you can ban any application/user by ID, people believed it
Lmao. Them being banned from the server doesn't "prove" they were in it in the first place. User apps are a little sussy, but you don't get any gw events for a guild you are not installed on
👀 doing some hytale modding
Good luck
is it just me or is copilot one of the most aah vibe coding tools
im always using cursor because copilot never does well for me
i absolutely hate it
it does sometimes suggest something good
but take too long to care
in visual studio it gave me suggestions with random indentations every line and nonsensical code 💀
better than hallucinating variable names
and then even having typos in them
i cant count the number of times it suggested "recieved" instead of "received"
probably commonly seen typo in their training data lmao
though you dont see that mistake with other llms, which is confusing because copilot uses the openai models (at least i think so, anthropic as well)
i think they lobotomize their models quite a bit
unironically I got better suggestions in their free tier
I think this isnt a coincidence
so you buy their paid plan and think "eh its having a bad day" or something
jit is coming https://github.com/rust-lang/rust/pull/151156
NO WAY
WHAA
A Condition Variable
Yeah, used it and it's pretty cool
yeah like the one in C++
i prefer using mpsc::sync_channel(1) or oneshot::channel() tho because they let me pass messages
like Results
yeah, thats what im currently using too
im not quite sure what usecase id have for Condvar
semaphore
ah I use the tokio one
only reason i've used it so far
my multithreading app pretty much depends on mpsc channels lol
there's only one rwmutex i think but the rest is channels
i love them for this thing, i dunno what it's called
I should maybe follow your tracks and actually write comments in my code
yeah, did it with my newest project, makes it look super clean

wish i did the same with my most popular project, it would take weeks to properly document everything
get an llm to write some
jit in rust before gta 6 is wild
it already existed for a good time know via cranelift
but it may be coming "officially"
its not quite real jit yet but its faster than compiling regular debug builds
This function not only accepts an Input as an argument — it also outputs an Output. 💻👨💻🖥🖨💾
Whatcha guys think of this. Mock data in the listings grid but yeah
You have to login to see the name of the seller and their contact information. Later when I implement messaging that will also be a thing required to be logged in to see a prompt for
Not sure what else I should display on their page, like maybe reviews or something? hmm
What?
Why'd you say sus
dont fall for it Aaron its just a troll / rage baiter
Anyways
fuck outta here if you going to say some stupid shit
guys is there smth like one time bot invite link that should expire after the person invite the bot
I don't think so, anyone can add your bot if they know its ID. Depending on what you want to do it might be possible to use a redirect URL(?)
you can't do that, whitelist the guild id if you want to limit people that can invite the bot
you could add state and redirect uri to handle that
you can also use the state to handle the sort of one time invite link
either way you gotta have a web server to handle the redirect and the bot to leave servers that joined without the web server "saying" it's ok
what boxes do to a mf
facts
Be nice please. thank you

rust mfs realising static pointers without allocating on the heap exist
i rarely ever use closures unless i have to which simplifies a lot of my code (the inner C in me never really went away)
very sussy
i rarely use boxes
probably almost never

i only use closures as a last resort
@pearl trail !!!!! (he made a bun version of your kazagumo)
Oh, the same guy who advertised on ddevs today 
@knotty night boop
@cloud temple please refrain from advertising
Why is intelij ui so horrible 🙃
more popups please
hai waffle!!!
why are u using qodana?
I'm not the point is i can't close/hide the tab lol
So it's basically forced ads
wow 😮
never had that issue on my 3 years of using jetbrains
Weird, for me it appeared once and then never again
@neon leaf bruhhh all this time with axum + serde + serde_json i thought that all my data in the struct had to be owned before serializing because the data i was pulling from was in an arc and thought in rust there was no easy-ish way to prove to the compiler that the borrowed data from the arc is guaranteed to still be there while serializing
turns out explicit lifetimes were all i needed, that is going to save a TON of heap allocations and get me back some extra performance since this is used for api response bodies
learning rust day by day
i usually try to avoid explicit lifetimes because i always seem to run into cases where i need to track the lifetime everywhere where its used but here it doesnt seem to be the case whcih is great
yes yes, you can even do this for deserialization (Cows with json deser is peak, no need to allocate if unescaped string)
but quite a bit more complex
are you using compact strings btw or regular strings?
Ive found my memory fragmentation issues to completely vanish ever since switching
regular for now, to take full advantage of compact strings id have to migrate my database to a proper ORM library which supports compact strings which i havent gotten around to doing yet
but its on the todo list
LIFETIMES <333
all my homies hate heap allocations
never knew about this, thanks!! 🫶
though sadly my use case atm still demands a String soo
im wondering if theres a proper way to "stream" json files with a top-level array using serde
I want to make my bot work in dm and I don’t know how can someone help me? Please
if you are using slash command, it works on dms too by default iirc
yes it should
mhm
deserialization with zero copy reminds me of the c++ library simdjson which does exactly this
although yeah annoying thing is you cant do it completely if you have strings that need to be escaped
otherwise you can just reference a slice to the original buffer
yup
i would be ok doing that though if it means i can selectively escape certain string members (even in the code) that i know might need to be escaped (which wont be many)
this is why real programmers use protobuf or use some kind of binary protocol instead of silly json to avoid these silly high level programming problems
transferring data via utf-8/ascii feels like 1981 smtp style aah
im prob gonna make my api support multiple return content types
since I use my own http response wrapper everywhere already anyway
and requires serde
so perfect conditions
but in my case a more dynamic response type would still be needed (by that I mean one that includes field names)
my uni hw required me to use heroku and mongodb
felt like stepping back to the past 😭
...nevermind fuck heroku
agreed
aint no way im specifying my billing info during signup
i put random numbers
like 66666666666666666666666666666
so i have to pay $7 to properly do my homework 😭
nevermind, spinning down is not the same as shutting down
please use a less threatening word 
can someone guide me a lil how can i setup the topgg api
who literally uses heroku anymore
i can only imagine its massive companies that are locked into their ecosystem due to a poor decision by one of their lead developers 10 years ago
my uni for their react course 😃
stack used: react, react router, express, mongoose, heroku/render, google analytics/logrocket
yeah they almost completely axed their free tier where you used to be able to host small sites and bots
that's render, not heroku
ah
i deleted my heroku account
never again
this is much much better
(for this use case)
YOU GOTTA BE FUCKING KIDDING ME
industry practice for hosts offering free tiers nowadays
too much abuse
fair enough
i just make a virtual card which i set a limit on in case they try to do something sus lol
all of my cards are declined 😃
skill issues
no
im using render
heroku is no longer free
i tried 3 cards and they all got declined
ok im going back to sleep my brain hasnt woken up
beautiful
google cloud used to offer $300 credit for first sign up. they still might do, worth checking that out
I used to shuffle 4 revolut cards in a circle. by the time I used up credits on the 4th one, the 1st card got deleted from the system and I could do it again lol
and that's why one-time cards are useful
deser with str slices, very cool https://crates.io/crates/messagepack-serde
the ultimate react experience
react project try not to get 1 high-critical vulnerability in one of your sub dependencies challenge (ultra impossible)
looks normal to me
traits being traits
man gotta love to see a deployment fail because of a single trailing slash in a URL 😃
so glad I decided to stop learning rust
hey @scenic kelp wyd around these parts
yes
nah
what the fuck
gif is so big it has to be long
simdeez
interesting, will look into this!

thanks!
W library (dont know about the rust port but the c++ one is W)
yeah SIMD things are usually peak
only sad thing is it you cant serialize with it, the library doesnt support it
i did talk to the maintainers about it but they said they dont have enough people working on it to implement serialization
bummer
there is some very infrequent talks about it though
so atm you need 2 different libraries to do both serialization and deserialization
A key for task-local data.
I will not even attempt to guess how cursed this must be under the hood
rust gets so cursed so quickly when you want to do complex things safely (or even unsafely a lot of the time)
well im not gonna complain because it somehow works
nvm I see
when the scoped future is polled, it sets a thread-local var to point to itselfs task_local context
then any subfutures that get polled can read the thread-local var
and when the poll is done, it gets reverted
quite genius solution
LMFAO
The last recorded record. We could not hit 2000 before our ISPs shat themselves at the worst possible timing
How upsetting
We hit 1950 hours at least just didn't screenshot
nvm the lib sucks
😭
lol
github has a stroke
why is caching so hard
no way
this literally released 3 days ago
(still has cves but less so thats progress)
toml for rust
json/yaml for go
Programming in YAML. Contribute to yaml/yamlscript development by creating an account on GitHub.
what am I even looking at
what you are looking at is YAMLscript. It says it in the embed. Hope this helps!

i think i'm making progress
color pallette is still a maybe, i decided to phase out some of the flashy visual charts and opt for more data focused alternatives
these were taken on the latest public build. Charts use the rechart library, although some may be swapped out soon
wow, another rebrand
yeah sorry, kinda having an identity crisis with this small project haha
the fact the entire website layout and everything changes every time is insane, i would not have the mental capability to keep doing that lol
i had to take a break for a while (still on-going)- i was up from around 7 AM to 2 AM daily, very straining haha

looking ight
im fw it
ly
how to increase your rust vtable data by 10mb:
pub trait AsAny: std::any::Any + Send + Sync {
fn as_any_boxed(self: Box<Self>) -> Box<dyn std::any::Any + Send + Sync>;
fn as_any_ref(&self) -> &dyn std::any::Any;
fn as_any_mut_ref(&mut self) -> &mut dyn std::any::Any;
}
impl<T: std::any::Any + Send + Sync> AsAny for T {
fn as_any_boxed(self: Box<Self>) -> Box<dyn std::any::Any + Send + Sync> {
self
}
fn as_any_ref(&self) -> &dyn std::any::Any {
self
}
fn as_any_mut_ref(&mut self) -> &mut dyn std::any::Any {
self
}
}
gemini what the fuck
see this is how they make you waste tokens without you noticing, no wonder you run out of usage so fast
atp just use javascript
I forgot what that term is called for ai loops
*clears throat*
"Pardon my manners, it appears that I've glitched"
Lmao
neural text degeneration
surprising it did that because basically all serious LLMs have a parameter called a "repeat penalty" which basically discourages the LLM from using a specific token if it already appeared in the response (discouraged more if seen multiple times) which basically eliminates these kinda loops
gemini must have it be a little less aggressive
lowkey
i technically started it in 2021 so gl
me when i lie to icann about my domain registration information
liar liar pants on fire
im buying a domain not applying for a mortgage 😭 why they need so much info
Probably in the case of abuse it's extremely useful to track you down or something
anyone know what's wrong?
😭
# Simple workflow for deploying static content to GitHub Pages
name: TSDoc Actions
on:
push:
branches:
- master
release:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
jobs:
# Single deploy job since we're just deploying
deploy:
name: Deploy Documentation
# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
# Specify runner + deployment step
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 20
cache: "npm"
- name: TSDoc Action
uses: erikyo/tsdoc-action@v1
with:
source_dir: ./src/*
output_dir: ./docs
front_page: README.md
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: "./docs"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2```
Why use a 3 years old action when you can just run a single command
Actually 2, one to install it - one to generate
I got this directly from their GitHub 😭
but ty, i'll fix it
Yeah it's mainly, a 3 years old action isn't really a good sign
It may still be working but yeah, things change
golang is officially one of my fav languages
it is everything i wanted javascript to be
simple, low-level ish and flexible
dm the link pls
but can go do this
use std::ops::Deref;
type BBox<'a> = Box<dyn Deref<Target = Box<dyn Deref<Target = Box<u8>> + 'a>> + 'a>;
fn main() {
let bbox: BBox = Box::new(Box::new(
Box::new(Box::new(Box::new(9u8))) as Box<dyn Deref<Target = Box<u8>>>
));
println!("Hello, world! {}", *****bbox);
}
please get this out of my face
no
I prefer being in an Arc
😡
Hey all for anyone doing hytale modding working on a website to show a collection of resources, guides and tutorials for modding 🙂
@ mods ban this man
sending spam

I did some redesign of my https://wamellow.com/ home, anyone has some feedback?
i really like the glow around the image and your "Accessibility" text is a rare example of gradients done right 
i think two things that jump out at me are the "App" label (seems a bit out of place given that styling) and the slanted "Get started here in seconds"
-# idk what suggestion for improvement to make tho lol
i think for the "Get started here in seconds" it may look better if u make the arrow longer and add more veritical spacing between that text and the buttons? just a thought
it looked so empty without the glow lol thanks
By seeing the screenshot pretty much the same opinion, I will look at the website itself later
The app badge stands out because it doesn't really follow along with the theme
the APP text is a remainder from another header that was like Next-generation of Discord [APP], idk if I shall get rid of it
i don't have a great eye for design tbh ;P
im a backend dev lmao idk what I am doing
for mobile I will prob place the buttons beneath the showcase or smth, honestly no idea
looks odd rn
i think the stars and text at the top (if not the buttons as well) would benefit from more empty space near the edges
realest thing i've heard all day 
you have been sentenced to being stuck in an Rc indefinitely
nooooo
im stealing this
👀
i cant believe github still doesnt support sha256 repositories
github should in theory only have one job which is be somewhat compliant with Git so that it can effectively act as a web dashboard for Git repositories
instead we are getting AI features on the home page nobody asked for
well it is
they'll likely move their asses off when git 3.0 gets released with sha256 as default
about time unless they find another reason to copout
i have a repo that i keep on my private gitea instance that i want to sync to my github but i cant because i created it under sha256 lmao
so they added a guard to prevent collisions, even if git doesn't do it on pure content
so they don't have much reason to move use sha256 (for now)
compability yeah sure but like they can postpone kinda forever
until git 3.0 releases at least
A few weeks ago, researchers announced SHAttered, the first collision of the SHA-1 hash function. Starting today, all SHA-1 computations on GitHub.com will detect and reject any Git content that…
Uh
are we just reinventing xml
yes
I genuinely dont understand the point of this
then again never used terraform
so many companies start to wet themselves with excitement whenever they hear terraform
if you see a job ad for an infrastructure/devops job 9 times out of 10 they will mention terraform
so i think its very common in companies
i suppose its helpful if you operate something like k8s and want to dynamically spin up more compute instances in the cloud maybe?!
maybe replicating a live environment in a test env too
there are some problems I did invite the bot
I just got api banned
please wait 5 minutes
alr, are you using v2 comp?
LMFAO
partially
lol
bro got api banned
I broke it
yk its my job to break your shit sometimes
I'm so confused rn about my bot
yea i broke her bot 
it say failed
spicetify user detected opinion rejected spotx is on top
guys do you have got any good custom emjis 🙂
@acoustic bough hey i broke it
yo guys I'm also a Ui designer, I want do rated something that I made for my bot
thats the logo
Was the typo not enough
People make weird names 
may you attempt now pls?
ye it does work now
lo not every website you shoudl trust, If I put it anywhere else it says its Ki
So you didn't use AI to generate this image?
but there is a problem with the dashboard I can't login with my discord acc
Nothing wrong with using AI tbf, just know that it doesn't make you look good
Ik why should I lie, when it was AI I would say it
it works fine for me rn(?)
lemme try it agian
You should add the charts here do, it would be great
I got rn some problem with charts too, It dosen't work
Btw after reading some of the ddevs chat looks like your bot is not alone in that
smh
same thing happened to me, like a year ago😭 😭 temp work around i did was to proxy outbound requests just until the ban was over
(stil didnt find what caused the ban up till now but ive added a few mitigations to help anyways )
I got api banned 5-6 times this night
I just got token reset for too many connections
Get reliable static IP addresses for your apps on Heroku, Vercel, AWS Lambda, Fly.io, Render & more. Easy setup, HTTP/HTTPS & SOCKS5 proxies. Start in 60 seconds.
like wtf? I am not spamming shit
I literally only have 4 gateway connections, which are not spamming or reconnecting
do u have like a graph where ur able to see all incoming requests ?possibly something ur overlooking ?
you can see all my api bans
that last graph is very broken due to missing data but thats expected
i think the users endpoint is being fetched wayy too much ?
/users/:id
this
i mean yeahh i see the ratelimit added, but still looks like it may be getting spammed ?
5 requests isn't really anything
and I have a cache with like over 100k users in it
global api ban is way beyond 5 requests
yeahh its a weird one, you can try potential workarounds though, till you can find whats wrong, cos im still sure its a certain endpoint being "abused" (which discord thinks )
discord support wont even be of much help, cos this is what they said when it happened to me
I literally log EVERY SINGLE REQUEST that has a ratelimit header attached
and I only have five logged
and I haven't deployed anything in the last week
and it's just now
any background jobs or something?
only thing
yeahh weird 
Is this fetching a specific user or fetching all members of a guild? I had trouble with fetching all members recently, there’s pretty hefty rate limits on it now
no. also fetching all members of a guild works over the gateway via request guild members, not the http api (unless you for loop)
the user endpoints could be my leaderboard pages though
you can do that for free with oracle cloud if you get their free tier btw
they dont charge per ip but per network interface so you can rotate ips as rapidly as you want
Unable to spawn shard: Error [SHARDING_READY_TIMEOUT]: Shard 0's Client took too long to become ready.
at Timeout.onTimeout (/home/izzi-ts/node_modules/discord.js/src/sharding/Shard.js:166:16)
at listOnTimeout (node:internal/timers:569:17)
at process.processTimers (node:internal/timers:512:7) {
[Symbol(code)]: 'SHARDING_READY_TIMEOUT'
}```
what does this mean?? did discord timeout my bot?
at ClientRequest.<anonymous> (/home/izzi-ts/node_modules/node-fetch/lib/index.js:1501:11)
at ClientRequest.emit (node:events:517:28)
at TLSSocket.socketOnEnd (node:_http_client:525:9)
at TLSSocket.emit (node:events:529:35)
at endReadableNT (node:internal/streams/readable:1400:12)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
type: 'system',
errno: 'ECONNRESET',
code: 'ECONNRESET'
}```
Connection got terminated/closed 🤷♂️
Could be a discord issue just like it could be a network issue on your side
yeah i added debuggers
debugger [WS => Manager] Fetched Gateway Information
URL: wss://gateway.discord.gg
Recommended Shards: 6
debugger [WS => Manager] Session Limit Information
Total: 1000
Remaining: 982
debugger [WS => Manager] Spawning shards: 0
debugger [WS => Shard 0] [CONNECT]
Gateway : wss://gateway.discord.gg/
Version : 9
Encoding : json
Compression: none
debugger [WS => Shard 0] Setting a HELLO timeout for 20s.
debugger [WS => Shard 0] [CONNECTED] Took 381ms
debugger [WS => Shard 0] Clearing the HELLO timeout.
debugger [WS => Shard 0] Setting a heartbeat interval for 41250ms.
debugger [WS => Shard 0] [IDENTIFY] Shard 0/6 with intents: 513
debugger [WS => Shard 0] [READY] Session ** | Resume url wss://gateway-us-east1-c.discord.gg.
debugger [WS => Shard 0] [ReadyHeartbeat] Sending a heartbeat.
debugger [WS => Shard 0] Heartbeat acknowledged, latency of 2443ms.
Unable to spawn shard: Error [SHARDING_READY_TIMEOUT]: Shard 0's Client took too long to become ready.
at Timeout.onTimeout (/Users/hoax/Desktop/izzi/izzi-ts/node_modules/discord.js/src/sharding/Shard.js:166:16)
at listOnTimeout (node:internal/timers:594:17)
at processTimers (node:internal/timers:529:7) {
[Symbol(code)]: 'SHARDING_READY_TIMEOUT'
}```
the connection seems fine
but why is it failing after
looks like discordjs issue?
everything was working fine a while ago
this is a classic indicator of being rate limited in discordjs
but it doesnt say that tho?
i remember in the glitch days when everyones ips kept getting banned they got the same took too long to become ready error
dont u get like how long you been rate lmited?
but I also tried from a different device so diff ip
buti could be wrong tho, can you curl the gateway without an error?
yeah
the gateway is fine
you can see in the debug logs above
also I heard djs caching all members and I've grown a lot could that be a problem?
yeah nvm probably not a ratelimit
/* eslint-disable no-undef */
import { ShardingManager } from "discord.js";
import loggers from "loggers";
import path from "path";
// import * as dotenv from "dotenv";
// dotenv.config({ path: __dirname + "/../../.env" });
import { DISCORD_TEST_BOT, DISCORD_BOT_TOKEN, SHARD_LIST, TOTAL_SHARDS } from "../environment";
import flushBattleCooldowns from "./autoClear";
// eslint-disable-next-line no-unused-vars
process.on("unhandledRejection", (error, promise) => {
// logger.error("UnhandledRejection: " + error);
});
process.on("uncaughtException", (error) => {
// logger.error("BOT SHARD CRASHED, FATAL ERROR: " + error);
// process.exit(1);
});
process.setMaxListeners(100);
// const shardParams = {
// execArgv: [ "-r", "ts-node/register" ],
// totalShards: TOTAL_SHARDS || "auto",
// respawn: true,
// token: DISCORD_TEST_BOT,
// };
// if (SHARD_LIST) {
// Object.assign(shardParams, { shardList: SHARD_LIST });
// }
const manager = new ShardingManager(path.join(__dirname, "client.ts"), {
execArgv: [ "-r", "ts-node/register" ], // This is needed to run dev
// totalShards: "auto",
// token: DISCORD_TEST_BOT,
token: DISCORD_BOT_TOKEN,
respawn: true
});
manager.spawn().catch((err) => {
console.log("Unable to spawn shard: ", err);
loggers.error("Unable to spawn Shard (might be rate limited): ", err);
});
manager.on("shardCreate", (shard) => {
console.log(`Shard #${shard.id} is Online`);
shard.on("death", async (process: any) => {
await flushBattleCooldowns();
loggers.error(
"SHARD_CRASHED " +
shard.id +
" closed unexpectedly! PID: " +
process.pid +
"; Exit code: " +
process.exitCode +
".",
{}
);
if (process.exitCode === null) {
loggers.error(
"WARNING: Shard " +
shard.id +
` exited with NULL error code. This may be a result of a lack of available system memory.
Ensure that there is enough memory allocated to continue.`,
{}
);
}
});
});
hmm then whats the issue 
trying to figure out if its caching problem
https://www.answeroverflow.com/m/1262496683170988104
maybe its taking too long to receive everything from discord (too much data)?
also seem to get the same error if you try fetch all members which is slow
https://github.com/discordjs/discord.js/issues/5187
try increasing the timeout?
right but im not fetchign all members
not necessarily fetching all members but its the same principle with whatever you could be doing
where do i config the timeout? there is no option in sharding manager
manager.spawn takes in an object with a timeout
https://discord.js.org/docs/packages/discord.js/main/MultipleShardSpawnOptions:Interface
let me try
i think for each client you can also enable gateway logging where d.js will dump everything it requests/receives from discord which can help you narrow down whats making it take so long, but im not sure what option it is to enable it since i havent touched djs in ages
though the timeout issue is most likely more of a symptom but increasing timeout can solve it for the time being
ok so using the timeout worked but now i need to know what djs is loading for it to take that long
is there a way to tell it to not cache all users? and only some?
looks like I have to move away from djs
You should probably read this guide
https://discordjs.guide/legacy/miscellaneous/cache-customization
Guys is there a way to force caching (discord js or any other library) of large guilds?
yeah thats probably the issue in that case, djs lets you adjust it as nynu said
thanks!!
what do you want cached? discordjs caches just about everything by default
Is there an alternative to OpenCV? I want to add motion tracking to a 15-second video, and I've been trying to install OpenCV for over 3 hours 
interesting
If someone wants to take over and they have a reasonable amount of reputation/references/standing
mfs need 5-6 years of experience to even get a free job maintaining a crate 😭 🙏
i mean it's a popular crate, you don't want someone unqualified to maintain it. beceause if you fuck up, 452 million projects will also get fucked up 😃
whenever you need datetime info, chrono's got you covered
even if it's just a free job maintaining a crate, i'm sure it'll make you standout in your CV
@delicate zephyr does topstats support this 👀
support what?
sliding vote window
it just fetches stuff from top.gg every hour
there's nothing more that we can do
nrn still wokring on it
Let’s say I wanna cache literally everything…?
Why would you want to cache everything even if you don't use it?
Discord.js relies heavily on cache so it caches everything it needs on the fly
unless you have a small-ish bot or you have a lot of memory and resources its not a realistic option sadly
assuming youre asking about this what specifically do you want to cache?
lmao i thought no way is this real
top tier easter egg
what are you struggling with? What environment? opencv has prebuilt binaries for pretty much every platform.
ubuntu
linux
trying to install it on npm
which package and what's the error
Trying to install opencv via npm? 😭 Is it literally not just one apt install
little update, i'm no longer hosting this project through static hosting, i'm now hosting the entire project myself.
This has been an absolute nightmare to convert, taking around a week and a bit, but it's done.
When benchmarking the results, fetching server info went from an average of around 7.5 seconds, to 0.5 seconds.
There's many other benefits i won't cover here, but overall, it's a cool learning experience
i'm using cloudflared, Quart and hypercorn to tunnel this, although the hardware i'm running it on.. could be better, but im broke.
what hardware are you using?
don't laugh
intel core i3 3rd gen ivy bridge, 16GB DDR3, and them some jank SSD i found lying around
it's a dell optiplex
better than me
nothing special
oh jeez
109 servers so 
i keep randomly getting these 502's that vanish when i hard refresh, it sucks because i've spent 2 days trying to isolate the cause but i'm struggling lmao
it's not cloudlfare based, their from my web server
i need smth that draws basically zero power
i used to have that but it stopped. just went away eventually
ah, to be fair, the cloudflare setup is quite new, started it around 18 hours ago
did you use the single command to install it all or did you individually install each bit
huh?
nvm
Containerizing the setup?
If not, I highly recommend it. Makes your life a lot easier if you decide to move to cloud hosting later, or even if you want to make a CI/CD pipeline to deploy on your own hardware
well you need bindings for node
almost all bindings tell you to install the binary first
skill issue 🤷♂️
Fr 😭 I use opencv so much
[discord.py] can someone here who knows components v2 give me a hand? I have an issue which quite frankly I have no idea how to fix and no idea how it started
Its hard to describe but I have an entire system thing and theres a modal with a select and basically its not appearing but theres a button and smth else
for code pls lmk since its kinda hard to share
What is appearing?
Or any errors
No errors but its not doing what its supposed to
It used to have an error but I tried to fix it and now its arguably worse than an error
Is the entire thing not appealing just the select of what?
I tried to fix it with debatable methods and for debugging it changed it slightly and now the dropdown and stuff is there but its not showing it or anything
lol thats funny
https://twitch.tv/ThePrimeagen - I Stream 5 days a Week
Become A Great Backend Dev: https://boot.dev/prime (I make courses for them)
This is also the best way to support me is to support yourself becoming a better backend engineer.
https://twitter.com/terminaldotshop - Order coffee over SSH!
ssh terminal.shop
Discord: https://discord.gg/The...
this has been old as the time itself imo
anyone using proxmox or such to host your bots?
not me, but I am just wondering why proxmox
they're on the pricey side, you can get cheaper VMs if your only goal is a discord bot
well, I have a spare pc which is fair bit strong 😂
yeah
hey so my bot was declined due to no "working help command" or point of entry. My bot is using the discords help command that was built in when I import commands. Do I need to create my own help command? Also what does "point of entry" mean?
I use to but found it easier to just use pebblehost to start out until I need the serious hardware.
Yeah override the default help command with a custom one. Point of entry is just like a welcome message when someone interacts with your bot for the first time or just a help command/ tutorial command that guides new users
If you want to discuss why your bot was rejected, open a ticket on #staff-tickets
how come what were your pain points if you don't mind me asking 😄 ? just doing some "research"
awesome thank you! I'll open a ticket when I do fix the issues just to be sure I have everything proper before I resubmit. Thank you for the help!!!!
for some reason I couldn't keep a static ip for the life of me and it very well could have been my isp. I just didn't want the headache and my server host costs me $3 usd a month lol
oh yeah, most just are dynamic ip's and you gotta pay some extra $$ to get a static one lol
but fair enough.
Also, it's a long shot (mods I apologize if this is against' is anyone available to go through the flow just to give a quick eye for my bot all my friends are yeah, boomers
Fianlly solved it
no more 502's
😎
what was the issue
It was tunneling with WIFi instead of the plugged in ethernet cable
spotty connection = intermittent 502's
Hai
```rs
pub struct Settings {
cached: [RwLock<SettingsBuffer>; 2],
cached_index: AtomicUsize,
cached_revalidating: Mutex<()>,
database: Arc<crate::database::Database>,
}
what am I even doing at this point
this seems kinda overkill, i assume youre using cached as an a/b type system? is a temporary write lock on the cache really that bad 😭
this is basically my main bottleneck currently
one cache expiry and its over for every request
until all read locks have vanished
and cant use Clone because I need dyn
and cant use Arc because settings need to be directly mutable
I dont @harsh nova
no
weird personal project where the scope is one server (even though its a large guild) and I want to cache all offline users so that we prevent API abuse for some shenanigans
realistically memory and cpu isn't an issue in this case (small enough to be irrelevant)
have you looked at the arc_swap crate? it lets you dynamically swap out an arc for another one without locking, i use it and its really good albeit borderline overkill for my use case
ye but like I said cant use Arc because I need the original data to be mutable
the main issue with 1 rwlock is that writes are fair
so if any write starts while 1 reader is drunk, all readers and the writer have to wait
with 2 that issue is completely solved
i end up with 1 mutex for the writes now
if cache is expired and write mutex can be grabbed, use the inactive rwlock to update settings, otherwise return the active one temporarily since another thread is writing already
means reads will never yield (or block or whatever the proper terminology is)
```rs
struct SettingsBuffer {
settings: AppSettings,
expires: std::time::Instant,
}
pub struct Settings {
cached: [RwLock<SettingsBuffer>; 2],
cached_index: AtomicUsize,
write_serializing: Mutex<()>,
database: Arc<crate::database::Database>,
}
Mutex<()>?
yes, that mutex is for ensuring only 1 write operation can take place at any given time
since if 2 writes would happen at once without this restriction, the original issue would occurr again
heres the full code of the logic https://pastes.dev/e7VR4Nd6lS
for cold start look for a method that wraps this endpoint https://discord.com/developers/docs/resources/guild#list-guild-members
any library should have it since it's REST
you probably want to ensure your cache won't go stale so i recommend also tracking guild member add/remove events
Build games, experiences, and integrations for millions of users on Discord.
and update events depending on what you want to track
i think djs has a built in option to cache the response so you don't have to build one yourself, best to confirm yourself though
if it's a guild with a lot of members djs is going to eat up memory though
i miss when bot development was simple without the interaction shenanigans 😿
instead of a Mutex<()>, why not a Semaphore?
protesting (jk, probably would work the same way in the end)
yeah, but it's prob slightly better
i used a semaphore for something like this in the Top.gg Rust SDK
also this can be changed to fetch_update
something like ```rs
let _ = self.parent.cached_index.fetch_update(Ordering::Release, Ordering::Relaxed, |i| Some((i + 1) % 2));
thanks
oh fire good resource ty
it seems like on startup we can query first 1k, then query second 2k, and so on.
I have no issue caching the 5k or so members that are needed if we could drop the unnecessary api abuse in role syncing. Probably won't be even a few hundred mb added so thats chill
theres a UCF student with the license plate "KEKW"
TIL
yk i got ucf license plate?
i literally do
i don’t drive a honda
bro im so dumb i swear
i ran accidentally 2 instances of the bot somehow and then wondered and spent 30 mins debugging
Crazy advertisement
@ivory siren boop
an atomic flag could work well here (potentially) but not sure if its worth the effort switching out the mutex for not much benefit
i just try make whatever i can atomic and for things i cant do atomically i opt in to full reloads of them so i dont have to write to them, only to whatever is holding them
but yeah annoying problem in concurrency
atomic strings tho would be cheating and OP if that existed, cpu manufacturers would need to nerd that card
actually you can pretty much implement that by making the length and buffer pointer both atomics then you can dynamically swap them out SSO would be a nightmare tho
That’s not me that’s someone else but yeah that’s KC
I’m over by science drive 🥀
rip
psa github has issue status page.
well
even if I could save 67ns per lock, the whole point of this double buffer is that writing is rare and (!!!) most importantly, the code is already way too complex and using a lock with raii structure is a lot easier than an atomic flag
Engrish
Only issue is for github actions
who doesn't use github actions lol\
Hmm, I guess it's a matter of preference.
Also not sure you are aware e.g you using netlify it goes through actions or somethinh>
yeah im aware, such things like vercel and netlify uses them. well fair enough, the github action is not made by them so i count they’re not using gh action ;D
you aint a real one if you dont micro optimize
imagine the wasted 20 cpu cycles on each lock
its async already so wont see that gain anyway
well id think atleast
I still wish tokio was designed more similarly to go
where syscalling "moves" all async tasks to another thread instead of creating a new blocking task and awaiting it
Runs the provided blocking function on the current thread without blocking the executor.
i remember using that before for some crypto operations
not quite what it does afaik
Be aware that although this function avoids starving other independently spawned tasks, any other code running concurrently in the same task will be suspended during the call to block_in_place. This can happen e.g. when using the join! macro. To avoid this issue, use spawn_blocking instead of block_in_place.
has bad side effects
Scam
and go does this on basically everything by default
so you get noticable speed gains
magic™
although is there really a difference in performance when executing a blocking task on a dedicated blocking thread (thats most likely on standby i presume) vs converting the current thread temporarily into a blocking one and move the other tasks onto another async thread?
i'd imagine it would be worse if anything?
i need to read up more on async
something something context switch something something
(forgot 99% of what I read about this topic)
I got destroyed by using sysinfo in an async task recently
to be precise the disk info part of it
in c# its an incredibly common mistake in async because c# provides no async way to query a file/disk info either 💀
so you have to make sure you spawn them in blocking tasks otherwise you will quickly starve your tasks
yeah I dont get why rust doesnt have a function attribute for this tbh
e.g. #[blocking]
or something
because I may still have blocking code all over the place and id never know until I get mysterious issues

eh im happy
The world will fall apart
@quartz kindle oracle scammed me
(i accidentally went over their free tier for block storage)
good thing i noticed bc it was like $6 a day
update: im homeless https://flare.rjns.dev/68yE7/flameshot-e59gy3.png
r u fr?
what happened?
One message removed from a suspended account.
Joking is forbidden in Tim's cave
sure but oracle are scum, it wouldn't surprise me 😄
they are the most scummiest scum scum company there is (google takes first place but they're second)
too bad they offer a good cloud service 🙁
I got a question
so i am recreating my webhook so other users can use it and i forgot one thing and
if role is null is it data.role == null or ==! null
isn't ==! not a valid operator?
it is
iirc == null?
ive useed it before but im trying make it if it is null skip the roles and still push out user voted that bot without getting the roke
you should do !data.role since it covers more cases of things being undefined (if were talking about js?)
it is js
yea but im dealing with this fucker
guld.roles.cache.get checkes if the role exist before giving it to the user
thats why im trying work around it
so i dont kill the bot with discord api errors
wait so you need to check the role first in guild before assign
yes
hm
i had it happen when if roles doesnt exist it will restart the bot for whatever reason
let me try that
cache.has should not be throwing if the argument passed is null
It’ll just return false
i thought as well but fuckin it spam api erros and pm2 dies
cache does not perform API requests, if you have API related errors then it is not from that line
In fact cache.get doesn’t throw at all afaik
it shouldn't right?
^
shouldnt but idk im using fucking sharding bullshit with this shit
so anything can and will happen with sharding bullshit
well shit imma test it out real quick
The discord.js Collection class extends the JS native Map class. <Map>.get() never throws
The collection class doesn’t appear to override the get functionality
@warm surge will be curious of the outcome
hold on fucking with commands since it got broken
I can think of a lot worse companies than google, at least they stick to their own lane.
Adobe and Ubisoft on the other hand can burn in hell.
ah yes Ubisoft is a classic
it works
for those using cloudflare IAUM
did ur challenge pages show this dark themed stuff (different wordings perhaps)
the original one or how it used to be is image 2 kinda like light grey or something
how did you go about it the method i mentioned or alternative?
the method you mentioned
ggs
cat as a service best
hey, i thought that NPM doesn't do any malware checks
but according to their npm docs, they do? Lol since when
"Rather than tricking people into using a similarly-named package, attackers also try to add malicious behavior to existing popular packages. In partnership with Microsoft, npm both scans packages for known malicious content, and runs the packages to look for new patterns of behavior that could be malicious. This has led to a substantial reduction in malicious content in npm packages. Furthermore, our Trust and Safety team checks and removes malicious content reported by our users. Similar to dependency confusion attacks, we are constantly updating our detection services with new examples, so if you think a package contains malicious behavior, please let us know!"
on npm they probably do some kind of scanning, just not at install time, by the time you install the package wouldve already been verified by their system
although i wouldnt know how sophisticated it actually is
ive seen npm packages that had malware with basic obfuscation techniques such as converting to base64 then reversing the payload
I got hit with an npm malware a few weeks ago
One of the packages I used had a dependency that injected malicious code into my environment and registry
Woke up to my computer opening PayPal on its own 💀
wait doesn't npm warn you? fairly sure it did whne you are installing?
holy if I pull this off embedd manipulation this will be finna goated as young kids say it fr fr no cap young rizz skibidi
ah no it's actually easy lol
Not if it’s a dependency of a dependency
huh never noticed it actually lol
welcome to npm hell
I guess yeah 😂
I'm scared of Go
imagine if python and C had a baby, you get golang
i am so popular i get a ton of friend requests from cute girls from the "DiscordServers" server :^)

thanks for the recommendation
i dont even know why im there, its like the most scambot-filled server around
In the future I want to be like Tim
i want to be like Tim, but for real, not with scambots xD
you just radiate JS optimisation vibes, its irresistible
right now im radiating "fixing ASP.NET bugs with claude code"
i have no idea how any of this works, yet claude code keeps telling me "you are absolutely right"
they havent fired you yet?
no the previous maintainer quit
I APOLOGISE FOR THE MISTAKE!
CLAUDE CODE USAGE LIMIT REACHED
are you poor? just add your credit card
i am poor, cant afford max plan
get cursor and just keep buying the $20 plan on different accounts lol
i rarely go over the limit but then again i dont vibe code often
bro cursor is as good as vibe coding gets 😭
it even has the anthropic claude models which is basically the standard for vibe coding
naaah
look at snoopy he's smiling and saying no.
Windsurf.
wait botghost is still active o.O?
Yes
They made some changes to how they store their tokens or something and now everything is fine
Oh nice, good for them I guess.
Anyhow, finally close to done, last thing is for mangament to define metrics for support agents and I think I'm done and try to find people for testing lol
You're absolutely right! Thanks for catching my mistake. Let me fix that for you-
outputs entire code base and blows over limit
You're the expert!
I get Claude to design the front end and then I just hook shit up
💀
Front end ass
Gemini 3 Pro seems to be good at frontend using one single prompt, it gets about 80% of the way there, but it’s awful with editing. Claude/GPT 5.2 does the other 15%
Inevitably it will never get 100%, but usually good enough for my prototypes
wtf is this
ok differnt question ik what it is
but is it even useable yet cause afaik it was rather ass
for me claude gets it enough especially with its opus model
Doesn't get it 100% of my vision but enough for a prototype so I can prove my shit works
like this for example
frontend all done by claude, it used my existing graphql queries and laid everything out
its good enough for a mvp
i have a question, my bot is on 17+ servers, but top.gg only says its on 3 servers? how do i fix that?
ah okay
where can i find where i do that and what i send it to?
can only see GET not POST to anything other than commands
thanks!
tf are the employees doing on their work pcs
its quite good just very expensive tbh
i kept battling with another colleague for a seat license when i first joined lol
now they laid off 2x tech people in an already tiny tech team
yeah we hve 1 license for 4 people
does anyone use antigravity?
i do sometimes
Can you tell me how to make the AI better
'make no mistakes'

What do you guys think?
wifi?
Just waiting for my Wi-Fi to come
so what is it?
To Home lab mostly for my discord bots
where's your bot? I want to try
I used to host with hosting providers

It’s on top.GG
where
If you type my ID on there, you should be able to find it
the holy comment
Not sure if we’re allowed to post it in here
729303155623460865
Once the leads done, then we’ll start pushing our commands out
How do you do that for a Minecraft profile? do you scrape?
Most Java in and the windows Minecraft
how many commands are in your bot
Currently 26
I have more
We’re currently working on things at the moment on the back end
So we’ve paused most of our production
look at this
idk, i just use gemini 3 flash most of the time, as the 3 pro hits the rate limits too fast. it usually does a good enough job, but for anything serious/complex i use claude code instead
antigravity's AI autocomplete is pretty cool though
The last time we went with a hosting before that they screwed around and deleted 95% of our staff with no answers
If the limit moves Claude
The last time we went with a hosting before that they screwed around and deleted 95% of our staff with no answers so I don’t really trust hosting providers no more. I’d rather host stuff myself and know what goes into my products.
which host was it?
do you have a team? when will I have a team?
I always do it myself
can i join your team
Sorry, we’re full
alright
please open a ticket in #staff-tickets to appeal your bot decline
i am currently working on my bachelor thesis.
So far i know, you can upload packages and it doesn't get scanned until a while. So there's always a time window where you can get fucked.
For example latest hacks all involved updates and publishes that took like 15m-5h to detect.
but my question now is, does NPM not scan at all during publish/installation? As that's what my thesis revolves around
i genuinely can't find anything on the internet though, npm is being non-transparent about this shit.
not always. NPM has an almost post-active way of checking for malware.
hmm interesting
maybe @quartz kindle knows though
cuz if this assertion i make is fake i am cooked
Guys, try Jules, it's really cool.
jules can run the code for testing
Oh
maybe during publish but definitely not during installation because they can just do one scan for everyone on each publish on their backend while keeping their techniques secret
but always possible they ahve some kind of delay window between publish and scan since they probably have lots of people doing scans so they have a "queue" if you will, probably, especially if they plan or are using AI models
Built my Home lab today fun
My head is hurting from today
welcome to the club
I’ve been up since 6 o’clock this morning
I ain't clicking that

thats nothing to do with what you were talking about before though?
thats known and published vulnerabilities for a package in the database, not malware (sometimes malware in code is released as an advisory but its not common)
tldr npm audit for packages, but not package's package dependenciesp
npm audit checks your package lock, in other words all packages regardless of whether its a subdependency or not
otherwise it'd be kinda pointless
thats why audit can flag packages you never even installed because it also checks subdependencies of other packages you installed
but it does show you as a tree what package it belongs to
Isnmt npm audit malware scans?
they scan for code signatures and known vulnerabilities?
My thesis was about machine learning classification upon installation and publish. A pro-aftive wait
i know audit is known issues but aren’t those including known scam signatures etc?
Or is it truly pro-active?

tfw



