#development
1 messages · Page 2069 of 1
according to the docs thats just a check, it doesnt wait until ready
kill 1
in your shell
its discord rate limits
repl.it shares IPs for many projects, and a lot of people use it to host discord bots
so its just discord not letting you sign in
(kill 1 switches the repl container)
huh
Nvm then, at least he can call it to make sure it’s ready
Outside the ready event
huh, tnx
yeah repl it is reallllly bad for hosting
its fine for testing but i wouldnt rely on it for bot hosting
I.. do not have funds to look at other options
railway is a good option
although theyre soon limiting their starter plan to 500 hours (similar to heroku)
unless you add a CC
you have been banned/limited, 21 hours remaining
that's probably for the repl container, not ur project btw
some people have said you can reset replit's ip address by running the kill command
you can try that
😭
so they arent just gonna give u a individual ip for each project
try running the kill command
that switches the container, works most of the time for me
what errors are you seeing?
i connect to a.. well something I made to share objects remotely like a db
so im seeing a few connection broken and the first one I saw was network.. switch.. TLS
i mean do you allow access from anywhere
i cant remember the exact error
but in short.. I switched networks while connecting
I understood that one, but now.. it's just going connection broken
gonna try again in a few seconds
success
tnx samm and tim
You don’t seem to know what IPv4s cost nowadays
So no, nobody does until you pay for it
shame we can't fully migrate to ipv6
wouldn't be a problem if standardization was a thing from the start
the more you dive into protocols the more you realize the internet is bullt by smart people who have no idea what they're doing
https://youtu.be/FMhScnY0dME thoughts on this ?
First look at Bun - a fast new JavaScript runtime like Node.js or Deno. Explore the core features of Bun.js and how they might affect fullstack web developers in the future.
#javascript #firstlook #TheCodeReport
🔗 Resources
Bun.js Announcement https://bun.sh
Bun on Github https://github.com/Jarred-Sumner/bun
How JavaScript Works https://yout...
looks like it uses jscore instead of v8
they prioritize "startup" performance instead of long running performance
Yea seems like it to me as well
i kinda dont believe their benchmarks, jscore is not faster than v8, not even close
its just faster to start, because its small and simple
while v8 is a monster
Icic
I never even knew jscore was a thing until 10m ago
Looks like it was made by apple(????)
also, their benchmarks focus on web, sqlite and ffi
all of which are js interacting with something outside of js
so it seems they did a great job optimizing the performance of js interacting with other langs
Yeaa
also, surprisingly, v8 is much more memory efficient than jscore
there are not many tests out there, but i found this one from 2019 comparing memory usage in react native
also, im pretty sure justjs blows everything away regardless
in terms of raw power, nothing beats it
it just doesnt have many tools that all other alternatives have
@spark flint
it’s youuuu
idk why people are trying to sell jscore as the ARM of js engines
Omgggg it’s me
I have 0 clue the differences between jscore and the v8 engine
How to add bot server and user count in website
on the your topgg page?
if u mean top.gg, user count you can't (and shouldn't, that's a meaningless value). For server count you need to use the api
see #topgg-api
Watched this earlier today... will try
I got a Question: is it posibble to save images to MongoDB and then when member execute command e.x /image
It generate random image from db
won't uploading to cdn and saving links be better
Didnt think abt that
And links or link?
Since i can generate random img from ine link but saving multiple links dosent sound practical
are you really generating the image or just returning a random image from a pool?
Return* srry
I kinda... Use generate from some reason instead od return
As my "keyword"
well then just use a cdn or filestorage
you can technically save image as base64 or something on mongodb but won't be nearly as efficient
My bot is currently fetching and editing a message on multiple servers in interval. But having to fetching every time actually causes the rate-limit. Is there a better way to do this task? (My bot has message cache disabled, idk if it's a good choice or not)
if its always the same message, you can save it in a variable
even with cache disabled
that way you dont need to refetch it all the time
oh, you mean saving it in memory, like saving in a collection or sth?
yeah
hmm I see, Imma try implement that
@quartz kindle weird people at djs just mentioned that changing the nickname is currently bugged in v14
at least that wasn't my fault
bugged by djs?
(at least in the latest build)
or bugged by the api
lmao
nicknames?
you can change bots nicknames now?
or is that somthing thats been around for a while and i just never noticed
yeah i just never thought about it
makes sence
im still wating for bots to get an editable presence
so you dont have to have "playing"/"watching" there
doubt this will happen
to reduce the possible char length for ads?!
idk
maybe just because discord is weird
there's always a reason

Ammm another question, i saw this interesting thing
"watching your mom under the table"
How I could make this with slash command?
The message content is exactly the same
No matter you send it as interaction response or message response
No bro in html how to add server count
Make an api to retrieve bot values
its actually slower in calculations
Is there actually a way to update the original response to an interaction after deferring?
Try using the code I sent
the edit webhook endpoint should work as many times as you need
oh yeah I'm stupid
The way u tested it is creating new arrays each time, and accessing arrays too
Although array ops are good to test whether it is good or bad too
Dm
No, here
what would you say @original represents as type?
i don't get this
message resolveable or original, huh wtf
original actually is the interaction id or interaction message
yes its a literal thing
really just @original
yes
hmm okay, wasn't aware of that
good to know
just wanna disable the components but I don't wanna fetch the message before
weird... it does absolutelly nothin
no error, no response
await interaction.fetchReply().then((message) => interaction.webhook.editMessage("@original", { content: "test", components: [] })).catch((error) => app.utils.error(error));
you already have message
Can't you do message.edit()
I wanna keep this without auth
once I migrate the bot to interactions only, i dont wanna edit this again
Which?
ok I found the issue, @original is considered the select menu deferring itself (not my command respond)
it goes like /command -> response (select menu) -> defer interaction -> edit reply -> update original message (select menu)
webhook edit message actually required the interaction message id in this context, since it's the select menu interaction
easy things can be difficult sometimes

should have mentioned that earlier I guess
although responding to a component interaction with type 6 or 7 should work?
type 6 and 7 are specific responses to edit the message the component belongs to
but if you already respond to the component with a type 4 or 5 (create a new message), then you cannot use them at the same time
👍
any web dev here to explain me why tf these annoying lines from left and right sides appear?
ofc if u can see it on the image
there are no lines
Yo how do I make a folder in github..stupid question I know..but I'm not used to github. Haven't used it in 3 years.
you don't
I mean, not directly
when u upload a file u can rename it, add somefolder/ behind it's name
That's what I mean. Lifesaver, thank you.
how to change prefix for BlackJack bot? i need / from +
not the right place to ask
but since u said / I assume it uses slash commands
in which case you can't change
When I have a try-catch statement in js, is there a way to catch the error with the catch statement if the error occurs in another file? For example, this:
try {
myfunc();
}
catch (error) {
// ...
}```
where myfunc is not inside this file, but another
That should catch it, no?
No it goes through process.on('unhandledRejection'
can I actually await a promise in a statment?
That's because myfunc is an async function, and it threw without being awaited
If I understand what you mean, yes: return await new Promise((resolve, reject) ...
Thanks, I will try that
you could do myfunc().catch(console.error); or something similar
If you didn't want to await
To answer this, no you didn't 
also return await makes no sense
I want to catch errors when executing commands (that are in other files), so I'll try await
as you already return the promise
it's been working for two years now xd
yes it does, but await is useless
you need to this
return new Promise((resolve, reject) ...
iirc it was necessary, but I'll try to leave it out
you have to await the promise (it returns) at the place you're calling your function
iirc it was necessary
no, absolutelly not
oh maybe it's needed to say that it's like this:
bot.database = async function(queryContent, interaction) {
return await new Promise((resolve, reject) => {
// asynchronous stuff
That doesn't make sense lol
oh no
wait I'll first try the catch question
Nevermind
ok I can await a promise inside a statement
my gosh
I understand why people are too lazy to test things instead of asking for it

The Playground lets you write TypeScript or JavaScript online in a safe and sharable way.
or js eval command
but ts playground is much easier imo
ok so what does make sense in your opinion? 🙂
the await with the catch is working, thanks for that
I mean, like Fake said, doing return await new Promise doesn't do anything
It... works... I guess? But it certainly doesn't do anything
ok I will remove the await and test
#development moment
aye
Anyone know if there's a way to globally export a json file like so? ```ts
export * as Config from './config.json';
Nvm found a solution
I keep getting an error, it's just An error occurred, try again
For my getinvite command.
Just saying that this command is very not ok
Damn… can’t see it on mobile
It's a command that generates invites to servers without their consent 
Dang
Sounds legitimate
Therefore I will not be assisting in the development of it lol
Also ngl, why is <Message>.author even a thing when <Message>.user already exists
Is there a difference between the two?
wdym
Well.
I made it for the purpose of apologizing.
You are generating invites to servers that are not consenting to it. That is a privacy breach. It does not matter what your intentions are.
My bot's token got accessed, and porn was spam advertised in dms..
Is it against ToS?
If so, I'll remove it asap
I don’t even see a permission check
Must be a bot trying to get admin in its invite I bet 
1 - mistakenly scratch someone else's car
2 - break into their house while they're sleeping
3 - wake them up and apologise
4 - ???
5 - refuse to elaborate and leave
lol
lmfaoooo
that's low key the reality
I'll disable it
If you want to apologize, put a link to a pastebin or some sort of blog post site that apologizes for it in your bot's about me
That way people can see it without needing you to join their servers
Don’t get why people actually need to create those random invites
To join a random server… and then?!
If anything they're going to feel like you've violated their privacy even more
SyntaxError: Unexpected end of JSON input```
Why is this error occuring? i am literally validating my json and it looks clear and valid
okay new update, js let gangs = fs.readFileSync("./gangs.json", "utf8"); console.log(gangs)shows this in the log:
Use async for file reading
Also I hope you're not still using json like this for databases 😭
Is it possible to use a number to index an enum in typescript? Trying to use an enum type with a random variant: ts export enum CardSuit { HEART = 'HEART', DIAMOND = 'DIAMOND', SPADE = 'SPADE', CLUB = 'CLUB', }
I suppose this works, feels sad though :C ```ts
Object.values(CardSuit)[Math.floor(Math.random() * 4)]
Ok require dotenv with: require('dotenv').config()
i already have dotenv
and then call the variable with process.env.VARIABLE_NAME
You'll need to add in the variable in the secrets tab of replit by the way
const require(‘dotenv’).config() ye?
Indeed
no const
Just require('dotenv').config()
in the index right?
Yes
alr
Wherever you want to use dotenv
im sorry if im confusing
You should only need to require it once in wherever you're configuring it
After that, you can use it anywhere that you can access the process object
even in different files without calling require dotenv?
Yes
didn't know that lmao
If that file can access process, it can use the env variables attached to it
nice
dotenv is basically a small package for loading env variables into the process
- Reset your token because it was transparent
bruh
- You're writing javascript in a json file
No problem
What does your index.js look like
uh do i send screen?
At your client.login line
can i send in dm’s dude?
sure I guess
weird
thanks
just say what's written at client.login
no one wants to copy code of someone who can't pass a token in process 🤣
damn u dont gotta do him like that 😔
last year i worked really hard on it
😔
i just came back
🤣
no worries man 🙂
it’s actually a pretty good bot when it starts working 
@proven escarp
im verified too
🥺
better than @sharp geyser
hello
who’s misty
i have a quick question
Go ahead and ask
Your bot has a command (!play) that sends NSFW content in a non-nsfw channel. Please lock this command to only NSFW channels. If your command uses an API or searches the web please use features such as safe search to filter the content if you wish to have it available in non-nsfw channels.
@wheat mesa how can i remove it
?
Don't... send NSFW content to non NSFW channels?
I don't know how to fix that because you haven't provided any code or any context to what !play even does
look my music bot is connected to youtube api and spotify and lava link
when i use command play
with
nsfw world
she send a embed and this is not on require to tog.gg
so how can i remove it or what i do ?
if channel is not nsfw, send error telling people that command can only be used in nsfw channels
channels have a channel.nsfw property to check this
or dont show the embed
ok thanks you
Do modals have number inputs only? Or do I have to validate it myself still
Lol
going through old messages before i delete that channel so thought its worth sharing
Or is detritus just not up to date on this lol
sadly not yet
i would need that rn
Damn
ngl
That would be nice, guess I'll just validate it myself
so good to know that esm import cache is pretty much impossible to delete
I guess no reload command for me
I could be brave like this guy but I'm just gonna suck it up instead of potentially destroying my files
yeah good luck making a module like heatsync for esm
actually
I figured out a way to do it without going through the internal esm module cache
esm users will rejoice if what I'm thinking works
Is there something wrong with ephemeral messages?
@quartz kindle Is this a d.js-light issue?
Despite having true for ephemeral I cannot get any replies to be ephemeral
struggling on how to get the select menu data out of a modal response
agh
yeah ok I think detritus is just broken for it/outdated
or I'm just bad
webhook or websocket interactions? with defer or without defer?
No defer and websocket
damn it's a detritus skill issue 😔
I'm too lazy
sounds more chaotic to add on to detritus using raw api than just waiting
once you go raw, you never go back
Correct.
hmm i dont see anything wrong in the code
What context is this man
New line for the method?
smh
Options not sorted alphabetical
Rating 3/10

const routes: Record<string, number> = {
blogs: number,
users: number,
};
type RouteKeys = keyof typeof routes
How do I make RouteKeys of type "blogs" | "users". Right now its, string.
How do I make it better?
I do want all the values in routes to be number
The problem is you explicitly casted routes as Record<string, number> so it assumed the keys are simply string
You should create an interface and use that as the type
@pale vessel I understand that, but now, how can I make sure routes values be always of type number
💀

how can I enable creating slash commands for my bot?
When I invite him I can't see his commands
- Did you make sure you invited the bot with
application.commandsscope - Are you creating the commands for a specific guild?
Idk but these code makes my soul happy:
switch(this.name) {
case this.name: divorce.div(message, prefix); break;
default: message.channel.send("Something went wrong.")
}
more clean area
Why don’t use an if else statement when you can use an one-case switch
The longer the code gets the better? 
single statements: switch
multiple statements if else if else if else 

is-even ptsd
wait what? This will always run the first case or am I missing something
I wonder how many statements you need to check until infinity…
Maybe 100, 1000 or more?

As known as:
if (this.name) divorce.div(message, prefix);
else return message.channel.send("Something went wrong.");
or even better, just invert the if check and place the message send under it
you avoid indentation and make it more readable

No these two are not the same?
even if this.name is falsey the first case will still be executed
The first case will always be executed
Am I the only one who sees something off about this
it works but the first case will always be ran
so the entire switch statement becomes pointless
idk if they were joking or not lol
Isn't switch meant to be static
not in js
That's interesting
then there's the funny case of ```js
switch (true) {
case a == b == c:
// stuff
break
case a == b:
case a == c:
case b == c:
// stuff
break
default
// stuff
break
}
you're scaring me
that's to check what type of triangle it is, but the fact u can use a switch as a multi-branch if statement in js is hilarious
Given == is just repeated left to right checking, is that still valid for when a = false, b = true, c = false.
wait no these are numbers aren't they
ye
triangles have three types: equi, iso and scalene
one where all sides are equal, one where two sides are equal and one where all sides are different
hey can a setTimeout hold 7 days or would it be too much?
It can, but depends on what you mean by "hold".
well the limit is 2147483647, which is about 24 days
So it can work, but if your program shuts down before those 7 days are reached, your timeout handler will never execute.
Yup i understand. Thanks clay!
So you'd probably want to persist the timeout if needed
noted 🙂
sadly that 3 way equality in js becomes true == c
if (oldMember.premiumSince !== newMember.premiumSince) {```
this is how i can check if someone boosts right? How would i check if a user removes his boost tho?
ah true
I forgor 💀
retrieve boosters once in a while
just check if booster role is added or removed

i am currently using the guildmemberupdate event so that wouldn't work
well wait, the premiumSinceTimestamp would be 0 again after stopping the boost right?
I have forgotten the website that keep’s my bot running how do i find it again?
I'm not sure about that anymore
since discord has the "returned booster" thing now
someone help me
lemme read discordjs docs
not "the" website, but "a service"
alr but still help
and please, wait at least 5 minutes before bumping a question
how do you forget the very thing that keeps your bot running?
I cant help if u don't give at least minimum information
look at your search history bru
@earnest mural I took a break from coding and it has been 1 year+ so ive almost forgotten everything

it would be null
mine has been alive for 3 years without touching lol
no it isn't

then how about you find it
check your browser history
discord has frequent crashes, your bot would've hit cloudflare identify limits if it didn't crash
and if it crashed, it wouldn't go back online
Oh yeah my CPU for some reason skyrockets
then it's not too good is it
commonly used free services: replit, heroku, glitch and oracle cloud
thats bad
is it any of those?
i use repl
then u didn't forget did you?
because repl is utter shit
you wrote garbage code
that can't clean itself
cpu skyrockets because of large computation cycle
lemme grab that cow gif again
can be caused by piled-up resources
without closing
either way
inefficient
therefore conclusion
stage 1: denial
Yeah, but it goes back again and then goes high and then goes low again
it reboots
Oh
either that or you can thank the gc
Ive never had that problem before
It’s chill
it’s always chill but sometimes it just randomly goes up
repl is a terrible, terrible service if u plan to use it seriously
but you found out tthe site that hosts your bot
mostly because u can get CF banned for doing nothing at all
problem solved
if there is an obvious pattern where your resource usage skyrockets and then lowers (assuming the process stays alive), you probably have unoptimized code and the garbage collector is working to clean it up
^
almost?
man
oh
stop blaming

because i don’t wanna show my id or pass
that has nothing to do with repl at all
nope
How didn’t i
75 is child play for any service with more than a rock as a processor
it's barely enough to make cloudflare notice u exist
also, repl for bot hosting is almost entirely based on how lucky you are with ip-sharers
if someone makes too many requests in a short time, welp, too bad you're locked out of discord for an entire day
too many request for what
to discord api, be it any endpoint
wdym by that
i can’t use anything else on mobile tho
all free replit ips are shared among many users
but i can’t use much since i only have a mobile
time to go to an internet cafe
cloudflare doesn't care who's behind the IP, if it makes more than 10k requests per minute that's it, IP banned
and their STARTING ban in 1 day
best option: vps
you can still code in replit, simply upload to a vps after ur done
@lyric mountain i wonder if this 11month old code still works
afaik replit can upload to git
what’s git?
version control
the holy grail of programming
where i can save my codes?
well...kinda
imagine if u made a copy of your project and saved it into a compressed file
I have all that saved
proj_v1.zip
proj_v2.zip
proj_v3.zip
proj_v4.zip
proj_v5.zip
proj_v6.zip
proj_v7.zip
in a discord server LOL
bruh
Yeah i got every single line
you can literally return some line to what it was 2 years ago
without having to download the entire project
but i dont have much i only have an ipad
there's no "that much"
nope, u got the whole thing
it will track the entire project for you
you can see what's changed throughout versions
git allows managing every single character, everything is manageable and easily undone
or re-done, imagine it as time-travelling
but not Initial Commit with create-next-app

you can return to what it was 2 years ago, mix with what was 5 days ago and return to your current proj
all of that and the safety of being unable to fuck everything up
you can also separate your project into different branches
yes
oh wait
i commited everything to main
lmao
but well, I recommend learning about git, it can literally save u one day
also it's free
Alr do i just search git or add a package?
OH github yes
nah i don’t need it
you do, trust me
ima leave the server bye
ill come back when i need help or smthing
i am witnessing five stages of grief
anywho
@civic scroll bruh i have beard
kuu
saving project as files is terrible
@lyric mountain alr ill try github
does git have project size limit
thanks for the help
but it does have file limit
bye
wanna know how heavy is prts
I think 100 MB is the maximum file size
lmao
mostly game assets and npm
still less than node_modules
I have a proj that can easily reach a couple of GBs, and it's still there on github
I use gh for image hosting
(since imgur has deletion issues (or had))
i sê
although u can technically just create another repo
we do insignificant amounts of tomfoolery
so nobody executed any command when this happened (error handler and command handler are in different files so error couldn't happen instead of cmd exec log)
any ideas?
How would I build my own UI Kit library?
Like code all the components and then put'em in an NPM packages like aqua-components or something? Won't this get too big in file size after a few hundred components?
well, UI libs are big for a reason
you're trying to send an embed with empty value
ghostPingLog.setTitle("Moderation Logs (Action: Ghost Ping)");
ghostPingLog.setColor(commandColor);
ghostPingLog.addField("Message Content", message.content.slice(0, 512));
ghostPingLog.addField("Message Author", message.author.tag);
ghostPingLog.addField("Members", members.size.toString(), true);
ghostPingLog.addField("Roles", roles.size.toString(), true);
ghostPingLog.addField("Everyone", toProperCase(everyone.toString()), true);
``` everything seems filled up
perhaps I don't have enough permissions to grab some value?
how else would you send the message 👀
OHHH
IF IT'S AN EMBED
yeaaaaa
also embeds, but users can't
ye ye
well, isn't it like a giphy link or something? lol
ghostPingLog.addField("Message Content", message.content.slice(0, 512) || "No Message");
``` is this gonna do the trick?
nope
it's an attachment
it's a sticker
aight
or should I do something more advanced?
that should do it
okay cool
Is there a way to get infos to my npm package, like how many different people downloaded it?
u can scrap npm site
but not how many different people downloaded it
Can you define "different"?
If you mean unique, I don't believe so.
Even the download count npm displays isn't a good way of determining popularity due to dependency reliance and bots automatically downloading packages.
yup
well, you could go the sketchy and shady way and make the lib send the user's IP to your counting API
but for obvious reasons, that's technically illegal and sends a "fuck" to the user's anonymity
how to end your open source career in 5 minutes (guaranteed)
exactly lmao
yeah that‘s definitely not what I want lol
hello everybody
i have a question
how do i make my command doesn't work in a nsfw channel if is an nsfw channel
the opposite u mean right?
there's a channel property <channel>.nsfw u can use to check if a channel is nsfw or not
can anyone help me solidify a game idea?
I know what I wanna make, but I'm just trying to make it all go well together
what kind of help?
so I'm making a game but I can't seem to come up with a coherent story
would you be able to help?
nope, I'm terrible at storytelling
dang
is it sci-fi?
if so u can try playng rimworld to get some ideas
it has a pretty...unique story generator (basically AI that generates events based on context)
it's a spongebob squarepants themed horror game. And before you say anything, I've already seen some explamples on how scary that can be so I really wanna give it a try myself too
I have a basic idea for my story but I need to patch it up. (eg. what happens when the user first presses play, cutscene/straight into the game?)
I'm stuck on these things since I didn't usually have to come up with the story by myself I mostly just done the coding and asset making : P
it's a spongebob squarepants themed horror game
please don't give young people another creepypasta game
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
every year there's at least 2 or 3 that become the year's creepypasta topic (baldi, granny, hello neighbor, slender, fnaf, etc)
fiath punto
fiath uno 2020 1.0 48L
One message removed from a suspended account.
One message removed from a suspended account.
lalafell
One message removed from a suspended account.
One message removed from a suspended account.
yes
yes what?
yes
One message removed from a suspended account.
lol i just started a game yesterday
One message removed from a suspended account.
every character goes mad insane and scary looking
spongebob will jumpscare you when u try leaving
you will wake up in the basement and you will have to escape```
but it's not good enough, I need to make it somewhat coherent
One message removed from a suspended account.
One message removed from a suspended account.
like I need to set the gameplay plan
what will happen at the begining what happens after you steal the formula
etc.
don't say it
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
yes basically that was my idea
One message removed from a suspended account.
I though u would compare to the other games
one you steal the formula you will be tasked with leaving the krusty krab and before you do spongebob would jumpscare you and you would wake up in the basement and you would have to escape it
One message removed from a suspended account.
yes
^
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
I just need a way to tell the player what's going on, story is the best way of going about it I think..
I think that's very similar to granny/baldi
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
or dont, people will make a lore for it anyway
One message removed from a suspended account.
... assuming my game will get at least slightly popular 
One message removed from a suspended account.
oh it will, creepypasta always find a way to the surface
that's why I need to make it good
One message removed from a suspended account.
I like to think that games do really well when they're released as a finished product
yeah my backrooms game kinda failed
don't have the will to finish it
Like stardew valley for example, the dev never put it into open beta and it took him 4 years to release it
But when it was released, it was a polished and finished game, and was a massive hit
One message removed from a suspended account.
One message removed from a suspended account.
ouch I just bit my lip
One message removed from a suspended account.
okay okay
One message removed from a suspended account.
One message removed from a suspended account.
it's 2022, all games must have at least pre-release, open beta, battle pass, 40 DLCs and microtransactions
One message removed from a suspended account.
so what do you think should happen when the player first presses play? cutscene, text, anything at all?
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
okay that could give you some idea on the story, I was thinking of an animation
One message removed from a suspended account.
it would start at the top of the chum bucket and slowly pan towards the enterance where it would show planknton leaving before you would go to first person view
I would need some sort of system though
maybe a checkpoint system
to just tell you what you need to do
cause you won't know where to go initially
such types of game don't have checkpoints
unless I tell you Objective: break into krusty krab
the whole horror is in having your run cut short due to mistakes
also remember overusage of jumpscares makes the game less scary
my game won't have any jumpscares for the first ~10m of the gameplay, mainly noises and stuff falling yk the general stuff
the first jumpscare will be from spongebob when u try leaving the krusty krab after stealing the formula
This whole thing reminds me of Mr. Krabs on Ketamine game
yeah that was my inspiration kinda lmao
One message removed from a suspended account.
One message removed from a suspended account.
You're my ketamine
One message removed from a suspended account.
One message removed from a suspended account.
oou
okay I'm gonna go try to create everything that's been said here into 1 huge idea
brb
cartoonish
never try to make a cartoon realistic, 99% the times it end in disaster
just remember sanic
but when you make it cartoony you go bankrupt
yeah.... 
maybe realistic cartoonish?
I'm gonna have to somehow use it either way since I already made it a HDRP project
no no no no
so are you telling me to go back to SP?
by realistic cartoonish I mean models are cartoonish but the overall feel would be realistic
then u get the legendary vrchat plankton
idk in what route I should go
lol
u could try cel shading
damn apparently something I made got a decent amount of downloads
literally just like 200 lines of js for a minecraft chattriggers module lmao
make a mod that "increased diamond find chance", but make it do nothing at all
Placebo effect will make people feel like it indeed increased
Suffer.
https://nodejs.org/api/esm.html#importmetaresolvespecifier-parent exists, but it's experimental and only available under a flag
need me some regex help
im trying to turn /hello/{world/abc/def}/hi => ['hello, '{world/abc/def}', 'hi']
so obviously .split(/) wont work
\/?
the issue is its splitting up the {world/abc/def} because it has /'s
Are you trying to match one of the three or the actual text {world/abc/def}
not doing experimental features since it's a public package
i want to use .split to generate the array i showed above
Oh now I see
I think what you'd want is negative lookahead
i tried the negative lookahead for the {.+} but that wont work because it'll just ignore the one before it as far asi can tell
im open for suggestions, im usually really good with regex but im stumped
.+ matches any char and shouldn't be used
i said it as an example
You can use a [^…] array to define characters that shouldn't be matched. For example, {
in conjunction with negative lookahead that is
nevermind figured it out
you dont have to lecture people on how to use shit they're obviously already using btw it just makes you look rude
My sincere apologies. I am trying to help and provide suggestions - that is my pov. I don't know your skill level, so now I know and will keep that in mind. Not exactly with a lot of free time myself as I am omw to work so
I have my own worries like how tf am I gonna hot reload esm modules
@earnest phoenix do you know when the module resolver will reach release
because I might just write my own with fs promises
I'm unsure, probably pretty soon but ¯\_(ツ)_/¯
oh ok. Not a problem. Thanks for the suggestion anyways
ok, math time:
how can I multiply where the higher the multiplier goes, the lower its influence gets?
like
1 = 100%
2 = 50%
3 = 25%
4 = 12.5%
...
Exponential decay?
idk, graph to help understand
nth term = starting * (multiplier) ^n-1
black is the desired curve
well, yeah
now just need to figure out how to flip it
ah nvm
my math knowledge finally coming in handy
yep, ty
C: np
evalling doing js (async () => { const m = await message.guild.members.fetch(); const minutes = 4320 // 3 days const now = Date.now() const channel = await client.channels.cache.get("898980424544550912"); const p = m.filter(x => (now - x.user.createdTimestamp) < 1000 * minutes * minutes ).map(async (x) => { await message.guild.bans.create(x.user, { reason: `[AUTOMOD] Anti-raid mode` }) await channel.send(`Banned **${x.user.username}#${x.discriminator}** - Account created <t:${Math.round(x.user.createdAt/1000)}:R>`) }) Promise.all(p) })() started banning people over 3 days old
some 7 month old account 
how can I make that only ban people whos accounts are under 3 days old
its because we got raided and every account is 2 days and under
you are doing minutes * minutes. is that a mistake?
i think so
the function passed to map shouldn't be async. create an array of pending promises and then Promise.all that
#RatelimitCity
its better to get ratelimited at this point in this case
theres over 1k raid accounts to ban
because the owner doesn't like us using raid prevention "incase it false bans"
I suppose it's not a big deal since djs handles ratelimits for you
3 * 24 * 60 * 60 * 1e3 would be 3 days in ms btw
await Promise.all(
m.filter(x => (now - x.user.createdTimestamp) < 1000 * minutes).reduce((acc, member) => [
...acc,
message.guild.bans.create(member.user, {reason: `[AUTOMOD] Anti-raid mode`}),
channel.send(`Banned **${x.user.username}#${x.discriminator}** - Account created <t:${Math.round(x.user.createdAt / 1000)}:R>`)
], [])
)```
like this'
ah
this keeps crashing my bot - how do i prevent these type of errors?
Current code:
var logo1 = await fetch(`https://thumbnails.roblox.com/v1/groups/icons?groupIds=${GROUP_ID}&size=150x150&format=Png&isCircular=false`)
if(logo1.status == 200) {
var logoa = await logo1.json()
var logo = logoa?.data[0]?.imageUrl
}
if(!logo) return;
var response = await fetch(`https://groups.roblox.com/v1/groups/${GROUP_ID}/`)
if(response.status == 200) {
var responsea = await response.json()
var response_count = parseInt(responsea.memberCount)
}
if(!response_count) return;```
By catching your promises
try/catch around your fetch
so just
console.log(err)
});```
guess that sucks for any legit users 
lmao
well it also checks for no pfp
which all raidrs had no pfp and were created within the last 3 days
or, to avoid cascading promise doom, use```ts
try {
await somePromise() // AWAIT IS IMPORTANT HERE
} catch(e) {
console.log(e);
}
But beware that your program will crash if you do not await a promise within the block
(And it rejects)
noice
ts is milliseconds
might not be cached if you don't have the GUILD_MEMBERS intent
but nvm cus it would've thrown if it wasn't cached
1e3 is valid?
Like, 1 elevated to 3 is 1
weird
Indeed
2.5e+5 instead of 25e+4 triggers me
But I get why it is like that
But still
1-10 only allowed for it
is there a way to check what a user does on the database (e.g: delete a document, update a document) for mongodb? i cant seem to find any sort of logs
wot
banning a raid
how does it work
it was me purge banning with an eval
that is a lot of people tho
I can't vote do you know why?
no, when I want to log in to vote it tells me that the account is incorrect, I tried many times and it does not let me
won't let me vote
👍
Are select menus fully supported in modals yet?
anyone knows how i could do this?
in my react ts website i want to have a "highlight" pre-defined component that basically just changes the color of the text to pastel-green (custom tailwind color)
i want it to look like that:
````<Highlight>Here should be the highlighted text<Hightlight />and not that:<Highlight content={"Here should be the highlighted text"} />```
how could i do that with react and typescript?
accept a prop that's named children
then use it in your highlit component as a regular child
highlight*
like this?
ignore the squiggly line
nevermind it worked! thanks a lot <3
Wut?
Modals already have select menus?
I got them in my modal, I just haven't been able to get the value from it
Thought there’s only the text field and textarea
Not sure if it's a lib support issue or if they're not supported yet
I usually use the properties raw methods to get the options
They don't look very good yet, but that's why I'm thinking maybe they're not fully supported yet
The modal submit object has an options property or was it called fields?!
It's called fields
But not for detritus
I've used the debugger for it, I can't really seem to find anything that has the value for the select menu
Can’t u get the raw api object in detritus?
No idea
I'll check the source
Hehe people bitching about djs
It does seem to have the Interaction object, let me debug more
I mean djs transforms the raw api response into its own structure where for example the options are stored in an option resolver class



