#development

1 messages Β· Page 204 of 1

frosty gale
#

nothings stopping you

#

you can train 2.0 on nsfw images

sharp geyser
#

I know nothing about AI tbh, I just look at all the new AI startups and laugh

#

:p

frosty gale
#

ive been forced to learn more than i wanted about it since SD and llama came out

#

and i have done machine learning in the past so that helps

sharp geyser
#

I wanted to get into ML cause its cool

#

but idk anymore

frosty gale
#

professionally?

#

you need an undergraduate degree in mathematics first

sharp geyser
#

definitely not professionally

#

math is not my strong suite

#

I'd never make the cut

eternal osprey
#

Weighted sums, entropy, conditional probability, learning parameters and formula's, model evaluation.

#

It's not that crazy. If you encounter the maths, you will most likely be able to get yourself started using online resources.

#

Also many different packages do most of the maths for machine learning. Most of the times all you need to do yourself is model evaluation and fixing hyperparameters.

#

But yeah of course, you do need to know some underlaying information about for example the different activation functuons etc.

frosty gale
#

i dont know too much about it but i know the deeper you go the more advanced some concepts get and you need to do some things on your own and know the maths behind it to understand how to better optimise the model

eternal osprey
#

that's true

frosty gale
#

for any university course for machine learning you usually do an undergraduate with maths alongside it as well

#

because some of the maths involved gets quite complex and not really something youd see in a high school setting

#

but once you understand some of these maths jargon terms then you can probably do it just fine

eternal osprey
#

Yeah that's true, but usually everything is done by the package or framework you are using already.

#

There's no point to reinvent the wheel.

#

Though, setting evaluation and tuning hyperparameters aside as that IS completely left for you to do as far as i know.

sharp geyser
#

Who uses libraries, im a rust developer. I am the king of reinventing the wheel /j

eternal osprey
#

Though we do have some specific functions such as inner and outer loop validation to tune hyperparameters but it's extremely inefficient.

#

Ew i am such a fucking nerd

sharp geyser
#

bud you are in the development channel

#

πŸ’€

eternal osprey
#

fr fr

#

almost forgot

frosty gale
#

but its probably also a case of "maths in software engineering"

#

aka in 95% of cases you only need high school maths

#

depending on what you want to do

#

but universities still make you do advanced maths courses

#

it might come into use for some advanced problems but most of the time you can use a library for that or quickly google

eternal osprey
#

Yeah that's true.

#

Man fuck mahs

#

no one likes it

ionic schooner
dusky idol
#

I believe I did state this once here, but I'd like to bring it up once again before I start working
I made my bot on atlas mongo db cloud database free plan, I wasn't expecting it to grow this much
Now that the bot has a lot of active users, the commands are often delayed and the bot responses are a bit slower than I'd want them to be.

I've a few options, unsure on which one to consider.
Data of all players is stored on mongodb ofc, and that's the only db I know how to use i'm pretty much a beginner at databasing
I can try learning SQL but I don't know where to start. I'll also have to re-write the entire bots code in SQL which does sound painful and time consuming. I'd also need some practice and guidance if I pick this way
Other is I could maybe buy premium version of mongodb, but i dont know if thats gonna fix anything or nah.

Would appreciate if someone can help me decide whats the best choice to make in my case before I proceed with anything :), feel free to suggest alternatives if you've any! I work with python ofc

#

Also apologies for yap wall man

ionic schooner
#

Are you able to host your own instance of mongodb? @dusky idol

dusky idol
ionic schooner
#

Where are you hosting your bot? Is it on a vps?

dusky idol
#

but i doubt it's a hosting side issue

sharp geyser
#

Hey Zeksy

#

There is a cool thing called orms, you basically don't need to know any sql to use em

#

Just use an ORM if raw sql isn't your strongest suite. And what you can't do with the orm, they typically expose builders that you can learn what you need to execute raw sql queries

dusky idol
#

2*, I got the Hey Zeksy part

sharp geyser
#

Object Relational Mapping

dusky idol
#

Makes sense

#

But what do I do with bot's database currently

#

there's a lot of data stored on mongodb ofc

sharp geyser
#

Well, if its mongodb the hassel free option is to just locally host mongodb yourself and port the data over

dusky idol
#

i can summon it and then add it to whatever i switch to

dusky idol
sharp geyser
#

The other option is to host a SQL database like postgres or mysql and port the data over to those, but since those are relational dbs they can get tricky

sharp geyser
dusky idol
sharp geyser
#

Well not necessarily

#

But you wont be confined to paying for atlas

#

If your db responses are slow then that means either the connection is bad, or your queries are terrible

#

Its hard to say without seeing code shruganimated

dusky idol
sharp geyser
#

This is why you do connection pooling

dusky idol
#

let me throw an example

dusky idol
sharp geyser
#

Im too tired to explain what connection pooling is Sadge

#

give me a sec

sharp geyser
#

Look at that link

warm surge
#

I just host my own mongodb server

dusky idol
#

I believe if I do the pooling or whatever, it'll keep the connection open all the time so regardless of how many calls I make in a command it wont make a difference?

#

Half read half assumption btw ^

sharp geyser
#

No.

#

I mean sorta correct.

dusky idol
#

yay

sharp geyser
#

Basically, if you have multiple people running a command, and it needs to fetch from a db.

#

Well if a fetch is already happening, the other call has to wait until that one is done.

sharp geyser
#

Whereas if you use a pool it can open new connections, and when its done cache them to be reused.

dusky idol
#

let me give you an example

sharp geyser
#

It saves you from opening a new connection each call.

dusky idol
# sharp geyser It saves you from opening a new connection each call.

Our bot has a "reset" system, I'll explain it in simple terms so we can have a better overview

Basically, everyday at 12am, 8am and 4pm let's say the pulls for everyone resets, let's say all players can pull 8 more cards and run the jjk pull command
whenever a reset hour hits, the bot basically just becomes 10 times slower than usual as the whole world is pulling cards at once

Now that you've explained this, I believe this is what was causing the lag?

#

From what I'm getting for now, when more users are interacting with the bot at once, it will be slower as it is right now. But if I implement pooling, it will be solved? Correct me if I'm wrong tho

sharp geyser
#

Well yea if you are running on one command it will be comparitively slower

#

DBs are meant to be able to handle that, but if its a large number of users making the same command call then it will get very very slow

dusky idol
sharp geyser
#

DB pooling can lessen the burden

#

though its not guranteed to help 100%, as it also depends on how you are making these calls.

dusky idol
#

I see, lessen doesn't mean resolving it tho

sharp geyser
#

But it will make it smoother experience for the users

dusky idol
sharp geyser
#

thats the sad reality of the world of the internet.

#

There will always be some lag, its just it can be unnoticeable

