#development
1 messages · Page 99 of 1
You're just doing requests and checking the username
He wants to use display names to search people on steam, which is a grand idea if not for the fact they can change and are very hard to accurately keep up to date without wasting api calls
no I’m not
Yes you are that's what you described above
when they search their profile I’m going to check, I’m not doing requests just to check the display name
Steam's API doesn't let you do anything with display names either way
They only let you do shit with IDs
I know
So storing display names is completely pointless
Yes.
Storing dynamic data is a shit show for a third party
maybe it’s useless to you but 🤷
Argue how you want, facts are facts.
it’s not a fact
It is.
how is it a fact
the data isn’t useless, it’s being used
your fucking lord

our fucking lord
Whole new level 

ourcord
I'd store their entire display name history as well
Just in case they need it again
As well as the date they changed it, the number of characters changed etc.
Fetch all display names every minute and update your data
Top level caching
that was the plan 
well, you can send one request every second without running into the request limit
so I guess, np at all

well i can send 100k requests in a second

well you can, but have to wait 23:59:59 until you can send the next one after
yup ☹️
which is why i'm going to use multiple ips
😸
why do you need to do that many requests?
because
i need the player count of every game
which is
like 80k
how else do other services do that besides multiple ips?
historical player count of games
API key?
Well, if you use several keys, you don't need to use several IP addresses no?
well some endpoints dont require one
but how would you get multiple
besides creating a bunch of steam accounts
That's probably the only option. Still better than multiple ip addresses in my opinion
what about endpoints which don't require an api key tho
how would that work if the limit is per key
I don't know that, you'd have to check it out. Different services may handle it differently
well they don't specify that lol
"You are limited to one hundred thousand (100,000) calls to the Steam Web API per day."
Right, it depends what they mean by "you" because it could be per key or it could be per ip address
Good luck
hopefully they don't ban my ip 🙌
2 days later
How do i get my ip unbanned
restart my router
Just ask their support literally, they can help with that if your goal is around doing that
As long as its okay with their tos tho
well
wheres support
steam support?
i don't see any section in support for the api
Support of the game
Oh if its steam itself then yes you will get ip banned
why
how else am I suppose to get the player count of 80k apps without 80k requests 🤨
and then times that by once an hour
you simply dont
Why on gods earth would you want to
- You'd get api banned
- If you do it and somehow dont get api banned, it'd be abnormally slow
Nope you won't get api banned
Any large player stats service is using the same technique
so i can track the player counts
Not much to worry about
Im sure steam would definitely ban someone making 80 thousand concurrent requests
then how do other services do it
For one that one 80k call to the api will use up nearly all of your api call limit
Steam limits third party apps to 100k calls per day
Now im sure steam is more than willing to negotiate this for bigger apps
You should be more worried about how to grow your application
it won't grow
With as it stands now I doubt you'll even reach the 100k calls unless you're being dumb
💀
i'm removing every game with 0 players from my db
once it finishes i'll have done 80k requests
so i'll try doing 20k more to see if it blocks me
Crowdcasting app
Hard to say without seeing the code
Just iterating 80k items is fast. If it's taking long it might be that you are making web requests or having a loop inside the loop
That'd probably be it then
const applications = db.prepare('SELECT * FROM applications').all();
for (const application of applications) {
const applicationPlaying = await fetch(`https://api.steampowered.com/ISteamUserStats/GetNumberOfCurrentPlayers/v1?appid=${application.id}`)
.then(response => response.json())
.catch(error => console.log(error));
if (applicationPlaying.response.player_count === 0 || applicationPlaying.response.player_count === undefined) {
console.log(`(${applicationPlaying.response.player_count}) Deleting application...`);
db.prepare('DELETE FROM applications WHERE id = ?;').run(application.id);
} else console.log(`(${applicationPlaying.response.player_count}) Keeping application...`);
};```
it's been almost two hours it's still going
but it's removed 40k applications with 0 playing
so it's working at least 🤷
I'm amazed you've not been ratelimited by steam 
well
there's no rate limit
but there's a daily limit of 100k
so i will have used up most of it when it's done lol
Well anyhow the reason it's slow is that you are awaiting every request. That means that instead of having many requests going on at once it does it one at a time
You don't as long as you handle the promise
I'm heading to bed but I'm sure you can figure it out
how so
Yes, bulk
don't think so
why?
Or just check for entries with count > 0
Because deleting is more expensive than updating
And inserting again will make it recalculate indexes
So you're doing double the work for the same result
but then i'll have a bunch of unnecessary data
Doesn't matter as much as you think
As long as you have a proper structure
Plus you're very likely to eventually re-add those applications back in the future
So it's not like you'll never use them
what are you trying to get to loop again
If it wasn't js, maybe
Tho technically still not "all at once"
"at once" doesn't exist in programming, you're always following a sequence of operations regardless of what u do
The thing is that, if it feels like you're doing it the wrong way, you're very likely doing it the wrong way
Many services or sites track steam activity, I doubt any of them use 80k of the daily limit for updating status
how are they doing it then
I don't know, do your research
Check again
technically.... 🤓
literally all the websites mention is that they use the steam api
That's obvious
let array = [
{
name: "1",
hp: 1
},
{
name: "2",
hp: 55
},
{
name: "3",
hp: 100
}
]
i want to get a leader board like the person with most hp left comes at top
But that doesn't mean you need to make 80k requests
Sort
how?
array.sort((a, b) => some sort of criteria to sort by here)
oh ty
then how are they doing it
Btw, remember sort expects a number, not an integer
there's no way to make a bulk request
So a - b, not a > b
I'll say it again
i don't know, do your research
If there really isn't a way, perhaps you shouldn't be doing it then
Your risk
how a risk?
For example, they banning your ip
other websites are doing it so it's fine 👍
Doubt they're doing it that way
they are
How are you so sure?
because there's no other way
i've been googling for awhile
and haven't found anything
integer?
Late where you are?
Yeah kinda
What if there is an other way
Api spam is not a sustainable method
Never is
there is not
I feel that. I just got finished setting up my sbc and it sucked because I had to flash an os to an sd card first and then flash the os to the nvme m.2 ssd I bought for it through ssh and sftp and then flash the on board flash memory to tell it to boot to the nvme.

The what
what does "poll" mean
depends on the context
"Thanks! I poll GetNumberOfCurrentPlayers from the Steam Web API."
basically just means fetch
take this situation
"are we there yet?"
> no
"are we there yet"
> yes, now we are
sbc is a single board computer
I got a raspberry pi-like sbc
except better
4 core arm big little chip at 2.4GHz and 16GB of ram
Got a 128GB nvme m.2
But its boot priority by default is only set to sd card slot
Ah, so u used an sd as a bridge to the nvme
Didn't know raspies had nvme slot
I got the orangepi 5
so not an rpi, but it's better
This thing can fit in my hand easily and its performance smacks
Nice
but I should probably get some heat sinks for it since the cpu die is exposed to the open air
Is the cpu lidless?
mmm idk if it's lidless. It's flat and not like _/—-\_
I hate how / and \ are formatted wtf
nvm it was underscores
It's probably lidless then, like, is just the bare thing
Yeah getting a sink is a good idea
probably for low profile
although nothing is really low profile about full sized hdmi, headphone jack, 3 port usb panel and 1 gig ethernet
I kinda want to make my own printed case for it
I have little blowey-matrons anyways so I can turn it into an airplane for max airflow
Easier to just make a mold and press-shape an aluminum sheet
mm something like that
Nah it would be rised with stand offs
I see other people with printed cases
the cpu and memory package doesnt get that hot
I know I shouldn't, but I touched it with my bare hands
Ehh, finger oils
I wanted to somehow shove my pcie 16 lane graphics card onto it, but I can probably somehow bridge it with usb c
maybe
a x2 to x16 lane seems jank and I want the nvme ssd still
That way I can host stuff like waifu2x
A connoisseur, I see
ok i now only need to make 11k requests 👍
I use w2x daily for my image processing
Wanted to somehow make a cdn that scales images with waifu2x optionally or just allow my donors to abuse some of my hardware
Thankfully I have unlimited data
can I in Go?
You can nothing in go, not with your current knowledge
But yes, go supports threads
It'd still not be "all at once"
Since you'd need to spawn threads in sequence
i know Go wym
the thing is even if i make individual requests it takes so long
too long
like 30 minutes to complete
I still don't see how steam would even allow that many requests that quickly
I'm sure there's a ratelimit at some point other than the request cap
100k per day
well
Ah, u mean aside from the cap
Because ur using js
if theres a minute rate limit it must be very high
whats wrong with js
Js is monothread
A request won't fire until the previous request completes
Since ur awaiting it
well
You can spawn child processes
But that's about it in terms of multithreading
and/or worker threads, never used them before though so can't help you on that end
You'll end up getting your ip banned
well yeah, you're doing like 100 thousand requests
And having to justify to your ISP why you got banned to begin with
why do you even need to do that many requests in the first place? are you looping over the entire steam gallery of games or some shit?
again, why
so i can limit the requests i will eventually have to make
just...make...them...later?
What if I want to know the player count of a game that was deleted from the db?
What if it happened to have 0 players the exact moment u fetched it?
Btw, your player tracker will be as useless as a broken clock
why
Except a broken clock is right twice a day
Because it'll be updated once a day
Promise.all
Okay so if I'm understanding this correctly, a user will ask your bot how many players are on a game. Then, you fetch said player count, and give it back to them. Am I right?
accepts an array of promises and fires them all "at once"
You can't fetch it frequently enough to keep live data
what I want to make
const results = await Promise.all([…promises])
it's possible
Not the way ur doing
not with 100k requests a day it's not lmao
U said u have 11k entries
yeah i know
So that's about at most 9 refreshes per day
i'm still searching
I'm so confused, why would you literally not just fetch it and cache the data when the user ASKS for it
is there a websocket api
for what
for events you want
i don't want events
Battle doesn't know what a cache is
What is the point of fetching all of this data now and deleting it from your database if the data eventually changes anyways
i'm trying to make it so
That's true, you don't need all the data at once
Just show what the user asks for
it fetches the player count of a game at an interval, that way someone could look back to a specific time / date and see what the player count was
That's actually very possibly what the sites do to show live count
Not what u said, but what waffle suggested
that sounds not achievable on a small scale
why not
unless there's a bulk endpoint, which I don't see the point of that existing for this specific use case
because... there's a lot of games
if you can't even fetch the data for it within 4 hours then how on earth are you going to keep up with doing that multiple times a day
That you kept in database
true
alternatively, scrape html :)
making thousands of requests all at once is not going to be reasonable in any language much less js
there's only so much processing you can do when your limit is basically how long an API takes to respond to you
They show only what's requested
At the end of the day, people are going to use the official/popular site anyway
?
like @lyric mountain said, research more about your specific issue, I highly doubt these websites are going through tens of thousands of games to get live player count and storing it all the time
they are tho
except they probably aren't because that's an unreasonable solution
if you go onto any game there's a player count at a 1 hour / 2 hour interval
^
what is that suppose to mean?
and if they are then they likely have the infrastructure to support it seeing as they're big websites
It means they only refresh what's currently being viewed
Like, the chances of someone searching for Dota 2 player count is much more higher than someone searching for I Am Bread
There's no need to track IAB unless someone searches for it
How do you know they're tracking it all the time unless they have graphs?
they do
Ok
They probably made it seamless enough
Do the graphs go by a specific interval?
But they 101% sure aren't tracking all at once
Mind to show that site?
sometimes every other hour
what about for a game no one plays
Because a graph with 80k applications would be far from readable
This is what u mean?
yes that's the website
Read what u said, carefully
read what
^
Now read this
what do you mean by that though?
does desert bus vr have a frequently updated graph
A game not listed in those charts isn't tracked unless someone searches for it
Meaning they aren't tracking all games
yes but that website is very popular, i can guarantee it's tracking thousands and thoussands
It isn't
it is
Isn't
it is tho
When will you stop being a moron?
i am not a moron
You literally just admitted you need to search for a game to see the data
yeah
Meaning they aren't actively tracking every game
but how do they have the data?
They don't
They get it when someone searches
It's literally loaded when u open that specific page
how are they getting data from years ago?
Steam has an endpoint for that
no it doesn't
They keep track of a game's popularity over time
So they probably have that available
If they don't, then scrapping is the answer
scrapping what?
Too complicated for you
no it's not
Yes it is
no
Feel free to look up what web scraping is but I highly doubt you’re going to want to go that route for very long
i know what web scraping is
someone said I was dumb for scraping spotify track info, but the alternative is an oauth2 based api and that shit's beans (a bad thing)
does anyone know a good module for graphs
graphana

i've seen chart.js but the graphs look like something outta excel. i want them to actually look good ☹️
So you want a simple one but not a simple one
well
Also every chart will be ugly if you make them ugly
Any lib will allow you to make beautiful charts
Because you wrote ugly shit
You can't expect to simply add something and be done with it
If you want beautiful stuff you need to put effort into making it beautiful
I tried
You didn't
I couldn’t find anything to make them look good
^
yeah cus I couldn’t find anything
Because you searched for done solutions
People won't give you the best design code for nothing
like I wanted to width of the line to be thicker and for a dot to be on every data point but I couldn’t find anything ☹️
It can be done
with chart js?
Yes?
have u done it?
It can be done with any chart lib
Yes
Chartjs is entirely customizable
You won't find ready solutions online because some people are literally paid to design beautiful graphs
Read the docs and think for yourself
You learn how to make one…
You spent like 10 mins on it I guarantee
See, that's why everything u touch ends up ugly
more like 15-20
You want effortless programming, you want to make an awesome site with minimal logical thinking
cus I couldn’t figure out how to make it look good
I think and google a lot but it does nothing
Then pay someone
Ok then learn
Staring at the screen won't solve anything
Nor reading it
Then try
You need to think
20 mins is nothing
“Bruh”
how do you want me to do it then 😦
Why ur quotes fancier
iPhone defaults to different quotes
You dont learn by reading
That's for linguistics
In programming you need to think what you need to do to achieve a certain goal
You're expecting to read the docs and find the answer for life
You won't find it
I’m not sending 20 days learning how to make a graph
that’s too long
Then live with your ugly graphs
Then you won't learn it
You can’t expect a solution to be hand delivered to you for everything
That’s not what programming is
Don't want to put effort? Fine, but you'll need to live with your ugly/standard graphs
There’s a reason people get paid to do this
no, they’re ugly
Then suck it up and either spend the time to learn or don’t use them
^^
how much will it cost
Idk, but probably more than you’re willing to spend
graphic designer? how are they suppose to program me a graph
Falls within a similar category
Graphical designer includes anything graphics-related
Also called "frontend designers"
Figma users 🧌
how long does it take to make one graph
Depends on your demands
Go ask someone who does that stuff for freelance and get them to quote you
I imagine it’s more than you’re willing to spend on a hobby project though
this is not a hobby project
Is it for a bot?
Weren't u doing it for fun?
I’m asking for a different thing, I gave up on the steam one
You either do something as a hobby, as a job or as a study
this is my job
You're paid for it?
no
Then it’s not a job
Then it ain't a job
it is i will get paid soon when it starts making money 🔥
Heard that a lot
Yeah doubt it’s gonna make money like you expect it will
Usually from "big game idea" people
Is this by chance for a discord bot or is it a website or what is it for
telegram bot
Yeah you’re not going to make any money
(At least anytime soon)
Never go into developing bots on any service with the expectation of making money
well I classify it as my job 👍
Only the top 0.1% of bots make any money at all usually
I will be in that top 0.1%
So the idea that you’ll be able to hire a graphic designer for this and recoup your expenses is very unrealistic
But it’s your money
Feel free to spend it
I'd kick at least 4 days
it is very realistic this bot has a very high demand in the telegram community
But I'm no graph designer, so idk
Doesn’t mean you’ll make money
4 days feel like a reasonable estimate for just chart designing
how do you kick days
How are you to say what’s normal and what’s not for that
4 days is actually an optimal best case estimation
Considering you can’t even spend 20 minutes on it before giving up
because a chart is a basic thing it’s not hard to make
Then make it yourself if it’s so easy
A realistic estimation would be 1 week minimum
See how hypocritical this is
So then you have no baseline of how long it takes to make a “pretty” one
well
Which returns us to the initial point
It doesn’t take 4 days to thicken lines and put a dot at data points
Those people that charge $25 per hour did study and spend months learning how to design beautiful graphs
This is very hypocritical of you, you say that making a graph yourself is too hard and that you don’t want to learn it, and then you expect someone else to do it easily and quickly for you?
Saying "it's abnormal because it's easy" is plain insulting their work
Yeah ^^^
You don't pay for what they write, you pay for what they know
It’s annoying when people do that to programming as well. Some people think that we just drag and drop blocks all day and that the time needed to complete a project is based on how fast you can type
I do pay for what they write, if they don’t write anything there’s nothing to pay for
Oversimplifying a profession is insulting to the people that do it
That’s not how it works
Which is why programmers are so expensive, even tho we do mostly googling and typing
I’m not naive
Some people think that we just drag and drop blocks all day
that's all we do though
I suppose naive was the wrong word, I think “overconfident” fits better
Dunning kruger apprentice
anyways I think I’m going to just not make a graph, sounds like too much effort for a little effect. I can just display the data with text
I think neither
You think that your local McDonald’s employee getting paid $12/hour is serving customers throughout every single hour they’re paid? No, but that doesn’t mean they don’t deserve the money for that hour
Same thing applies to a freelancer
lmao no you're not
programmers are some of the most exchangeable people for a job there is
Don’t really get that analogy but ok
The analogy is that your freelancer spends time on your request not just writing code
Yeah, but we're still paid big to so something people don't want to do
Which is spending weeks learning how to write something more efficiently and staying up to date
yeah but at the end of the day I’m still paying for the code
if there’s no code there’s nothing to pay for
There is, the knowledge
You’re paying for the code and the knowledge and the time spend designing your request
That’s the whole point
Here’s a more reasonable analogy
When you bring your car to the mechanic and they repair something on it, they charge you for the parts AND the labor
but I’m not paying for your knowledge
Not just the raw materials it took to repair your car
are you giving me your knowledge? no your giving me code
And yet you do not have the knowledge needed to design it
You’re paying for their experience
_ _
They know how to do it, that's why u pay
and they do which is great
Code can be found on docs or google, but they know how to put it all together
That’s. The. Fucking. Point.
I wouldn’t pay for experience, I would pay for the finisher product.
I don’t care how experienced you are.
It's impressive how hard it is to understand the basic concept of paid labor
Sometimes i think that he must be a spoiled little rich kid because there is no other way he doesn’t understand this
A lazy rich you mean
yeah I would be lazy
Because no way ur becoming rich with 20 mins of reading a doc
If im rich im definitely not working
Not even "20 mins per day"
But not getting the whole code would imply the need to use the brain and implement in code their design. Sucks man I want to CtrlC CtrlV and not read the docs for 30 minutes
Just "20 mins"
You’re paying for it because it’s a specialty. It’s a skill. It took them time to learn how to do it, and they possess knowledge you do not. So, in return for their work, you give them money
And their work requires their knowledge
So you pay a premium for it being a special skill that only some people possess
It’s not like you’re giving them a Lego instruction manual on how to build what you want
Otherwise you’d be able to do it yourself
Then do it
no
See?
too much effort involved
Then do it yourself and stop complaining about how labor works
then you pay someone to put in the effort you don’t want to put in
Fr same
why
wonder how I’m not fired yet ☹️
And you work with...?
Yes, that's the question
If you somehow have a job I’d be surprised considering your work ethic seems to be of questionable standards
I work with cars
And how tf does that relate to programming
What country? Just to be sure I don't put my car there
I didnt say it relates to programming you asked ⁉️
Don't want my car to be half repaired or whatsoever
Hm, fair, we didn't specify "programming job interview"
I don’t repair cars luckily
You break them?
“Hey so we took your wheel off but I don’t want to put a new wheel back on. Sorry man”
After taking 10 minutes in attempting to repair the car, time to give up. Unclear instructions
☠️
Too much effort involved
nah as I said I don’t repair them
I'll give you the parts, do it yourself
Bro counts washing his parents cars as working with cars
🤣
But still the point stands. If you don’t want to put in the effort to do something, that is why you hire someone to do something.
That is quite literally how specialization within society works
Serious advice, you better try to find a niche to specialize at before you move out
true I’ll hire them
People get good at things and exchange their specialties so everybody benefits
why
If life doesn’t work out the army is always looking for new people 🤷
Army requires a lot more effort than almost jobs
LMAO
Just so you know
so
Army is 99% effort
I'd love to see you in the army
You will not last there for a week with your idea of effort
That'd be amazing
it’s physical effort sure
The 1% is the 4 hours of sleep u get
Man's going to be clapped every single minute by higher ups
nice?
“Sorry I didn’t show up to training today because I didn’t feel like putting in the effort”
With your mindset, you won't be there for more than 3 days
Guess I'll be going now, will read the aftermatch of this convo tomorrow
I would
If there’s one thing the army doesn’t tolerate one bit, it’s laziness
Cya
bai
Bye
The best part of this is that I know he’s not trolling
popcorn
anyways also heading off, losing my braincells over time - plus it's going off topic
He literally thinks this way
good night 👌
I do luckily
I’ve been living in the real world for awhile
Battleless more like effortless 
Maybe
my condolences
thank you I needed it
who doesn’t
who chose?

quick question how can i change my bot's pfp on top.gg
i already changed it on the discord dev website
press "Refresh" then go into edit page and just click "Save"
how come with lru-cache when I try to access it from another file it always returns undefined ⁉️
You really need to learn how to ask better questions
You always give us no context whatsoever for an obscure problem, we need to see some code or SOMETHING at the very least
i do cache.set(id, ...) in one file.
i do cache.get(id) in another file and returns undefined
Ok and where do you export cache
How are you accessing that variable from another file
by doing this ☝️
what variable are you referring to
I mean where are you getting cache from
oh
In BOTH files
i just define it in both files
const LRUCache = require('lru-cache');
const options = {
max: 500,
ttl: 12 * 60 * 60 * 1000
};
const cache = new LRUCache(options);
Do you do that for both files?
yes
Well then that’s why
If you are doing that in both files the cache likely won’t persist
🤨
You’re creating a new cache for each file
bru
It’s two different caches
By exporting it and using that one cache only
You need to export your cache from some file or attach it somewhere where you can access it, or you can pass it as a parameter to functions that use it
guys how much does 6k characters hold in cache
what
depends a lot, but in general each character takes 2 bytes
then each individual string takes extra bytes of overhead
v8 is smart enough to detect what kind of characters the string has tho
so if it finds that the string only contains 1 byte characters, it is able to create a special type of string that only uses 1 byte per character
Very smort
for example, here's 6k fs
or just split the sentences by their chars and save each char individually then regroup those chars together again

6k fs takes 6012 bytes
tim is going to need all the fs he can get
F
almost 6mb 😕
now if you take that 6k fs
and add one character that is larger than 1 byte
here's the result
and add 6k Ls then you have tims daily life
the entire string is converted to a 2byte string
so it takes 12012 bytes now, instead of 6012
what are you calculating here?
so you have 500 strings of 6k characters?
yes
3006000 bytes if its a 1byte string
6012000 bytes if its a 2byte string
or 5.871 MB
I was about to say
tim I challenge you to make a 1gb string
its weird for me too, because im a native portuguese speaker, and portuguese uses commas as decimal delimiter for some reason
oh
"a".repeat(1024*1024*1024)
one sec let me see if brave crashes
Imagine using brave
neither, im not a football fan
zidane headbutt = best
☹️
also 2000s ronaldo
This is why I use brave
cute little doodles on launch
i use an extension to get fun images on startup
Ok but you are as old as dirt so I would not expect you to understand
Brave tracks you tho

Nah
The older I get the more I understand... at least how weird younger people are
Take this
who’s weird
what do you guys think about my new "coding" language? (it just transpiles to js, its a fun project)
this is the code it generated: https://pastes.dev/hqvQaEMJFs
Yeah you can
It would start to take a hell of a lot of memory tho
Depends on how big the images are, if they’re super small and you’re not using a lot of them then they’re fine. If you intend on caching a TON of them though, that’s where you’ll run into problems
looks like bash
but worse
yup
given the name of the lang is "bad lang', congratulations
^
^
discord.bad when
Yeah I think discord gave up discord a long time ago, too
That's the reason they only add emojis and stickers and bullshit like that instead of useful and wanted features
Must be like "we can't make it a serious chat app anyways so let's add any bloat we can find"
kids will like it
tf is a super reaction?
Lmao
Does it blow up all other reactions?
but I actually wanna make a decent language thats enough to control user defined api routes, I just have no clue how I want it to look yet

basically a reaction with a special animation that only nitro subs can use
God bless the possibility to turn reactions off completely
oh I love writing docs /s
I think boolean would make more sense there
there where?
at the @return
that's how u declare the return description in javadocs
ah
u don't declare the type, that's automatically included
it becomes this
but it's impossible not to be redundant when the fuckin function name is self-explaining
Unclear what the function does.
public boolean whetherTheEventIsConfiguredToUseButtonsOrNot() { }
seems like a clear improvement
lmao
Looks like lua syntax
great, now I can at last publish a release
very verbose, but looks interesting
how can I also make it match call? it should be a unique match, not connected to (test)
I think I actually got it
careful when using | in regex, it might not match what you expect it to
alwayls need to be aware, things can explode randomly
why is regex sometimes so convenient? 🤩
hey implication is right associative right?
So a -> b -> c would be written as:
(A -> B) -> C right
right associativity means that we start at the left?
in the second one?
in the one u sent on dms
Imma just use this, it kinda matches but I want an argument to be everything until the comma
or if there is none just to the end
what are u using the regex for?
for making my bad lang less bad
you should be using a lexer instead
parsing a language with regex will be extremely hard because u dont have context information
I already made that manually, I always know where im in, aka if statement, while loop, etc
I just need to match functions
yes, that's part of the issue
because for example fn (",", 123) cant be parsed correctly
if you split by comma you'll end with 3 args
but there are only 2
hmm
I think I got it but I also want to make the "good ok" one match even though it isnt in "
So i’m trying to organize my slash commands but when i edit the handler to load the commands it can’t find the individual folders and i’m doing ./commands/../ and it says reloaded 0 slash commands.
Where's code 
one sec
i’m uploading it
const { REST, Routes } = require('discord.js');
const { clientId, guildId, token } = require('./config.json');
const fs = require('node:fs');
const path = require('node:path');
const commands = [];
const commandsPath = path.join(__dirname, 'commands');
const commandFiles = fs.readdirSync(commandsPath).filter(file => file.endsWith('.js'));
for (const file of commandFiles) {
const command = require(`./commands/../${file}`);
commands.push(command.data.toJSON());
}
const rest = new REST({ version: '10' }).setToken(token);
(async () => {
try {
console.log(`Started refreshing ${commands.length} application (/) commands.`);
const data = await rest.put(
Routes.applicationGuildCommands(clientId, guildId),
{ body: commands },
);
console.log(`Successfully reloaded ${data.length} application (/) commands.`);
} catch (error) {
console.error(error);
}
})();```
and my commands are commands/testcmd/test.js
and it won’t load it
@deft wolf
`./commands/../${file}```
` ?
where is the loader located?
my deploy.js
whats the ../ for
it’s the folder
wouldn't it be ```js
./commands/${file}
bc the test.js is in the commands folder in a folder
why not just ```js
require(${commandsPath}/${file});
or that yeah
nope
if the command is inside another folder inside commands, then you need to edit your code
still says 0
your code is only handling files directly inside the commands folder
what
Funny number sequence
use absolute paths always
only a sith deals in absolutes
join the dark side of nodejs
Join the heavy side of node_modules
TypeError: Cannot set properties of undefined (setting 'defaultFontFamily')
what does this mean