#development
1 messages ยท Page 227 of 1
ah so it looks like it basically just crashes the app since node will likely throw an error if you try to set more headers than allowed by server.maxHeadersCount
Yeah, so a single request could have crashed it.
So, I get why it was marked as high
is there a way to get notified about these types of things?
github just randomly sent me this
so i guess you just need to enable dependabot if you use github
where'd ya see thissss
hubgit
oh i think you can do it on repositories on applicable projects
ones with supported package managers
here
how can i get my bot to purge messages that are older than 14 days old?
Probably only if the messages are deleted individually
Which will be terribly slow for a few hundred or a few thousand messages
@lyric mountain I am not home currently but what's the best way to optimise that full text search I am doing, I technically only need the count of matching rows that exist in both field and input and sort by that in my case
It takes almost 11sec on bigger text currently
Current code fyi
did you create the index as I said?
Yes
Didn't change speed
I think it's just too much data
Each value column is around 10kb
how many characters?
Uhhhh
also, how exactly are u trying to search?
I'd guess like 10k
do you want only 1 result or to order results?
I want 3 top results
^
Look at the code, most is there
and what kind of data are we looking at?
code is not readable
Minecraft server configs
...ok, question stays
what kind of data are we looking at? (structure)
as in, send an example
So basically
A user passes in his config
And I want to reverse search the most accurate match to get the version it was created by
I don't really know the optimal way for that
No
It's a relation
The yaml does not contain any data I need
It's just there to search with

ah wait, u want to match whole configs against whole configs?
Yes, but since configs can be changed I need the best match
yeah no, that's not going to cut it
similarity and alikes are for fuzzy searching
not for comparing whole documents
What else should I use?
my fault g
well, your best option would be not to
are the config files generated by you to the users?
or can they be anything?
you can use this
go check if it's constant for all configs with the same minecraft version
Hm, I guess I could for most configs
if it's the same number for every config under a given version, then u can compare that value alone
If that doesn't really work out (which I can't test rn), would it be a good option to fetch all values into memory on start and search on those
comparing whole documents will take a long time regardless of how you do it
Well I can use any algorithm if I have it on my app
any algorithm will take a long time
we're talking about doing a full scan of every single entry
there are no shortcuts
I mean
Couldn't I just split all configs into array of lines
And check how many match
yes, and it'll take a long time
Once
you dont get it, if you're finding the most similar entries given a document, it will take a long time because you HAVE to process every single entry against that doc
anything you do will still require a long time
that's why people put version value in config files
if the value is constant among a given minecraft version, then u can simply use WHERE value LIKE '%config-version: ' || :version || '%'
as postgres doesn't have a built-in yaml parser
btw do keep the index, LIKE can also use pg_trgm indexes
jesus github actions.
build matrix for apple x2, linux & windows
ofc the apple two finish at the same time AND CREATE THEIR OWN RELEASE DRAFTS
max-parallel my most hated and beloved
what do you guys think is a better suitable reverse proxy? im planning to mainly use it to map subdomains and certain routes to different backend apps with maybe some static content
i only really know of apache2 or nginx but never really used them
i'll probably use it then, thanks, i think its also simpler
i assume i can also set up https on the nginx end? so i dont have to do it on the application layer
so communication between nginx and app is http, but between nginx and browser its https
for sure
tho what I do on my endpoints is to redirect http to https, if it wasn't already
just in case cloudflare misses it
so communication between nginx and app is http
it'll always be
as you'll use localhost for communicating internally
and localhost cant have ssl
doing the walk of shame on github actions rn... fail, push, fail, push aaaaaaaa
FINALLY
YES
๐ญ
after 8/9 attempts โค๏ธ
caddy is another option too thats apparently the simplest
it can
I use ssl on my machine when testing