dusky idol
# sharp geyser You wont ever be able to resolve it 100%
        patreondb = await self.bot.db.patreon.find_one({"_id": ctx.author.id})

        if not patreondb:
            return await ctx.reply(f"Only Hollow Purple users can access this command")
        if patreondb["rank"] != "hollow purple":
            return await ctx.reply(f"Only Hollow Purple users can access this command")
        
        pullerIds[str(ctx.author.id)] = datetime.now().timestamp()
        find_cooldown = await self.bot.db.cooldown.find_one({"_id": ctx.author.id})
        if not find_cooldown:
            await self.create_cooldown(ctx.author)
        cooldownData = await self.bot.db.cooldown.find_one({"_id": ctx.author.id})
        GlobalPullDB = await self.bot.db.globe.find_one({"_id": "pull"})

Like this block has 4 calls, it's a big command tho and the last part has some update_onecalls too
Usually the command responds within 3-5 seconds, during reset hours it can turn into 5-15 seconds even which is a big problem

dusky idol
# sharp geyser There will always be some lag, its just it can be unnoticeable

I got you, I messaged a friend regarding the issue earlier, he's also pretty much a newbie tho
What he told me is, if I switch to SQL it'd never cause any lag as sql is an in-code database and not hosted on cloud unlike mongodb so the bot wont have to build any connection of any sort
He works with sql so he might just be biased, but his suggestion was to try and re-write everything in sql to kill the problem muidead

sharp geyser
#

Your friend is wrong

#

SQL is not a in-code database as they say.

#

While yes you can store it on the file system like with sqlite, there is also cloud dbs that require a server like postgres and mysql.

dusky idol
dusky idol
sharp geyser
#

Even with SQLite though that relies more on read and write speeds it can be delayed just as easily

dusky idol
sharp geyser
#

That is something I myself have no idea about. I haven't used Sqlite enough to know how it works fully. All I know is its a disk database.

#

You access the db file directly

#

Unlike postgresql where you open a tls connection to it

dusky idol
#

eitherway back to mongo !

sharp geyser
#

@quartz kindle or @lyric mountain is probably better suited to talk to you about databases though.

#

I have very limited knowledge compared to them

#

I wouldn't be surprised if tim could make his own db with the knowlege he has mmLol

sharp geyser
#

It will help

#

Usually you can also set the max connection as well if you want to fine tune it

dusky idol
sharp geyser
#

uh no idea how you do it in mongodb

#

and depending on what library you are using it might differ

dusky idol
sharp geyser
#

Bro the docs for that library are so bad 😭

#

Well I mean, it looks like it already has the default pool size set to 100 connections

#

Which ideally should be more than enough tho idk how large your bot is

dusky idol
#

im on this tier

#

it says 500 max connections and bla bla but also low network performance

#

that could be the red flag maybe

sharp geyser
#

Well by default your library only allows 100 max concurrent settings.

#

You can ofc change this.

rose warren
#

So update, this doesn't work lol

#

I just get a "Missing Access" error when I try and add the new member to the thread on the guildMemberAdd event even though I've already given them a role, the bot is in the thread it made and the bot has admin. I also tried setting their rules flag to force accept the rules before trying to add them and it doesn't make a difference. Not sure what's up but it looks like some sort of Discord issue since I can't even add them to the threads with my own account as the server owner.

#

It used to work perfectly just tagging them in the new thread until about a week ago

sharp geyser
#

Hello gamers

#

Got a database question. I am trying to bulk update user settings right now, which means I need to find a way to also reflect this in the database. Right now we are thinking of dynamically creating the sql query, but this seems like a bad idea. As usually dynamically creating sql queries is never a good idea. What do you guys recommend doing?

rose warren
#

Wdym dynamically creating them is a bad idea?

sharp geyser
#

as in, taking the json response, looping over it, and dynamically creating the query string based on that.

#

Its not sanitized, and although the chances of them inserting anything bad is low, its not impossible for bad actors to do so.

#

I'd like to mitigate that if possible

rose warren
#

I'm not sure what you're trying to do? What's the json response from? Are you just trying to do a one-off bulk update for all users or is it something a user can trigger? I don't understand.

sharp geyser
#

Well the response is from the frontend. Kind of like discord's setting pages for servers where you can edit multiple things at once and save it all at once as well. I am trying to go for that effect as well.

#

The only thing is, if they know the endpoint and they have their student_id (which is saved in the cookie rn cause we have no session management) and their token they can make any requests to the endpoint with whatever data as long as it matches the struct

rose warren
#

So you just want one user to be able to update all of their settings using one sql query basically?

sharp geyser
#

Essentially, it'd be better than running multiple queries

rose warren
#

Ofc

#

Idk how your settings are structured but i'm guessing you store settings in json format?

sharp geyser
#

No

#

They are individual fields

#
{
   "account:" {
    "setting1": "somevalue",
    "setting2": true
  }
}

is more or less what we do rn

rose warren
#

Well if you're using prepared statements on the backend you should be ok afaik?

sharp geyser
#

yes & no

#

prepared statements would definitely help, but in our case when we are handling multiple fields it is kinda where it gets weird

rose warren
#

How?

sharp geyser
#

Well, we don't know off hand what fields we are updating, we have to rely on the json given to the endpoint to know.

rose warren
#

Just update everything

sharp geyser
#

Oh for the love of god no

rose warren
#

Why not?

sharp geyser
#

That would require having the old settings as well

#

just so we don't accidentally overwrite them

rose warren
#

So you only pass the updated settings to the backend?

sharp geyser
#

Only the settings we are updating yes.

#

Else that is just useless data being sent

rose warren
#

How much data we talkin? mayaLaugh

#

A few bytes?

sharp geyser
#

I mean, its realistically not alot. But I see no point in sending data we don't need back and forth. Not to mention some settings are sensitive

#

We can ofc omit them, but in rust omitting fields is a little meh

#

I'd rather avoid the need to omit the fields we don't need and just not send them period

rose warren
#

Oh rust. You're trying to be 1000% optimised. Good luck mayaLaugh

sharp geyser
#

Yes, rust cause blazing fast πŸš€

rose warren
#

I have no better solutions for you then mayaLaugh

sharp geyser
#

In reality we chose rust cause its what we both now me know. Its type safety and memory efficient

sharp geyser
#

But thats fair thanks for the help you did provide!

rose warren
#

My other alternative was fetch the user on the backend, compare the updated json to the fetched data and then build a prepared update statement based off that which updates / overwrites all settings.

#

But that's 2 sql queries and since you've mentioned the 4 letter R word you probably won't want to

sharp geyser
#

I mean, thats honestly better than what we are currently doing

#

so

rose warren
#

I don't see how you'd do it otherwise

#

Based off what you told me

#
  1. Send all settings to the backend and send one update query.
  2. Send only updated settings and fetch, merge changes and update the user on the backend.
sharp geyser
#

I am now realizing that maybe that won't work :^)

#

Not all settings are in the same table. There are account settings and then other settings as well not stored in the account table

rose warren
#

I don't see how a dynamically generated query could have solved that either then?

sharp geyser
#

we'd be able to set which table we are updating

warm surge
dusky idol
real rose
radiant kraken
sharp geyser
#

πŸ˜”

radiant kraken
#

why sad

#