.Net tools raaahhhh
gotta love dev-certs
why r let's encrypt certs only valid for 3 months
i dont feel like renewing it 4x a year
ima be real
if you use cloudflare and still generate certs with let's encrypt
you're doing smth wrong
and i want ssl for node domain things
yea ok
use cloudflare
no cloudflare
why not
I used cloudflare and used NPM together
Without cloudflare 90% of the websites on the internet would fail
cloudflare is great i use it for everything but i cant use it for pterodactyl without 24/7 struggles
Why not?
Its just like anything else you host
config ass
Akamai ๐
overstatement
bad
not an overstatement
it is
can we have polls to mute people
mute who
Akamai best
never heard of it
astrid wett
Ima be real with you
Cloudflare is more than a CDN
Not to mention, it seems akamai is a paid service
thats why its better
whereas cloudflare even their freetier is better than akamai's so called paid plans
pay = better
ovbs more than a cdn
you are just buying into a fantasy that doesn't exist
thay make you pay for a reason...
we pay them = higher quality
no
๐
you pay them because they need the money and can't afford to give a free tier
cloudflare gives you a free tier that is just as good as their business tiers
akamai are jsut better bro
made way more money than cloudfare
lmao
bc more ppl buy it bc it better
jsut look at the statistics...
their computing stuff isn't even done by them
they outsource it to linode
Ah wait nvm guess its a child company
they work together not jsut linode
interesting
honestly linode isn't even that good either
the prices for their plans are absolute dogshit let alone the specs you get
what are the statistics for cloudfare /
like 8 million or so actively using
20% of all internet traffic per second goes through cloudflare or smthn
ye
imagine if one day both cloudflare and googles servers went down
hell would let loose
50-60% of the entire world wide web gone
the furthest ring of hell would look like childs play
aws and oracle going down would also cause even more chaos
Any of the big 4 hosting providers
OVH, AWS, Oracle, Google
Most of people's stuff is on those services
google and aws are the most major afaik
OVH is up there as well
discord runs on aws and google iirc
ye
that fire
its pretty much impossible for all of them to go down at the same time
unless.... ๐ณ
or even at all
๐
are we playing payday 2
payday 2 > 3
its the deepest depths of corporate hell
(payday 3 sucks)
no like payday 3 does exist
idk who in their right mind would do it
I know....
that kid who hacked rockstar is in that hell rn
Ive played the payday games
ngl
forgot about him
havent heard anything about him in a while
Lapsus$ right
thats the name of them
ig
hows that even possible
I mean
it connects to the internet
it has its own os
browser
and basically is android

how do you even hack someone using a fucking android device which has no peripherals other than a damn remote
i wonder what bro used to get in
maybe termux?
maybe
its even funnier
it was from a hotel tv as well

Out on bail for allegedly hacking the hardware company Nvidia, Kurtaj, prosecutors say, pulled off the GTA heist while staying under police protection at a Travelodge hotel. Without his computer, he somehow managed to hack into Rockstar using his smartphone, an Amazon Firestick, and the TV in his hotel room.
he did have a phone
but i wonder how did he actually get it
get what?
get in*
some sort of exposed port?
bro probably works for the CIA or NSA now tho
easy to guess password?
from his bed ๐
fosho
tf is this
the one time i decide to use react i get problems
i regret not using svelte or vue already
one of your dependencies relies on a react version that your project isn't using
this typically happens when you upgrade react to a higher version than the one the dep relies on
or vise versa downgrading
yeah i left this project for a few months so things are probably outdated somehow
im trying to upgrade all packages first to see if that works
what type of scaling is usually applied on a discord bot if it has setup something like discordeno?
That's fair. It isn't an issue for me and I like how it looks a lot
Wdym? There are folders and tabs that arent pinned or favorited get removed after a set amount of time
same as any other
if you have a separate process for the gateway, you need to scale that independently based on how many guilds you have
then your code will be scaled based on actual command usage
just get more servers
kubernetes it
raahhhhhh
:D
tbh idek how you'd scale a discord bot
if not getting more system resources
the thing about discord is that its not very compatible with horizontal scaling

so just getting a beefier machine is still the easiest way to scale
and of course, optimize your code and cache usage
but its still possible to scale it horizontally, just a bit tricky to do
but could you not split the processes off onto other servers?
you can, but its tricky
while the sharding system is very good for horizontal scaling,there are two parts of discord that are still centralized
the shard login queue and the rest rate limits
so while you can split all your shards accross different servers, when they login, they need to contact some central server first, to make sure they login in the right sequence