i'm sure you'll get your Windows PC soon <3

feral yacht
#

this is not a development question but uh how do i make my bot popular top.gg is th only way to advertise but uh i have never seen bots that got popular from tog.gg

deft wolf
#

Depends on what you mean by "popular". Top.gg is not the only bot list, you can add your bot to many such lists and have a greater chance of reaching users. The uniqueness of your bot is also important, multipurpose bots have it much more difficult because there are thousands of them

lyric mountain
#

and their active advertising

feral yacht
lyric mountain
#

advertising everywhere

quartz kindle
#
  1. realize all your hard work is not paying off because your bot simply isnt that good
  2. give up
deft wolf
#

Repeat the process but this time with a different bot TROLL

hidden gorge
#

Hey can someone tell me what CORS is and why its blocking a request?

real rose
spark flint
#

what is cors and why is it ruining my life

#

/j

hidden gorge
#

its annoying me

#

like do i just add that to the header?

vivid fulcrum
#

CORS needs to be configured on the server

#

it's a browser security feature, so you can't tinker with it on the browser client

hidden gorge
#

I fixed it

hidden gorge
#

anything i could change on this?

pale vessel
#

lgtm

frosty gale
sharp geyser
#

Bro 😭

warm surge
#

get real

real rose
sharp geyser
#

ngl roosa

#

I already forgot what lgtm really means

#

I only remember lets gamble, try merging

real rose
#

lets get this merged
looks good to me

sharp geyser
#

πŸ‘

#

When we merging?

real rose
lyric mountain
#

lemme guess, tim made?

real rose
#

LOL

sharp geyser
#

honestly that fits more in here than anything

spark flint
#

LGTM community

sharp geyser
#

tim is the real owner

solemn latch
deft wolf
#

tim's cave fits better in my opinion kappalul

sharp geyser
solemn latch
sharp geyser
#

pfft

solemn latch
#

for no aparent reason

sharp geyser
#

300 people don't even visit this channel in one day

sharp geyser
#

sorry tim, we tried

solemn latch
#

5head

sharp geyser
#

no one checks pins

solemn latch
#

-pins

gilded plankBOT
#

Your question is likely answered by one of pinned messages.
Please take time to read the pinned messages by clicking on this icon.

solemn latch
#

^-^

sharp geyser
#

unless you tell them to

#

-pins

#

ye we cant use it tho ANGRY

#

Anyway onto dev stuff.

#

Since text in postgres is not super efficient to use if you aren't storing large globs of text, then you're supposed to use varchar right? Well is it really okay to just keep doing varchar(255) ?

#

The point of varchar is to specify the size, but since I don't always know the size of things, unless I am controlling it myself then I am kind of forced to use it like that just to be on the safe side.

lyric mountain
#

you can guess what would be the maximum size and then add some more

#

for example, on an email it'd never reach 100 characters

sharp geyser
#

Eyes oh really?

#

I've seen some long emails before.

lyric mountain
#

even 50 is a bit of stretch

sharp geyser
#

Do they limit the size of emails now?

solemn latch
#

Honestly, I dont think it matters does it?
Unless you have a massive database I don't think you'll ever notice performance or storage issues because of text vs varchar.

sharp geyser
#

hm

#

ok

#

yea I doubt I'd run into an email that is that long

#

and if I do they can take the cake

sharp geyser
#

Like alot

lyric mountain
#

also yeah, u can use varchar(255) where ur unsure, it'll resize down to actual data size

#

plus 2 bytes

sharp geyser
#

Oh cool

#

I thought it was like "this is how much it will 100% take"

lyric mountain
#

that'd be char(255)

sharp geyser
#

ah

lyric mountain
#

varchar stands for variable char

sharp geyser
#

so varchar is like a dynamic giving it a hint

#

but ti wont go past 255 right?

lyric mountain
#

yes, it'll give u an error if you try to insert something bigger

sharp geyser
#

Also, how would you advise I store a list of image urls?

lyric mountain
#

I use varchar(255) on my bot for urls

#

but if u want to cover every case, maximum valid url size is 2048

sharp geyser
#

I'd need to store a list or an array of them

lyric mountain
#

average url size is 75 according to stack

sharp geyser
#

I store the cdn links for the product images

lyric mountain
#

ah, child table then

sharp geyser
#

Really sadgemusic

#

All it is just a link, I can't just store it in an array

#

Doesn't seem to warrant a whole new table

lyric mountain
#

fat columns are worse than another table

#

simple thing, just parent_id, id and url

sharp geyser
#

πŸ˜”

lyric mountain
#

id being sequential

sharp geyser
#

thats another thing I'd have to query for

#

😭

solemn latch
sharp geyser
#

I guess I can use joins

#

but idk

lyric mountain
#

if you really want to avoid another table, then you can use a json column

#

json includes both {} and []

sharp geyser
#

A relational database is meant to map out relations of data you are storing.

#

Its optimized for it as well, it just is a little annoying imo having to query for it.

lyric mountain
sharp geyser
#

Cause there will be cases where I might need information on the account, and then I also have to get the image urls at the same time

lyric mountain
#

also you risk getting your car broken and causing a congestion in traffic

sharp geyser
#

w3 sucks at explaining anything

solemn latch
#

I mean, I understand it.
At the same time, its just weird that adding more tables is so often better.

sharp geyser
#

its meant and optimized to handle such things.

#

honestly I sometimes feel like the array data type was added just to make people happy πŸ’€

#

I hardly ever use it myself

lyric mountain
#

I do use a json column on my bot, for storing match history

solemn latch
#

I use Json for storing discord embeds πŸ‘€

lyric mountain
#

cuz the data simply cannot be converted to a table

sharp geyser
#

that's fair

sharp geyser
lyric mountain
#

custom embeds likely

solemn latch
#

yeah, webhook-topgg v2 does

sharp geyser
#

ic

solemn latch
#

still not published πŸ‘€

#

I made it like 3 or 4 months ago

sharp geyser
#

didnt you use websockets at one point for that project

solemn latch
#

yeah, websockets is ready, its also not published

#

lmaoo

sharp geyser
#

πŸ’€

#

Also join statements

solemn latch
#

I dont have time to give support to people. or I just dont want to

sharp geyser
#

I know there is LEFT JOIN, INNER JOIN, and just JOIN (possibly missing a few) wtf are the differences

lyric mountain
#

I have a neat graph for this, sec

sharp geyser
#

Oh god I love you haku

#

you have a graph for everything

#

😭

lyric mountain
sharp geyser
#

ngl, thats even more confusing

lyric mountain
#

left gets the left table, with null entries when there's no match on the right side

sharp geyser
lyric mountain
#

right join is the opposite

sharp geyser
#

So basically, in a left join, if B is null then it returns A?

lyric mountain
#
LEFT JOIN = A required | B optional
RIGHT JOIN = A optional | B required
INNER JOIN = A required | B required
OUTER JOIN = A optional | B optional
sharp geyser
#

hm

lyric mountain
#

A being whatever is before the JOIN keyword, B being what's after