So it'd be ideal to horiztonally scale
but if not verticle scaling is the way to go?
vertical is the easiest
horizontal would be best for large bots
you can do it horizontally it just gets annoying and complicated, but a fun project definitely
as long as its implemented correctly
yeah
once you achieve "large bot sharding", which happens at around 100-150k guilds
Oh then that sounds rather easy to implement no? You just have each server send their shard login requests to a central server and just log them in order of id?
you will be able to connect 16 shards at a time, every 5 seconds
but only specific ids can login at the same time
thats weird
so youd probably have to broadcast to each server from some master server their shard ID to login as or something

think you can do stuff like this with kubernetes
yea
most likely
kubernetes has a master server that runs all the children servers
making sure there is always a consistent amount of servers running
the shards themselves need to ask some central server whether they can login or not, similar to rate limits
so how do you know which shards can login?
i hope mine doesnt
weird system
buckets by modulo, as usual
youd probably store some kind of state on the master server
I wonder how youd handle resumes/reconnects

so you can have the master assign specific shards to instances, then broadcast to these specific shards to login, and then wait or whatever
resumes can skip this part
reconnects need to follow the same rules as login tho
icic
Honestly
this seems like something i'd want a custom library for
simply because any existing library might be hard to incorporate this into
its very complicated to do it like that, because the master needs feedback from the shards, it cant just send a signal and wait X time
i think a custom sharder would be enough
login timings are different, then you also have reconnects
yea
yeah thats what i did
I mean you can use an existing library
does someone have a 150k bot i can quickly borrow the token from to do some testing
all you have to do is make a new client for each shard no?
not necessarily, most libraries support multiple shards in one client
ic
I know the lib im using rn DSharpPlus if you are manually sharding you have to create a new DiscordClient with the appropriate shard id and event handlers
they dont have a sharded clietn class or something?
For most looking to shard, the built-in DiscordShardedClient will work well enough. However, those looking for more control over the sharding process may want to handle it manually.
This would involve creating new DiscordClient instances, assigning each one an appropriate shard ID number, and handling the events from each instance. Considering the potential complexity imposed by this process, you should only do this if you have a valid reason to do so and know what you are doing.
sure just depends on how much control you ant
and I figure for smth like this you likely need as much as you can

i need to rework a bit this part on tiny discord, its not perfect yet
the shards need to have an ipc connection with the master to go back and forth while connecting
because if you use a fixed 5 second rule like discord allows, you can have issues
honestly this sounds like a fun project to make into a tool for people to use
Sell it as well /j
bots like Dyno would probably buy into it tbh
I know they spend thousands on their servers rn
lmao
horizontally scaling would cut the cost down a bit id imagine
since you are buying smaller servers
indeed
it's not tiny enough if it's not in C++ 
asm
:^)
its not tiny enough if its not in machine code
1s and 0s
get to work tim
discord-binary library when?
write 1s and 0s directly to ram with a microscopic eletric needle
tim
we need the discord-binary library
please make it
its your new mission in life
what would that even be?
dafuq
i wanna make a discord bot programming language
bdfd exists
so discord bot maker?
aoi.js
xDDDD
Itโs MY House of Pancakes now.
My NEW Cookbook Here: https://bit.ly/TextureOverTaste
FOLLOW ME:
Instagram: https://www.instagram.com/joshuaweissman
Tik Tok: https://www.tiktok.com/@flakeysalt
Twitter: https://twitter.com/therealweissman
Facebook: https://www.facebook.com/thejoshuaweissman
Subreddit: https://www.reddit.com/r/JoshuaWeissman/
Dis...
but better?
yuhh
ihob
whats IHOP anyway
no idea
mid restaurant
looks like a pancake shop
yum
my vps ran out of memory when running npm update
this is cooked
how many dependencies does react have
amazing
i can live with a html minifier being susceptible to a ddos
why shitty ):
what teh fuck lmao
i love pancakes
americans eat this shit for breakfast
the cardiovascular health statistics arent a surprise
when did these poor diets become normalised
Does anyone know a free host for the App?
school computer
Yep silly dev
Btw it's currently no free spots but they are doing a purge of free servers so there should be free spots open soon
gcp has a free tier, but you need a credit card to sign up
W verified badge
First person I have seen with it
mans stalking profiles
Yep
there are a lot of people with it here, at least there used to be
Yeah but your the first
I have seen
at least now you can sell your account if you ever get on hard times
Throws pokeballs
my special ability is procrastination
you are also Experienced!!!!!!!!
experienced in procrastinating
L i have a master ball
Nooooooo
Jajqjq
procrastinates entering the ball
I love the discord bot development community sometimes
sometimes
:^)
Yeah sometimes cuz someone hacked my bot and banned over 1.2k members
discords 2fa prompt appearing as youre rushing to reset your token when every second is crucial:
So truw
@lyric mountain nginx is really good
you can even configure ratelimits and automatic spamassassin headers for SMTP
ive been missing out
yep, it has basically anything you'd need for a webserver
and if it doesn't have, you can install plugins
gluten free doesnt make it healthier
also waffle doesnt have a choice but to eat gluten free products
๐
How do I give a docker container access to its own volume folders?
One of my containers errored out because it couldn't read a file inside its data folder

lol
Fixed this by add user: root to my docker compose idk if this is the most viable solution but it works!
@lyric mountain question for you about postgres
I am trying to come up with a db structure for a bot I am making
I am thinking I will need 3 tables at least
- Profiles - This will store their user id, opt in for global leaderboard, position on leaderboard [maybe], as well as a references to the images they have uploaded
- Leaderboard - User Id (One-to-Many relation), Image (one-to-one), Rating (the rating of this image on the leaderboard)
- Images - Do I need to store a reference to the user here since its on leaderboard?, Image Url (url of the image from my cdn)
I am not sure if this is the best way though
My requirements are to
- Keep track of the user on the leaderboard
- Keep track of the images on the leaderboard for profile reasons (e.g they can run /images or smth to see their highest rated images putting them on the leaderboard)
Don't store position on leaderboard
What kind of leaderboard are we talking about?
And what about the images? What are they for?
They are just images people can up/down vote
Its a leaderboard for the people who have the most upvotes
You can usually have the DB calculate the ORDER BY upvotes - downvotes and then tack on a DESC

yea im not too worried about that tbh
Im more worried about the structure of the db
Yes, you'd have only 2 tables
Profile and Images
Image would have the ID of who uploaded
The whole leaderboard would always be generated, u can make a view if u want
SELECT p.id
, sum(i.upvotes) AS total_votes
FROM profile p
INNER JOIN image i ON i.profile_id = p.id
GROUP BY p.id
so Images would have an Upvote and Downvote field?
Ah
right
saves me from having to do math

should I need a WHERE clause as well?
WHERE p.id = $1
If u want a specific user, yes
gotcha
total_upvotes = upvotes - downvotes 
Honestly call it score
sure
Also, make sure to create an index on score sorted by desc
how do you do that
Since most of your queries will be sorted like this
like a gin index?
oh

create table profile (
id serial,
user_id bigint,
);
create table image (
id serial,
url varchar(255),
score int,
);
CREATE INDEX score_idx ON image (score DESC)
?
bigint for the userid might actually be too big
Url 255 is risky
Use string for user id
Varchar i mean
what are serials for
auto generated ids
Alias for int autoincrement
LMAOOO
It might grow beyond bigint limit
Iirc it's already near the limit
bigint has a limit?
i thought its infinite in many languages
Lul it's 64 bits
well, as much as the computer can handle
isnt big int a 64 bit
Only BigInt in java is boundless
Javascript ain't boundless
bigint in java is like 128 right?
Nor python
how
Bigint is boundless in java, it'll map till u run out of memory
isnt it like an array of words or something like that
so it can grow like a vector/string
interesting
It's a very very big limit, but there's one
what is it
is there yet capability in most languages to handle 128 bit numbers?
for reference 340,282,366,920,938,463,463,374,607,431,768,211,456
thats the size of a 128 bit int

unsigned?
interesting
maybe minus a few
256 bit int when
Oh nvm, js bigint is the same as java
misty lang 2029
Python too
Doesn't matter much, varchar resizes to actual value size
Just put something sensible
Correct
even with varchar?
Yes

If u need unbounded text use text
ic
Even the text has a limit, which u enter into longtext area
I make an FK on the image table right?
create table profile (
id serial,
user_id varchar(255) unique not null
);
create table image (
id serial,
user_id varchar(255) not null,
url varchar(65535) not null,
score int not null default 0,
constraint fk_user foreign key (user_id) references profile(user_id)
);
this looks right
:D
U don't need an id on profile
huh
Well yes, but user_id is an id already
Since it's coming from discord
All tables must have an id, not necessarily a serial or anything
Just dont put text as primary key
so I should set it as primary
At least not without gin
Yes
Also unless u plan to add more data to profile, u don't even need a profile table
I actually did yea
forgot about it