sharp geyser
#

So basically lets say I have Table A and Table B, in the scenario of LEFT Join if table A returns null then it will only return B or will it error?

lyric mountain
#

LEFT will fill with null on the B side

#

like, "Get everything on A, fill B with null if nothing matches"

sharp geyser
#

πŸ€”

#

I think I get it now

#

So you use LEFT Join when you are okay with B possibly being null

lyric mountain
#

yes

#

basically you WANT only A side, B is whatever comes

sharp geyser
#

gotcha gotcha

#

Also I noticed there is FULL OUTER JOIN

#

what is that

lyric mountain
#

full outer is "random bulshit go"

#

get whatever is in either side

sharp geyser
#

icic

#

So in most cases I will probably be using inner and right/left join

lyric mountain
#

like when you want the data, you dont care if there are orphans or rows without head

#

you want the data now

#

you'll usually use inner, then left sometimes

#

right is pretty rare, outer means ur doing something wrong

sharp geyser
#

story of my life right there

lyric mountain
#

there's also lateral join, when you dont want to link data, you just want them on the same query

sharp geyser
#

why so many joins

lyric mountain
#

SELECT * FROM tableA a, tableB b basically

lyric mountain
#

than to lack it

sharp geyser
#

fair enough

#

as jack harlow said "I got options"

#

Now then, off to fuck up my db tables even more!

#

Also wait

#

in regards to the product image table

#

Should I put the FK on the product table or the image table

lyric mountain
#

image

#

you cant reference all images from product table

#

but you can reference a single product from images

sharp geyser
#

Also, I was thinking of storing how many products the person already has listed in the seller table, though that would honestly just add another db call that i'd have to make

#

actually then again not really.

lyric mountain
#

dont be afraid to make read calls, those are the fastest to execute

sharp geyser
#

πŸ‘

#

So if I am wanting to get the product images, but also the product information would I just inner join on the product_image table?

#

something like

SELECT * FROM product_image pimg INNER JOIN product p WHERE pimg.product_id = id
#

idk how the hell this works yet so I am taking a wild guess

lyric mountain
#

select from product, join with images

#

as product is the parent

sharp geyser
#

how would that look then, cause I feel like even what I was doing is syntaxically wrong

ionic schooner
#

thats very interesting

lyric mountain
#
SELECT * FROM product p INNER JOIN product_image pi ON pi.product_id = p.id
ionic schooner
#

I didn't know you could create aliases like that

sharp geyser
#

πŸ€”

#

how does it know what product to look for though

lyric mountain
#

ON clause

#

it links the columns

sharp geyser
#

yes but you are telling it a product id to look for

lyric mountain
#

just add a where after it

sharp geyser
#

Oh, ok I was confused I thought ON was like that

#

never even seen the ON keyword before

lyric mountain
#

ON is for linking tables

#

so you tell that A = B

sharp geyser
#
SELECT * FROM product p INNER JOIN product_image pi ON pi.product_id = p.id WHERE product_id = id
#

?

lyric mountain
#

yep

sharp geyser
#

or would itbe where id = id

#

cause I am selecting from the product table

lyric mountain
#

either will work, they're the same value

sharp geyser
#

oh okay

lyric mountain
#

just remember to use aliases when working with join

#

else it'll throw an error if a column with that name exists on both sides

sharp geyser
#

so WHERE pi.product_id = id?

lyric mountain
#

yes, if id is a param

sharp geyser
#

gotcha

#

thanks so much haku

lyric mountain
#

yw

sharp geyser
#

hopefully my current db tables are now properly made

#

ima cry if I have to rework them again

lyric mountain
#

since with left/right one of the sides might be null

sharp geyser
#

Oh thanks :D

sharp geyser
#

so we can link products to business accounts

#

:p

sharp geyser
#

@solemn latch yo, is your webhook stuff open source?

solemn latch
#

nah, but its nothing fancy

sharp geyser
#

:c

#

I wanted to help

solemn latch
#

tbh, its such a mess I dont think you can πŸ˜„

sharp geyser
#

well I am always down to help if you want!

#

I need to get more projects under my belt

solemn latch
#

front end or backend?

#

or both

sharp geyser
#

I am a backend dev

#

so thats where I am strongest

eternal osprey
#

hey guys, any suggesstions on this page or is it good as is?

sharp geyser
#

It might just be me, but what is with sites using such bright colors randomly.

#

to me it doesn't look good, but it seems to work so idk

eternal osprey
#

it's my site theme

#

spacy vibe

slim dirge
#

Hey folks! kittywave

General question for all:
How do you go about collecting feedback from users about your bot(s)? More specifically, do you rely solely on users joining your bot support server and reaching out there? Or do you have a feedback mechanism of some description that enables users to provide feedback remotely from their servers?

Thanks!

sharp geyser
#

Well, you can do it several ways. Direct them to your discord server, or you can make a command for collecting feedback. Personally with the new modals i'd opt for making a command as its easier and some people are less prone to joining servers. You can just have it send to a webhook integrated into a channel of yours :D

solemn latch
#

Honestly, if your bot has enough traction to get useful feedback they will give feedback

#

as long as your bots support server is easy to find

sharp geyser
#

Fair, most peole I find tend to avoid joining servers

quartz kindle
#

i've found that the vast majority of feedback are worthless

sharp geyser
#

eh, its a 50/50

quartz kindle
#

people send you nonsensical suggestions and ask you to implement idiotic features that have nothing to do with what your bot is about

sharp geyser
#

Most of the time its just people trolling or giving you unintelligable words.

#

Though there are those who also give good feedback

sharp geyser
quartz kindle
#

"can you please add pokemons"

sharp geyser
#

Uh sir, this is a mcdonalds

quartz kindle
#

no its kfc

sharp geyser
#

no its patrick

quartz kindle
#

kebab football club

sharp geyser
quartz kindle
sharp geyser
#

I am not surprised

#

Lowkey want to go work at a burger place and just pick up the phone and say that.

#

It's worth getting fired

quartz kindle
#

lmao

sharp geyser
#

work at chicfila

#

so I can get fired for giving them free advertisement

#

:^)

quartz kindle
#

xD

sharp geyser
#

@lyric mountain I am running into some issues regarding the new db configuration you helped me with.

#

I am noticing that due to me creating a fk between the id field on the business table and the business_id field on the product table I am needing to keep a lot more data in session than I would initially like. I mean its not necessarily a problem, but as it stands now I keep the student_id generated by the table, the account id generated by stripe when I create a connect account, and now the business id generated by the table, which also holds the account id generated by stripe.

#

Is it ok to not create a fk with the primary key of a table? If so that would be more ideal

real rose
#

you just need to make sure its still unique

sharp geyser
#

okay thank god

#

I'd rather not store 3 points of data relating to the user

real rose
#

understandable

sharp geyser
#

Session bloat go brrr

real rose
#

you GOTTA MAKE SURE that you got the right user

sharp geyser
#

ong

#

gotta make sure they didn't change their identity within 3m (yes this is a jab at discord)

real rose
#