oh shoot
I wont need to change anything if I have both a global and a server leaderboard will I?
To get on the global leaderboard you have to be #1 in your server
Can't people just make a priv server and invite the bot?
Nope
I plan on adding checks for this
Its a bot meant for a community
But u need to store guild id somewhere if u want to rank by server
I guess I can do it on the image itself
and when its on the global leaderboard I can still query for it from the image table
U can use rank function for classifying btw
rank() OVER (PARTITION BY guild_id ORDER BY score DESC)
Yep
interesting
I only plan on showing the top 10 for both global and server leaderboards tbh
I will still have a way to check your standing tho
Just use the rank function to populate the numbers
Then select the result of that
Since if u use where in the same scope as the rank func it'll always return 1
As you're always the first if you're the only competitor
?1 btw
Not $
But yes
Inside the from clause you'll put the whole select for sorting and ranking
Also handy tip, if you don't care about realtime data, you can use materialized views
They're basically snapshots of a resultset
They only re-fetch data if you call REFRESH VIEW nameofview
It's a good idea to have one if you start noticing slowness in computing the ranking
I dont think i will ever need realtime data tbh
I was only planning on updating the rankings every 15m
I just showed u how
To create a mat view u just put MATERIALIZED after CREATE
The syntax is the same as regular view
SELECT user_id FROM (RANK() OVER (PARTITION BY guild_id ORDER BY score DESC)) WHERE user_id = ?
is how i'd get the person right?
No

so
SELECT RANK() OVER (PARTITION BY guild_id ORDER BY score DESC) FROM image;
SELECT user_id FROM result_from_rank WHERE user_id = ?;
```?
U need to include user id in the inner select
The outer select can only see what the inner select returns
Also you should group the ranking, since you don't want repeated entries

SELECT user_id
, rank() OVER (PARTITION BY user_id ORDER BY score DESC) AS rank
FROM image
GROUP BY user_id
This will give the outer select user_id and rank fields
So u can do where user_id = ?1
Dw, you get used to it
also to make a materialized view, its basically just
CREATE MATERIALIZED VIEW global_rankings AS SELECT user_id
, rank() OVER (PARTITION BY user_id ORDER BY score DESC) AS rank
FROM image
GROUP BY user_id;
or smth like that
With data?
Idk what that is for
Nvm
but yea thats how it'd work right?
and then i'd SELECT * FROM global_rankings WHERE user_id = ? when I populate it with REFRESH MATERIALIZED VIEW global_rankings
U can select without refreshing
oh?
Only refresh if you want to grab fresh data
well yea
It'll keep the last snapshot u took
I meant when im updating the leaderboard
this is starting to fry my brain ngl
So u can diferentiate them from tables
Once u have too many tables it becomes hard to find what's a view and what's a table
Especially if u get large selects
I see
Well I appreciate it haku
Chances are ima be in here tmrw again asking the same question
cuz my dumbass is going to forget all of this
I got this achievement at birth
Sql takes a while, but it becomes very easy once you get used
The only issue then is to optimize the queries so ur not being wasteful
create index score_idx on image (score desc);
create index user_idx on image (user_id);
should i add desc to the useridx as well?
Nope, but do add unique
oh?
The more constraints u have the better, so the database needs to do less checks to get data
For example, if you dont have unique, if you do where user_id = ?1 it'll still keep looking after finding one
Whereas with unique it'll exit as soon as it finds one
Since it knows there's not another to find
No, unique means the data can't repeat
Ah, those are image indexes
the way the ranking is supposed to work is the average of all their image's scores
I was saying to put user_id index on the mat view
oh
Since there's where you'll query data
Yes
Index on what's your main criteria to query
Or on what'll be the main sorting
ic
For example, I have a desc index on the xp field for my bot
As I'll often query user lvl ranking
Just refrain from making too many indexes, as that'll negatively impact insert/update/delete
And make the table heavier
If ur going to put a guild_id column on image, yes
Also, how does the rank function work exactly, because idk if it will do what I need? As i've stated I plan on totalling up the upvotes and then dividing it by the total number of images they've posted to get the avg
that avg would be their global score
Rank is what you'd expect
It'll classify the entries based on the ORDER BY clause
Entries with the same value will share the same ranking
If u want to have no repeated rankings then u can use row_number instead
If u don't want a classification at all, then just remove the field, use a regular order by
For example, let's say you have 5 users, with scores 8, 5, 5, 3 and 1
Rank will do this:
rank | user
1 | user 1
2 | user 2
2 | user 3
3 | user 4
4 | user 5
Row_number will do this:
rank | user
1 | user 1
2 | user 2
3 | user 3
4 | user 4
5 | user 5
Regular order by will just sorte the rows, no numeric classification at all
hmmm
Right I understand it now
I guess my main question is
should I take the sum of all their scores from the images they have posted and use that?
Yes, just put it in the mat view
I feel like that number could become quite high and it'd be almost impossible for people to surpass rank 1 person and take the leaderboard spot
I want it to be a sort of competition
There's not much u can do tbh
yea you're right
U could limit number of user submissions per day/week
Or how long to allow voting
hm
well I need to rethink my plan then
originally for global leaderboards I was going to post the message with the vote buttons to an announcement channel and have it crosspost to following channels
but now that I think about it
I might have a different idea
- User posts image, it gets sent to a designated server channel.
- User happens to become #1 in the server and they are opted in for global leaderboards their photos start to get sent globally via the announcement channel
- Now anyone can vote and from that point on it starts affecting their global standing

Im not sure how that'd play out functionality wise
because people could "double" vote
You can, instead of a numeric column, have a separate table with image_id, voter_id and upvote
Where upvote would be a bool
Then for getting user score you'd sum all trues and subtract falses from that table
Image_id would be only to be able to check whether a user already voted for the image
You can even make a unique constraint for it + voter_id
So it fails if u attempt to insert the same image_id + voter_id combo
you can do that?
Sure, nothing prevents you from making a composite constraint
I thought if you did that then itd not allow the same user to vote for another image
Even primary keys can be on multiple columns
Only if u make a constraint on voter_id alone
If u pass 2 columns to the constraint, it'll only require them to have a unique combination
But either value can repeat if the other doesn't
icic
so something like
constraint fk_image_voter FOREIGN KEY (voter_id, image_id) REFERENCES ??
Not foreign, use a regular unique constraint
Foreign would be one for each
Not both at once
Voter_id would point to profile
icic
Image_id would point to image
Tho idk if u should put an fk on voter
As they might not be on the database
Unless u add everyone who interacts with the bot
I was going to force them to signup tbh but that might not be a good idea for those just looking to vote and not post
create table profile (
user_id varchar(255) unique not null primary key,
global_agreement bool not null default false
);
create table image (
id varchar(255) not null unique,
user_id varchar(255) not null,
guild_id varchar(255),
url varchar(65535) not null,
score int not null default 0,
constraint fk_user foreign key (user_id) references profile(user_id)
);
create table voter (
id serial,
user_id varchar(255) not null,
image_id varchar(255) not null,
upvote bool not null default false,
unique (user_id, image_id)
);
create materialized view mat_global_rankings as
select user_id, row_number over (partition by user_id order by score desc)
from image group by user_id;
create materialized view mat_server_rankings as
select guild_id, row_number over (partition by guild_id order by score desc)
from image group by guild_id;
Right so this is my sql, I just added in the voter table but im not quite sure how it will play out in deciding the ranking?
@scenic kelp sorry for the ping but you are the only C# dev I know here
var profile = db
.Profile
.Where(prof => prof.UserId.Equals(ctx.User.Id.ToString()))
.First();
do you know why this could possibly be halting execution of any code after it?
I've ran the debugger and either im not doing smth right or it doesnt even know
I am using EFCore (NpgSql)
fixed
yo can someone help me cuz welper just reviewed my bot and declined it and i can see my bot page on the website to see if typed my bot prefix wrong
ok
You can dm me
On decline, you should dm the reviewer (as in #support we always ask them to dm the reviewer)
theres a lot of amazing tools for this
one popular and pretty feature complete one is supabase
at least i think hold on
yep its supabase
I read FaaS as "Food as a service"
its just buzzwords as with almost everything in tech that involves businesses in any way
just spent a few mins read discord.py doc trying to override default help command
0-0

[error] [launcher] error during sbt launcher: java.lang.UnsatisfiedLinkError: Error looking up function 'stat': java: undefined symbol: stat```
i am using sbt package and this is what happens. Why?
only a db host
Iโm assuming that maybe this package relies on some JNI stuff, perhaps youโre missing a DLL that it needs?
I'd just use nextauth
I dont like how sessions are managed too much by nextauth, but it works well.
Handling sessions in nextjs really will depend on a lot of things.
Sessions can be managed on the client or the server.
For example, an SSR component can handle the session on the servers side.
A lot of it is above my head on how you would actually make it work.
But you'll first need to determine if you want the client or server to get session data.(you'll probably want both imo)
Say what you want about AI. But at least I don't have to do basic math.
tbh i have found that AI is amazing at converting math formulas to code
So u can put a delay of 1.5s between each request
i cant read math formulas exdee
The sad part is this is way simplier than what I've seen you doing
xDD
the only problem is
sometimes AI gets it wrong
and you have no way of confirming the result is accurate
Oh I do, this is a script for animation in blender ๐
xDDD
its good if you have something to compare to, or in your case you can see the result
but if you dont, then its kinda tricky
Yeah, I bet
Well you know because the cookie exists?
If the cookie exists they are logged in
The client side has access to that localstorage where teh cookie is
Just have your client side code keep track of the state.
Check the cookie, grab the user data, store it in state
log out, delete them from state
but you still need to confirm that the login is valid on every backend request
I think i have become dependent on AI
I wish i was like Tim or like some OG guys
Long story short build a middleware and just call it as a function on the routes u want to be auth protected
:^)
lmfao
nice
hi chat i need some rust help (i have no experience)
im trying to get the latest release tag name of a github repo using octocrab
let octocrab = octocrab::instance();
let binding = octocrab.repos(REPO_OWNER, REPO_NAME);
let release_handler = binding.releases();
match release_handler.get_latest().await {
Ok(latest_release) => {
println!("hdfghdh: {}", latest_release.tag_name.to_string())
}
Err(e) => {
eprintln!("check_for_updates: {}", e);
}
}```
for some reason, release_handler.get_latest().await errors and only that
Naww dont do that to my man gh co pilot. Gassing him up like that
Are you certain that the repo owner and name are accurate?
100%
it seems to be a tower issue
try and install a version or two lower than the current octocrab version
already at 0.35.0 (0.38.0 = latest) and nothing
I think it has to do with the way I'm calling the function this is in
(and I have no idea how to fix it)
as I'm running Tauri, I get the current app version within the Tauri setup callback and then I want to call check_for_updates in the background with that app version
yess i think i fixed it
oh you are using tauri
should of ran with that
cause it could also be tauri
๐
hey, i developed a giveaway bot, do you guys want to use it :v
Hey guys, i am currently working on an automcoplete feature for my bot.
async autocomplete(interaction) {
const premium = await isPremium(interaction.guild.id);
if(!premium){
// return
}```
what would happen in above case? Like would it successfully not execute the autocomplete or will it still run?
yes return will stop the auto complete
because its before all your auto complete logic it will never reach it
pressumably
You have to respond to interactions, no?
nah
you can just return
autocomplete doesn't require a response
if it doesn't get one it wont autocomplete
Ah that's sickk
Wait can i just autocomplete with an error message lol
sum like: "You ain't got no premium broke boy"
ahh
you might be able to send an embed, but whats the point
yeah true
Just make it clear what your premium features are.
Anyone who doesn't read em well, tough luck :D
whahahha exactly, thank you so much
๐
Ahh hell nah
I submitted a spark job on 8tb of data, how the fuck did it double the data on the dfs???
I swear it saved 16tb.. i think i am saving the intermediate keys instead of destroying them lmao
it does wait for an autocomplete response for a little bit
it will show a loading screen, sort of
it shows this while waiting for a response
not sure how long it waits, presumably the usual 3 seconds
you can just use "you are not premium" as the default autocomplete response
Oh sweet
Forgot you can do that

I used to just return nothing
the bot is getting removed if i ever got this as an autocompletion result
xDDD
Is it possible to get the stream data of a url without downloading the content first
or do I have to
stream data?
only if they are in the headers
try making a request and look at the headers
anything really
Doesn't look like it does