if (data.accountid == data.businessid == data.clientid == data.shopperid) {
is_client = true
}

sharp geyser
#

thats the most beautiful code i've ever seen

#

chef kiss if I do say so myself

#

Gotta compare their SSN as well

#

make them enter it each time they login

#

No identity theives getting past me today

#

better yet saliva swab

real rose
#

bro you gotta use biometrics

#

fingerpint

sharp geyser
#

they gotta wait 2-3 business weeks before they can login

#

Gotta make extra sure they are who they are yknow

#

I might take a page out of @humble gyro book and introduce login reviewing

#

On a serious note, I swear every time i touch this damn database its like I am closer and closer to going insane

#

I've reworked this database like 10 times

#

today...

#

Oh I have a funny little bug I can't solve myself

#

For some reason sqlx thinks I am trying to parse a string into i32

#
 let price = (product_data.price.parse::<f64>().unwrap() * 100.00) as i32;

unless its talking about this? I doubt tho because this didn't become a problem until I started changing the text datatypes to varchar/char

sharp geyser
solemn latch
sharp geyser
#

I mean

#

Drag me in 😏

dusky idol
sharp geyser
#

Ima be real I cannot

#

I’m not a python dev nor have I ever used that library

dusky idol
sharp geyser
#

As far as the people I know, no one uses that lib

#

Though, it really shouldnt be hard to figure out if you read the docs for the library.

#

I just don't know where to look myself

dusky idol
# sharp geyser I just don't know where to look myself

I see, let me summarize it for myself once
The library I'm using only allows me to have 100 connections open at once or something
I can reduce the lag to some extent if I do connection pooling
Both points are correct?

sharp geyser
#

Connection pooling can indeed help mitigate the lag.

#

If you are running into lag and it indeed is a connection issue that is

dusky idol
sharp geyser
#

Seems so weird

frosty gale
quartz kindle
quartz kindle
#

nvm, it doesnt do what i thought it did

feral yacht
#

i have command called download which downloads the video link u provided(yt) and sends it in discord

#

does it break tos tho

#

tos of discord

lyric mountain
#

might break if the video is nsfw

#

but it surely does break yt tos

feral yacht
#

oh yeaa iforogor about yt nsfw

hard dust
#

its scratch on steroids KEKW

frosty gale
#

i get what its supposed to do but i dont think it helps anyone

#

maybe people unable to write any code syntax and have to have a gui with links to visualise it

wheat mesa
#

Yeah but if you get thrown into the pool enough times you’ll learn how to swim. Keep your floaties on and you’ll never learn how to swim

#

At least that’s my thoughts about GUI based programming

sharp geyser
#

It’s cool in concept, but promoted bad practices amongst the programming community. It teaches you virtually nothing

quartz kindle
#

i got the re-verification message from discord lmao

#

In order for your app(s) to remain verified, you are required to re-verify your identity by 5 Jul 2024. Failure to comply by that date may result in action against your application(s), which can include, but is not limited to, removal of verification.

#

discord threatening me

sharp geyser
#

I have a video file, and there is apparently something hidden either in the video itself, or in the file itself. Do you know of anyway I can try and find this out? It could also be hidden in the audio.

harsh nova
#

Anyone happen to know a good mailing API? zoomeyes Building a prototype for uni and need one for delivering password reset links but my search has been fruitless so far

#

Mailjet instantly suspended my account as soon as I made it. Same goes for sendgrid. Trying my luck with postmark

sharp geyser
#

mailersend

#

It's what we use

#

πŸ‘

harsh nova
#

Thanks!

lyric mountain
#

u could try to re-encode the file to something else, since this will wipe anything hidden inside it

sharp geyser
#

Problem is I dont have the original files

frosty gale
sharp geyser
lyric mountain
sharp geyser
#

I've examined the audio as much as I could and no anomolies appear there

lyric mountain
#

a properly steganized (?) file will have no noticeable difference from a clean file

#

aside from being larger

sharp geyser
#

ic

frosty gale
#

depends on what it is

sharp geyser
#

I don't know how they expect you to find it hidden in a youtube video

frosty gale
#

i assume this is some type of CTF

sharp geyser
#

πŸ’€

sharp geyser
#

Just a content creator I follow posted a challenge with a reward

#

Thought i'd give it a shot

#

but its all in a youtube video so idk how tf they expect people to find whats hidden

#

I've examined every frame, looked at the audio I could

frosty gale
#

i wouldnt trust that to remain in there after youtubes compression unless they posted the raw file somewhere

#

or theyve done something else to it

sharp geyser
#

Yea

#

I've grabbed the video and messed with the contrast to see if there is anything hidden, but that doesn't seem to matter

frosty gale
#

its probably a lot more complex than that

sharp geyser
#

Oh definitely

frosty gale
#

an understanding of the mp4 format would probably help too

sharp geyser
#

All I know is its a 16 character code

frosty gale
#

on a binary level

sharp geyser
#

dont know if its alphanumeric or not

sharp geyser
quartz kindle
#

if the author of the challenge posted the video on youtube, then i doubt he meant for people to examine the video file

sharp geyser
#

Yea

#

Didn't hurt to try

#

πŸ’€

quartz kindle
#

it has to be something visual

#

or audible

sharp geyser
#

I've examined every frame literally staring as close as I could

#

nothing stood out

quartz kindle
#

stare closer

#

until your nose gets wrapped into another dimension through your screen

sharp geyser
#

One thing that is weird is the only time he used color in the text was the same color as his shirt

frosty gale
#

i mean it wouldnt be a challenge if it was easy to figure out

sharp geyser
#

I suck at puzzles

lament rock
#

Probably better than the people who are in mobile game ads

#

probably

sharp geyser
#

I am already stumped so looks like its not meant for me

dense berry
#
Vote listening on port 4599
Connected to Redis
Web server listening on port: *2000
Connected to the database
Created shard: [0]
Presence status updated.
Logged in as Melody#9082
node:events:496
      throw er; // Unhandled 'error' event
      ^
Error: listen EADDRINUSE: address already in use :::4599
    at Server.setupListenHandle [as _listen2] (node:net:1897:16)
    at listenInCluster (node:net:1945:12)
    at Server.listen (node:net:2037:7)
    at Function.listen (/home/container/node_modules/.pnpm/express@4.18.2/node_modules/express/lib/application.js:635:24)
    at file:///home/container/apps/music-bot/dist/events/interactionCreate/vote.js?t=1715220653062:67:5
    at ModuleJob.run (node:internal/modules/esm/module_job:222:25)
    at async ModuleLoader.import (node:internal/modules/esm/loader:323:24)
    at async #buildEvents (file:///home/container/node_modules/.pnpm/commandkit@0.1.6_discord.js@14.13.0/node_modules/commandkit/dist/index.mjs:656:33)
    at async EventHandler.init (file:///home/container/node_modules/.pnpm/commandkit@0.1.6_discord.js@14.13.0/node_modules/commandkit/dist/index.mjs:638:5)
    at async #init (file:///home/container/node_modules/.pnpm/commandkit@0.1.6_discord.js@14.13.0/node_modules/commandkit/dist/index.mjs:775:7)
Emitted 'error' event on Server instance at:
    at emitErrorNT (node:net:1924:8)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  code: 'EADDRINUSE',
  errno: -98,
  syscall: 'listen',
  address: '::',
  port: 4599
}
Node.js v20.12.2

How come when I try to set-up the port for the vote listener that it keeps repeating?

solemn latch
dense berry
#

I don't think so since it logs that the vote listener is listening on that port right?

solemn latch
#

webserver is listening to 2000, but something else on the server/computer could already be using 4599

dense berry
#
app.listen(PORT, () => {
    console.log(`Vote listening on port ${PORT}`);
});

If that were true, it shouldn't send this console message idk

solemn latch
#

is your bot sharded?

dense berry
#

yeah

solemn latch
#

well thats likely it, you're running this code on each shard. so its opening the first one, then the second shard launches and it cant open on the same port

dense berry
#

ah

solemn latch
#

my reccomendation is only let it run on the first shard, then use broadcast/broadcast eval if you need it to run on a specific shard.

dense berry
#

oh that's smart

dense berry
#

Anyone know why when trying to export this function, the bot initialization stops half-way through?

export async function isLockedCommand(commandName, userId) {
    try {
        const voted = await hasVoted(userId);
        
        if (!voted) {
            const lockedCommands = ['bassboost', 'volume', 'web', 'vocalboost', 'setdjrole', 'loop', 'shuffle'];
            if (lockedCommands.includes(commandName)) {
                const user = await client.users.fetch(userId);
                const embed = EmbedGenerator.Error({
                    title: 'Error!',
                    description: 'In order to use this command, you must `/vote`.',
                });
                await user.send({ embeds: [embed] });
                return true;
            }
        }
        
        return false;
    } catch (error) {
        console.error("Error in isLockedCommand:", error);
        return false;
    }
}
sharp geyser
#

Any errors?

dense berry
#

None, which is why it's weird. It just stops @ "database initialized"

sharp geyser
#

How are you using the function

#

Cause this tells us virtually nothing

dense berry
#
import { isLockedCommand } from '../../events/interactionCreate/vote.js';

export async function run({ interaction }) {
    if (!interaction.inCachedGuild())
        return;
    await interaction.deferReply({ ephemeral: true });
    
    const userId = interaction.user.id;
    const isLocked = isLockedCommand(data.name, userId);
    
    if (isLocked) return;
sharp geyser
#

okay, then isLocked is returning true so that narrows it down

#

The only case it returns true is if they have not voted, and if they are running a command that is vote locked

#

So log voted and your if statement condition lockedCommands.includes(commandName)

dense berry
#

How come it just stops the bot init?

sharp geyser
#

I just told you why....

#

isLockedCommand is returning true

dense berry
#

o

sharp geyser
#

if(isLocked) return if isLocked is a truthy value, you return

sharp geyser
dense berry
#

ok gotcha

minor epoch
# dense berry ok gotcha

Not trying to self promote a server but join the official discord developers server. very helpful for people learning.

deft wolf
#

Discord Developers is one big mess and most people ask questions there and write about off-topic topics

#

I'd rather ask Tim flushedCat

spark flint
#

lol

frosty gale
quartz kindle
#

lmao

eternal osprey
#

gey guys this is my new login page, what yall think?

lyric mountain
#

looks incredibly similar to crowdin

#

but well, you cant really stray too far from this layout anyway

#

looks fine

deft wolf
#

For me, there is too much free space on the left panel. I think it would be possible to increase the font a bit to at least fill the gap at the bottom

real rose
#

you'd want to center the content vertically

eternal osprey
real rose
#

id also personally keep the text content to a minimum as its a login page, you shouldn't be putting too much info there as the goal is for someone to not spend too long on the page really

real rose
#

notice the crowdin one posted by Kuu has both sides in the vertical middle

eternal osprey
#

i see

#

much better yeah

lyric mountain
#

I think it's a bit redundant to say "Please login by providing blablabla"

#

since u already have captions below

#

(u also state on the left side)

eternal osprey
#

crazy forgot that

real rose
#

and yeah, don't comment the obvious parts kek

meanwhile me finishing college and commenting "here is the start of my loop" 🧍

real rose
# eternal osprey much better yeah

also something that's just me personally, I would tighten up the layout here. Make the gaps a bit smaller on the right side. The distance between email and login button seems unnecessarily far

#

but that could just be me kek

eternal osprey
#

i see i can try to do that!

#

i guess this is the finished product

#

I mgiht make that saturnus on the top instead of bottom as rn it seems goofy

real rose
#

clean

eternal osprey
#

why is frontend so hard

real rose
#

based

lyric mountain
eternal osprey
#

i am just not creative tbf

real rose
#

i enjoy front end

#

im not amazing at it

#

but yeah

eternal osprey
#

i enjoy it as well but still

real rose
#

if you typed that out, you get brownie points

eternal osprey
real rose
#

i love the first / second value comments

#

funniest ones

eternal osprey
#

my cs teacher would literally give you -1p for each pre condition you forgot.

real rose
#

no shot

#

lmfaooo

eternal osprey
#

my comments actually go crazy 😭

lyric mountain
#

part of why I'm lazy to write libs

#

I mean, the method names are awfully obvious

#

but I cant publish if I dont write the javadocs

#

I mean, I can, but the score goes to the ground

sharp geyser
neon leaf
#

imagine having comments ‼️

sharp geyser
#

imagine coding

neon leaf
#

imagine having a pc

sharp geyser
#

thats too far

neon leaf
hidden gorge
#

Is channel.permissionOverwrites still a thing?

sharp geyser
#

idk look at the docs

green kestrel
#

my multilingual stuff is now live in my latest bot, only took 4 days to generate all the language text for an 80,000 word interactive story while respecting the rate limits of the API I was using!

#

an insane amount of requests were made

lyric mountain
#

I'm still in process of translating my cards to english

#

I mean, they are translated already by ai, but I need to proofread

sharp geyser
#

10 cents a word

#

😏

lyric mountain
#

I'd go broke lul

sharp geyser
#

Aint got nothing better to do with the 8h I do nothing

#

πŸ’€

frosty gale
#

simple as going google_translate("text here", "TARGET_LANGUAGE") and youre done

sharp geyser
#

Just pull a top.gg and have a community translation

frosty gale
#

i really dont get why people do this kind of stuff unpaid

#

this is literally a for profit company

#

youre being used

#

this is not a charity

lyric mountain
#

It's good to get experience

frosty gale
#

minus the completely disrespectful part of it on the company's end

sharp geyser
frosty gale
#

you can help out if you want to sure nothing stopping you i just personally wouldnt do it knowing im helping a cause with no enumeration

sharp geyser
#

I dont think anyone who does translations here think about the money they could be making. They just think about the community they could be helping.

lyric mountain
#

and u can also use it if you need to cite previous experiences

sharp geyser
#

I think translating for top.gg is a good oppurtunity to gain experience

#

Some of the people here could quite literally make a job out of it

frosty gale
#

if it was a charity or some other similar organisation it would be fine but these guys have the capacity and money to compensate at least a small amount to individuals taking their time to help out

sharp geyser
#

Right...but the people who are doing so do it because they want to

#

It'd be nice if it was a paid position, then again translations started even before top.gg became its own company and had the capacity to hand out payments

shell tundra
#

@sick bear I'd appreciate if you didn't ghost ping me πŸ™‚

deft wolf
frosty gale
sharp geyser
#

πŸ’€

frosty gale
#

but like come on

sharp geyser
#

thats a very big stretch

sick bear
sharp geyser
#

Comparing volunteer work to slavery is crazy

#

πŸ’€

shell tundra
frosty gale
#

if they were forced to do it then it would be borderline slavery

sick bear
frosty gale
#

without being compensated either

sharp geyser
#

Okay but its literally them volunteering

#

by that same logic you are calling the brs slaves

shell tundra
#

No ones being forced to do anything

sharp geyser
#

πŸ’€

frosty gale
#

i never said it was anything otherwise

#

you said theyre doing it because they want to

#

and i said yes, otherwise it would be considered x

sharp geyser
#

right, but there is no need to make that connection because its just not there

harsh nova
#

This is the wrong channel for this

frosty gale
lyric mountain
#

well, this is a different case tbh

#

I see the translator role more like open source contribs

#

since u dont have a quota

frosty gale
dim rapids
mortal gyro
#

Is this the Pavlov discord

sharp geyser
#

no

mortal gyro
#

Ok

neon leaf
deft wolf
sharp geyser
frosty gale
# neon leaf

you are cooked if you need this and need to quit tiktok

sharp geyser
#

Is there a way to get the raw voice packets from discord?

#

Looking at the docs I see no way

hidden gorge
#

why

sharp geyser
#

What other reason would you need raw voice packets

#

πŸ’€

hidden gorge
#

to spy on peopple?

sharp geyser
#

Yea no, im not you

#

:D

hidden gorge
#

what....

sharp geyser
#

I need to be able to record & download conversations in vcs. As that is the entire purpose of the bot, let people record their conversations

lyric mountain
#

Is that allowed by the tos?

sharp geyser
#

Yea

#

So long as you are not using it nefariously

#

I've known a few bots that have done it, but they stopped because they got bored

#

but there is a popular bot that still does it, its in the thousands in terms of server usage

lyric mountain
#

Well, I think u can get the audio stream from a channel

#

If the bot is connected there

sharp geyser
#

You can, its just undocumented

lyric mountain
#

Afterall, the client needs this info to play the audio

sharp geyser
#

Which means its super duper annoying to do

lyric mountain
#

Check if jda has it

#

If you find a jda method it'll likely be similar for js

sharp geyser
lyric mountain
#

Whatever u use then

sharp geyser
#

songbird

lyric mountain
#

What's songbird?

sharp geyser
#

rust voice gateway lib

ionic schooner
radiant kraken
#

RUST you say?

#

@sharp geyser let's make one together

sharp geyser
#

what

#

make what

sharp geyser
radiant kraken
sharp geyser
#

I mean sure

#

Idk how the hell it works but we gaming

radiant kraken
#

lmaoo

#

we have so many big projects on our hands

#

cc, a game, and now this

sharp geyser
#

game might not happen tbh

#

Its interesting, but realistically what we gonna do 😭

ionic schooner
radiant kraken
sharp geyser
#

nah ima do it when I have time

#

but its definitely not the focus

radiant kraken
#

yeah we gotta take it one step at a time

sharp geyser
#

We got limited time to work on CC together

#

a bot is more laid back

radiant kraken
#

so now the focus is on our bot?

#

or cc

sharp geyser
#

CC & Bot

radiant kraken
#

alrighty

#

btw aaron i'm afraid i can't work on CC with you today, i'm really sleep deprived

sharp geyser
#

All good!

#

its a chiil day for me today

#

Wasnt feeling the best

radiant kraken
#

same

dusky idol
#

@sharp geyser Hey I had to ask smth
Let's say for example theres a command sending a request to mongodb and 20 people run it at once
How will the bot fetch data in such case?
Is it going to be one by one, like it takes first request, gives data back and so on 20 times
Or the amount of requests doesn't matter it'll just take all 20 requests at once and give data?

Because if it's the first case, I can see where the delay is coming from

sharp geyser
#

Realisitcally that's fine.

#

It creates 20 different connections, and when its done with the data closes those connections.

#

Databases though are meant to be able to handle that much at least.

#

(I might be wrong on the part about it creating 20 separate connections)

wheat mesa
#

Yeah that's not right

sharp geyser
#

Thought so

wheat mesa
#

Connections != requests

sharp geyser
wheat mesa
#

If you set it up like that then sure you could probably have a pool of 20 connections but realistically you probably have 1 connection

#

20 requests is absolutely nothing for a db though

sharp geyser
#

Yea

#

Once it starts getting into the hundreds of thousands is probably where it starts tripping up right?

wheat mesa
#

Depends on what queries there are

#

Databases are really fast

pearl trail
#
discord.js

discord.js is a powerful Node.js module that allows you to interact with the Discord API very easily. It takes a much more object-oriented approach than most other JS Discord libraries, making your bot's code significantly tidier and easier to comprehend.

sharp geyser
pearl trail
#

do people actually prefer dsharpplus more than discord.net?

sharp geyser
#

ngl forgot dsharpplus was a thing

#

πŸ’€

#

I haven't touched C# since unity

#

Which was in like 2022

pearl trail
sharp geyser
#

How is your bot coming along tho

#

@green kestrel is it possible to get raw voice packets with D++?

#

Or does the lib not support it

pearl trail
sharp geyser
#

πŸ’€

#

you should look at java docs

#

I dont use java anymore thank god

#

but the docs for those packages were atrocious 9/10 times

pearl trail
radiant kraken
#

do u know how to convert raw pcm streams to mp3 files

sharp geyser
#

The problem is the pcm file is not made correctly

pearl trail
sharp geyser
#

we figured it out

pearl trail
#

!!!

dusky idol
# wheat mesa 20 requests is absolutely nothing for a db though

I just took that as an example number,
by "connection" or "request" i meant stuff like:

data = await bot.db.economy.find_one()

etc.
If 100s of people are running the command at once, it does make the bot slow overall I assume because that's what is happening.
I was wondering if the database replies to all such requests individually or it takes them all in at once

pearl trail
#

the speed or operations/sec your db can handle is all depend on the hardware it's hosted

gaunt echo
#

None of the commands registers and doesn't work. I don't know how to fix it either, I can't find it on the internet.

serene horizon
gaunt echo
serene horizon
#

oh tabulate sucks

neon leaf
#

my head is breaking

node:_http_outgoing:632
    throw new ERR_INVALID_CHAR('header content', name);
          ^

TypeError [ERR_INVALID_CHAR]: Invalid character in header content ["content-disposition"]
    at storeHeader (node:_http_outgoing:580:5)
    at processHeader (node:_http_outgoing:575:3)
    at ServerResponse._storeHeader (node:_http_outgoing:451:11)
    at ServerResponse.writeHead (node:_http_server:422:8)
{
  'content-type': 'text/html',
  'accept-ranges': 'bytes',
  'access-control-allow-origin': 'localhost:8000',
  'access-control-allow-headers': '*',
  'content-length': '196',
  'content-disposition': 'inline; filename="e.html"'
}
sharp geyser
#

the only thing I could think of is the double quotes

#

pretty sure thats not needed

#

should be able to just do 'inline; filename=e.html'

sharp geyser
#

everything else there looks normal

neon leaf
#

same issue

sharp geyser
#

hm thats weird

#

no way its because of inline; right?

frosty gale
#

i dont think using a content-disposition of inline accepts any further parameters

sharp geyser
#

oh you're right

frosty gale
sharp geyser
#

it's attatchment I think

neon leaf
frosty gale
#

setting the header and sending the response?

neon leaf
#

this.responseHeaders is the json object i sent

#

res is from node:http

frosty gale
#

aaaah

#

i think i know what youre doing wrong

#

when providing multiple parameters in a header value it wants you to use an array i think

#

instead of
'content-disposition': 'inline; filename="e.html"'

#

youd likely do
'content-disposition': ['inline', 'filename=...']

neon leaf
#

only if you want the header to be set multiple times

#

I use that for set-cookie

frosty gale
#

can you try it anyways in case it works? it looks promising

#

without the ; ofc

neon leaf
#

same error

frosty gale
#

im not sure why its not working for you, i tried this with the http module and its setting the header and replying with it just fine

response.writeHead(200, "OK", {
    'Content-Type': 'text/plain',
    'Content-Disposition': `inline; filename="ah.html"`
});

neon leaf
#

can you try sending a head request from the client instead of get

#

ok I seem to have found the issue

#

its because I am setting content-length

frosty gale
#

seems to work as well

frosty gale
neon leaf
#

but why would that cause it

#

shouldnt a head response contain content-length for the get request

sharp geyser
#

Maybe it was going over the length you set?

frosty gale
#

by setting content length you are implying in the http request that you are also sending back a body

#

a head request is only for taking a look at the actual headers

#

so http spec doesnt allow setting a body

neon leaf
#

well

#

I am not sending a body

#

I am adding the header though because every cdn I ever headed returns it too

frosty gale
#

content-length is the amount of bytes you are sending for the body itself

#

if you dont send a body then thats even worse

#

because the request will likely also get stuck waiting on a body thats never going to come

#

technically implementations should ignore the body if it gets sent, but since you havent actually sent a body back in the head request it likely glitched everything out

neon leaf
#

@frosty gale I found the actual issue

#

its so stupid

#

the content-disposition header has to come before content-length in the header list

#

like what ????

sharp geyser
#

so why not aet it that way

eternal osprey
#

2 problems, first, how do i make the container-fluid div take the whole height...
Second,i can't scroll on mobile..

sharp geyser
#

you need to set the max height

eternal osprey
#
<div class="container-fluid">
  <div class="row">
    <div class="col-md-6 p-0">
      <div class="d-flex flex-column justify-content-center align-items-center"
        style="background-image: url('./layered-peaks-haikei-2.svg');">
        <p class="mt-5 pt-5 text-light fs-3 fw-bolder">text!</p>
        <p class="text-center mt-2 w-75 text-light fs-6">text</p>
        <p class="pt-2 w-75 text-light fs-6 text-center">text</p>
        <div class="d-flex flex-column p-5 pt-1">
          <img class="w-25 img-fluid p-0" src="uranus-svgrepo-com.svg">
        </div>
      </div>
    </div>
    <div class="col-md-6 p-0">
      <form class="loginForm d-flex justify-content-center flex-column">
        <p class="p-5 pb-0 fs-1 fw-bold m-0">Sign in</p>
        <div class="d-flex flex-column p-5 pt-0 pb-0 m-0">
          <p class="mb-0 p-0 mt-5 fw-light">Email Address</p>
          <input class="form-control form-control-lg" id="typeEmailX"
            style="border-radius: 0; border: none; border-bottom: 2px solid #250656" type="email">
        </div>
        <div class="d-flex flex-column p-5 pt-2">
          <p class="mb-0 p-0 mt-3 fw-light">Password</p>
          <input class="form-control form-control-lg" id="typePasswordX"
            style="border-radius: 0; border: none; border-bottom: 2px solid #250656" type="password">
          <button style="color:white; background-color: #250656" id="loginForm" type="submit"
            class="fw-bolder mt-5 btn">Login</button>
        </div>
        <div class="d-flex flex-column p-5 pt-2 align-items-center">
          <p class="fs-6 fw-light">Forgot Password?</p>
          <p class="fs-6 fw-light">No account? Create one!</p>
        </div>
      </form>
    </div>
  </div>
</div>```
eternal osprey
sharp geyser
#

what part are you concerned about

#

thats a lot of html

eternal osprey
#

That's the whole thing

eternal osprey
#

idk how to fix those issues..

sharp geyser
#

oh you want it to look like what it does on mobile?

eternal osprey
#

look at my message:

2 problems, first, how do i make the container-fluid div take the whole height... (refer to the picture that i sent that shows the div literally only reaching half of the screen in height).
Second,i can't scroll on mobile.. (refer to the mobile picture)

sharp geyser
#

well set the container to take the max height of the viewport

eternal osprey
sharp geyser
#

as for not being able to scroll, make sure you aren't setting overflow-y to hidden

eternal osprey
#

bombacalat

#
 <style>
      body {
        overflow: scroll !important;
      }
    </style>```
real rose
#

mobile size login page I would not make the user scroll to get to the text inputs

#

if they typed a password or email wrong itll scroll back to the top

#

and they gotta go down again

#

poor UX

real rose
eternal osprey
sharp geyser
#

Also, why are you explaining what the service does on the login page?

#

Shouldnt that be done on the home page

eternal osprey
#

Thanks for the input but at the moment it's not what i am asking 😭

#

I appreciate it tho

sharp geyser
#

Well, I dont really see whats going on

eternal osprey
#

i will change it later, but i gotta fix this first.

sharp geyser
#

Unless container-fluid has css properties overwriting what you want

real rose
#

should it not be

#

100%

#

not vh

sharp geyser
#

vh is view-height

real rose
#

yeah

#

so its gonna stop

#

at the screen size

sharp geyser
#

On mobile it should stop

#

which is why you'd set mobile specific paremeters (I cant fuckin spell)

real rose
#

but he that's the problem, no? Cus they can't scroll below the login button

#

to find the forgot pass n shiz

#

πŸ’€

sharp geyser
#

Well

#

That isn't necessarily the problem I don't think.

#

Either way, it'd fix the desktop issue if it was actually working

#

Unless the container-fluid div has a parent restricting its size