#development

1 messages · Page 263 of 1

static barn
#

that's what I'm trying to say that the tester didn't provide the perms that my bot needed

radiant kraken
#

uh, .catch(() => {}) 🤓☝️

static barn
pearl trail
radiant kraken
#

not really

#

some people are picky with what permissions they give to bots they invite

pearl trail
#

yeah and that also

static barn
#

Why the hell discord provided perms option then

radiant kraken
#

top.gg invites bots with no permissions because they don't want bots to nuke the verification center

static barn
#

You can't add a loop for every command

pearl trail
static barn
#

I don't know what to reply

#

🐱

pearl trail
#

like they don't want a bot to be able to ban members, then they disallow it. same thing goes with other perms

#

good luck!

static barn
#

Who invites a bot without permission

static barn
#

If they invite a bot without permission

#

Then they can use text command

#

Bot works same

#

in that case

#

The welcome message is for them

static barn
#

Hopefully

#

Else I'm tired 😴

bitter granite
#

thankyou zobs for this

long marsh
#

According to the Discord documentation, there is a rate limit of 50 API calls/second for bots?

#

But what if you're using the HTTP interaction endpoint and respond within the 3 second threshold? I effectively do zero API calls, correct?

#

I don't actually call back into Discord.

static barn
#

with these perms

static barn
#

discordjs

long marsh
long marsh
static barn
#

Would like to test? As normal person

#

if you have time

long marsh
#

I would normally, but I'm working on my bot at the moment before my daughter gets up 🙂

#

When she gets up, it's pretty much 0 free time from then on

static barn
#

problem

#

No problem just finish your work and play with her later 😁

bitter granite
# static barn I have sent a video

i just checked from our log, the bot indeed did not have a working help command, if you need more detail, you can dm the reviewer and wait for the respond

static barn
#

With the commands you mentioned above

pearl trail
#

guys, is AuditLogCreated event really exists?

earnest phoenix
#

uh yes?

pearl trail
#

lmao sorry, i was having trouble with the intents before. i asked that because the bot in discord.net's server replied with this

deft wolf
#

Bro

#

@topaz magnet support scam

#

Not this one

#

🤦‍♂️

#

@unkempt ocean

pearl trail
#

lmfao

#

harvey specter

unkempt ocean
#

thanks

idle solstice
#

Hi senior developers,

I am new here trying to learn. I have recently started using cogs to categorize my bot's commands.

In the attached image 1: I am showing how I am writing my help
In the attached image 2: I am showing how it gets displayed in discord

I know this is not the best way to do it. Because it says "No description given" for arguments. Google directed me here (https://discordpy.readthedocs.io/en/stable/interactions/api.html?highlight=commands command#discord.app_commands.Command.description) - But there are no information about arguments as a parameter.

Can someone please help me with this?

Thanks in advance

prime torrent
#

How can I open a ticket? topggSob

#

<@&817055174613794826>

abstract raven
#

❤️

deft wolf
spark flint
#

why do people straight away ping everyone known to man

vital mirage
frosty gale
#

your error handling could also make do with some work, opt in for more graceful errors like sending a message "user not found" instead of throwing an unhandled rejection

#

you also seem to surround your code with try {}, throw errors inside of the try {} and then in the catch {} you throw the error anyways? this defeats the point of using try catch

catch (err) {
  throw new Error(err);
}
#

for a simple improvement i'd change this to something like

message.reply(`Error while executing command: ${err.toString()}`);

if you dont mind your error messages being exposed

vital mirage
#

also just for now ive changed it to return a json of code and a message and that gets habndled by the command itself, so if its successful itll return code 200 with message 'Success' And then my command will ahve its own case for each code and reply dependent on that

vital mirage
sharp geyser
#

What exactly are you concerned about

surreal sage
#

casinochips

#

also consider using prisma or drizzle
only real difference is the schemas

earnest phoenix
sharp geyser
#

I see no difference in using mongoose and a orm

#

Tbh an orm is sometimes more limiting

earnest phoenix
#

orms are usually worse

azure trench
#

i have a question

#

i was thinking about making a code debugger for my bot which is powered by a trained neural network which when a user decides to opt in to mining crypto currency ingame and installs the miner the bot sends its errored codes aswell as the code debugger and the users computer simulates resolutions for ingame rewards, im assuming this is a no right?

#

is it against TOS for this kind of thing to exist?

digital swan
#

probably

azure trench
#

big sad

#

the best option would be to rent GPUS right

#

it kinda sucks

#

i was trying to think of game features that would be practical both ways

#

i can see whre it would be potentially dangerous though

digital swan
#

i think installing software onto user's computers for a discord bot is a big nono

#

especially to be part of a mining botnet it seems

azure trench
#

well

#

to the users it was going to mine ingame currency

#

but in reality it would be debugging my bots code

#

but yeah

#

if downloadable software is a TOS nono

#

im done for for that idea

#

fuck it was such a good idea too

digital swan
#

idk if it is but it would be a massive red flag no matter what

azure trench
#

yeah it would be a totally optional thing

digital swan
#

if your code is buggy to the point of needing to make an ai to search through it

#

i think you have bigger problems

azure trench
#

can a man with ideas and ambition not try

#

i too lazy to learn

#

my bot has turned on

#

and trained

digital swan
#

you'd need to learn a lot to make that

azure trench
#

with complex logic

#

already

#

and spawned cards

#

with 10 traits

#

and created simulations

#

without knowing to code

#

ty gpt

#

however

#

its still not good enough LOL

#

i have a few computers at home anyway

digital swan
#

chatgpt produces broken code? never heard that before

#

crazy

azure trench
#

i guess ill mine away solutions to my code with a locally created solution

#

my code is 10k lines+

#

its hard for it to not hallucinate

#

and easy to misalign

#

accross the 12 cogs

azure trench
#

im going to rewrite my bot in MOE structure

#

run by a neural network cluster

#

so i can be lazy

#

and watch it figure itself out

idle solstice
wheat mesa
earnest phoenix
idle solstice
# earnest phoenix You can, as I said, it uses docstrings

Sorry I misinterpreted. Thanks for confirmation.

In that case, I am defining arguments in my docstring. I assume the code will be able to read from there directly. But somehow it still throwing the error. Guess thats why I thought it is not allowed or something.

abstract raven
#

Hi

earnest phoenix
idle solstice
frosty gale
azure trench
#

but yeah

#

i see how its a bad idea

#

ive changed my strategy

#

to a self healing method

#

since now im running MOE

#

the experts now simulate fixes to missing inputs and reports the success rates of tested inputs to the admin

#

then asks the admin for permission to update the bot with the fix

wheat mesa
#

??

azure trench
#

what

#

it now does it on my computer

#

its to heal config alignments

#

because am trash

digital swan
#

Are you training to be a hacker in the next fast and furious movie

digital swan
azure trench
#

i just want my discord bot to work

#

idk why im making it really intelligent

#

i guess i want it to also be popular

#

the MOE structure can now self heal all json data and missing configurations

#

kinda lit

#

now i can monkey mash code into it

#

and it should deal with it ok over time

#

since its neural networks

#

idk

#

its fun though

#

managed to make o1 mini think 3 minutes about a code before

#

i terminated the thinking because i couldnt be bothered waiting longer

lament rock
#

Had to go through a lot of the commits of a lib I maintain just so I could add @since jsdoc tags. It'd have been a lot easier if the project didn't convert to TypeScript and also have its files purged once. On top of that, I wasn't a maintainer for as long as I was developing changes to the lib so the version actually exceeded what was on the origin by a lot and I had to drop from v6 all the way back down to v3. Had to to back and double check it wasn't before the version reset commit which just added up to about 4h of work for a relatively small commit :(

If you plan on working on a js lib, add your @since tags from the beginning

bitter granite
#

Wondering what perms does it need again for bot to lock threads

#

defo not manage channel right

lament rock
#

I use my lib to check perms needed cuz all the hard work is done

#

MANAGE_CHANNELS and SEND_MESSAGES

bitter granite
#

couse if like for example lock cmd

#

you need MANAGE_ROLES

lament rock
#

MANAGE_ROLES on top of MANAGE_CHANNELS is needed to edit permission overwrites for channels other than threads since threads are the only channels that can be locked

#

using the built in locked feature that is

bitter granite
lament rock
warped summit
digital swan
#

Would it not be best to only show the actual leaderboard entries?

warped summit
digital swan
#

Yes

warped summit
#

Lemme do it

warped summit
digital swan
#

“No data”

surreal sage
#

is prisma /w psql good for 4-5k writes per min

neon leaf
#

prisma is pretty slow

#

if you didnt start anything yet I recommend drizzle

#

might be a bit harder to get started with since it abstracts less though

digital swan
#

yeah i love drizzle

#

i just need them to add some sort of middleware feature and i'll use it for everything

prime cliff
#

Almost done aside from changing 2FA methods vibecat

#

Better 🙂

neat mauve
lyric mountain
#

that's definitely a project manager in the making

small tangle
# prime cliff Better 🙂

Do you plan to add sms as 2fa? pikathink Because if yes, id recommend not to since its considered insecure and you already provide passkeys and auth app as methods

wheat mesa
#

If someone is SIM swapping you to break your 2fa to your docker containers then you have bigger problems

sharp geyser
#

If someone cares enough to sim swap you then you have bigger problems

sharp geyser
#

Ok

lament rock
#

For context, SS7 is the backing technology of SMS/All phone calls that are not VOIP

lyric mountain
#

@ivory siren they got slight volume imbalance

#

Whatever that means

bitter granite
#

Most of the time they dont thou

#

Except major coin

deft wolf
ivory siren
#

-b 1239238884697702431 crypto scam id

gilded plankBOT
#

upvote killwish95#0 was successfully banned.

bitter granite
#

just checked its late

small tangle
#

And SIM swapping is not the only attack vector regarding SMS 2fa. They can be spoofed if a bad actor gets access to the phone network youre in

vital mirage
#

react with 🤷‍♀️ if you hope i fail

digital swan
#

easiest? probably any fullstack js framework. nextjs, sveltekit etc

long marsh
#

Do I need any special intents to direct message the installer of my discord app?

#

I'm looking to send a guide / reference the help server upon install through that mechanism

deft wolf
#

Sending a DM is never a good idea. Also I'm not sure if you are able to check who added your app to their account

feral aspen
#

For someone running out of storage on his PC (and not wanting to spend monthly on cloud), should I invest on a Synology NAS?

lyric mountain
feral aspen
#

I was recommended the DS723+ Synology NAS; however, I'm thinking of purchasing a used Synology NAS for maybe cheaper?

vocal ferry
feral aspen
feral aspen
#

^ considering its retail price is in the thousands of dollars $ - so not sure... do I go with a new model (low no. of bays & good network card) or older model?

vocal ferry
#

thats a bit old no? im not sure i havent really used their older products since i couldnt really afford them at the time lol

vocal ferry
#

if its just gonna be used as storrage you could probably get away with a terrastation

#

or linkstation i forgor my names

feral aspen
vocal ferry
#

whoops ment to write plex server lol

feral aspen
#

I'm not entirely sure if it's built for multi-tasking and simultaneous reading/writing

feral aspen
vocal ferry
#

like i have a regular ol NAS for just file storage, back ups of my pc, movies, and games. I could get away with a diy solution with open source stuff but I opted for Synology since is probably the most user friendly one ive used. The buffalo linkstation was fine but its "ups sync" thing didnt work and it died when my power went out

vocal ferry
feral aspen
feral aspen
vocal ferry
#

ohh i see its not for personal use

feral aspen
#

Not entirely sure if its OS will be similar to the OS of the newly bought NAS (forgot the os system called)

feral aspen
vocal ferry
#

its fine but i wouldnt try to stream multiple video files with it

#

can u pair it with a nuc?

feral aspen
#

I have no idea what that is, though you should be able to?

vocal ferry
#

not sure the exact definition, but just a sff pc that u can use to actual process stuff and just use synology as the nas.

feral aspen
vocal ferry
#

ds723+ is gonna be quicker but only 2 bays holds it back compared to the older one

#

723+ is what i would do, its just quicker and more powerful per bay. the 2514 only plus is just more raw storage

#

but if a nuc/pc comes into the question then it would be a harder question to answer lol

feral aspen
#

What is the role of the nuc/pc when purchasing a Synology NAS exactly?

long marsh
#

I’ve seen several of the larger bots do it

deft wolf
#

You do you, I advise against it

earnest phoenix
#

how do you get a game-bot to spread by word of mouth?

#

many people told me that the only way to effectively grow your discord bot is by word of mouth especially if it is something niche

#

i have more than a year (16 months) that I released my bot and it has only ~340 servers.

#

and those I got mostly by ads (spent around 30$ for ads till now)

#

and also by the free 15$ credit top.gg used to give back in the day

vocal ferry
# feral aspen Hmm, how does it differ? I hope I'm not missing something I'm supposed to unders...

Synology kinda mixes compute and storage together in their systems, in my humble opinion i think letting a nas be a nas and having a nuc handle all the computing would be the most cost effective option ($ to power). Now for most home users the computing solution in a synology nas is fine as they are 1-4 people households. When you go over 1gb/s r/w/network, or need to encode, virtualizes, or run any sort of service then off loading that off a nas's pretty weak hardware onto a stronger device

#

basically have the nuc/pc as your server and the nas as storage

feral aspen
vocal ferry
#

oh 4 people, man im thinking u got the entire extended family on ur plex server (i used to have that xd)

feral aspen
#

I think it's entirely up to me; better computing or more storage slots... both same price, one new & another used

vocal ferry
#

ive seen some ironwolf 16tbs go under 250 recently

#

(refurb)

long marsh
earnest phoenix
#

There are no specific numbers, but suppose your bot gets large and popular, ggs on getting it quarantined

#

Users add bots to servers
Servers have channels
Your bot highly likely can send a message in on of those
> Send in one of those channels..

long marsh
sharp geyser
#

@prime cliff you use OIDC with blazor right? How the hell do you get it to work. The docs on microsoft are so fucking confusing at best, and illegible at worst

#

Im tempted to make my own implementation, but i'd also rather not suffer through that

prime cliff
#

You mean with Discord oauth or your own user account stuff?

lyric mountain
#

it would be forbidden if for example you DM'ed multiple people on join, which is a no-no

earnest phoenix
#

even dming just the owner of the server is not ideal

#

they mention sending a dm to everyone because of how many dms it creates

#

which can be the same as dming hundreds of server owners during +- a minute timespan because they added your bot

#

though here again, discord never gives specific numbers for a reason

earnest phoenix
#

triggered by a user interaction, though will get your bot quarantined easily

sharp geyser
#

I cant seem to figure it out though with blazor

prime cliff
sharp geyser
#

wdym

#

Im trying to connect the client together so they can login. Is that not a blazor specific thing?

prime cliff
#

No not a blazor specific thing

#

You need to use asp.net itself and/or controllers/service

sharp geyser
#

Any articles you can provide?

#

The microsoft docs are not the most user friendly

surreal sage
#

keycloak gang

neat mauve
warped summit
#

I have a Discord leaderboard bot which updates automatically every x minutes….. give me a time I can make the bot update messages to avoid hitting frequent rate limit

warped summit
#

Then what to do?

lyric mountain
#

Have the users use the command when they want to see it

#

Discord doesn't really like self updating stats

warped summit
lyric mountain
#

Is that bot public?

#

Or private?

warped summit
lyric mountain
#

Then yeah, won't cut it

#

You'll be bottlenecked by the global limit

sharp geyser
#

Best way to do this is to make use of discord's own features

lyric mountain
#

For every server that uses that leaderboards will reduce your update bucket

sharp geyser
#

Post the leaderboard to a follow channel (whatever they are called), and force send it to all servers following that channel

#

Cool thing is, your bot can also have the server follow this channel itself so it can be part of your setup

lyric mountain
#

That has a limit too btw

sharp geyser
#

Sure

#

But you can do it daily

lyric mountain
#

Ah yeah

sharp geyser
#

Leaderboards don't HAVE to be real time

#

And if you want a real time leaderboard make a cmd for it

#

Otherwise sucks to suck

sharp geyser
#

That as well

#

But most people don't tend to make a website specifically for it

#

They prefer keeping it in one place either due to lack of skill, or the effort it takes

sharp geyser
#

Yea

#

Riding the rate limit isn't a good idea either

#

Its a quick way to keep getting rate limited and possibly perma banned from the api

#

Your goal is to not get rate limited, not to attempt to just barely hit it

lament rock
sharp geyser
#

Unless im reading that code wrong

#

It will keep trying, until its no longer rate limited

lament rock
#

The ratelimits are there for a reason. You won't get punished for following the rate limits

#

in fact, they want you to follow it

sharp geyser
#

Thats not what I mean

#

From my first glance it looks like they are just repeatedly hitting it, until a 429 is no longer given

lament rock
#

The only times you get punished is for 4XX status codes for cloudflare bans

#

Oh then yes back off

sharp geyser
#

Honestly I didn't really take a good look at the code so I might be wrong

#

Im currently sick so my brain wonky

lyric mountain
sharp geyser
#

Discord doesnt need to

#

cause cloudflare handles it for them trollface

#

CF is pretty quick with it

lyric mountain
#

That's why libs have internal buckets and ratelimiters to prevent reaching discord limit

#

Yep, a few dozens will get you banned for the day

lament rock
lyric mountain
#

Hm, I stand corrected then

warped summit
pearl trail
#

huh, this is kinda weird? or am i just having skill issue

sharp geyser
#

Question is, at which point is it 1

#

your IDE could be showing you what it was before / after something happened to WinnerCount

pearl trail
sharp geyser
#

Sure

#

It could be showing something cached, or maybe old data

#

Check the db, is it 0 or 1?

pearl trail
#

it is 1 indeed

sharp geyser
#

How is data being propegated?

pearl trail
#

i might’ve set another value which i may forget, ill look into it

pearl trail
#

a little bit messy yeah

sharp geyser
earnest phoenix
sharp geyser
#

I find it comes down to 3 main factors

  1. Useability - How well is your bot able to integrate into the server? Is it easy to use right off the bat, or is there a learning curve (remember most users dont want to spend hours learning how it works unless they are looking for a grindy bot)
  2. Target Demographic - Is it something people want to use and invite to their servers? If its not something people are looking for, they simply wont invite it
  3. UX/UI - Does it look good? Are the embeds properly colored, is the grammar proper, does it feel smooth to use with no hiccups?

Keep in mind this is just my opinion and not fact, but over the years this is what i've noticed (im also tired so everything might be gibberish)

amber rose
neat mauve
# earnest phoenix how did it hit more than 500 installs that quickly?

Honestly.... I dont know for sure. But I suspect that one of my action lead to it. I have played the bot in a very big server, just for a split second. But overall people tried it out once and then didnt do it again. Though I didnt look often for it, but it was so that i gained roughly 250 installs from that i suspect. Especially since my bot was banned on that server when i returned and tried it out again...

It was just a test... but apparently i guess it went well ':D

lyric mountain
amber rose
#

:/

#

How?

lyric mountain
#

too many icons, the "Click below to upgrade" text could be in the footer instead

#

and "Current upgrade level" can be shortened to "Current level" or "Upgrade level" so the number doesn't jump to the next line

amber rose
#

Alright

earnest phoenix
#

target demographic is kinda hard as it may bea niche game

#

would you give me an opinion if i showed you the bot ?

digital swan
lyric mountain
#

I'll be very honest, people are dumb KEKW

#

there've been many cases where despite having a blatantly obvious button people were unable to figure it out

deft wolf
#

We don't see the button, but if it's a button that only has an emoji I can believe that someone could not understand it

bitter granite
amber rose
#

I'm not happy with you talking about people that way

bitter granite
amber rose
bitter granite
#

Idk if they can even read the guide

amber rose
#

Like I said, don't explain it too much detail and try to order everything well

deft wolf
#

🤨

warped summit
#

Which bug bot is made with Discord.js

lyric mountain
amber rose
#

You're totally right

lyric mountain
#

those who work with sysdev know it very well, no matter how simple you make things, how clear you word stuff, how many "how-to" images you put

#

the. user. wont. read.

#

in fact 60% of my job is adding safeguards on our app to railroad the user into doing things correctly

bitter granite
amber rose
#

Now I get it

#

They skip the guides

#

We all kinda do that

vale pilot
#

Hi

amber rose
warped summit
#

Gimmie a good hosting service

surreal sage
#

yeah no doubt my samsung tv is part of a botnet now

amber rose
deft wolf
#

🤨

warped summit
digital swan
sharp geyser
#

Overpriced

#

but what isnt now a days

bitter granite
digital swan
bitter granite
#

But the service is so bad i cant say the name

digital swan
#

That’s why they’re cheap then

bitter granite
#

Or they thing its a targeted roating

bitter granite
digital swan
#

So it’s not a realistic option

bitter granite
#

With a reason of false flag

#

Rip my data was there
My code that the last backup was a week

sharp geyser
digital swan
#

You used your production server as the only place for your code?

digital swan
bitter granite
#

Now i know i always make a backup before live

#

Learnt the lesson

sharp geyser
# digital swan How

I mean, its alright if you are looking for EU servers, but I def dont recommend it for anything beyond that

bitter granite
#

And also service provider blacklisted

sharp geyser
#

Their US servers aren't quite up to standard for the price they are putting them at imo

digital swan
#

Yeah it’s better in eu but I’m only using it for a US server rn and it’s perfectly fine

#

Better spec than digital ocean

#

Good network performance

sharp geyser
#

I use contabo atm simply cause cheap & quick provision times

digital swan
#

Beautiful web console

sharp geyser
#

It serves its purpose for testing

bitter granite
digital swan
#

Don’t contabo oversell and have really bad network speeds

sharp geyser
#

ovh is good for industrial servers

#

their dedis are amazing tho

bitter granite
digital swan
sharp geyser
#

ovh for minecraft?

#

thats overkill asf

bitter granite
digital swan
sharp geyser
#

oh

#

then yea

#

The only thing I hate is ovh's commitment thing

#

its understandable

#

but like mmLol

digital swan
#

Like you have to commit to a year of paying?

sharp geyser
#

yea or you pay everything outright

bitter granite
digital swan
#

Ahhh yeah I couldn’t do that I change my mind too much

bitter granite
#

But i dont seem to have any issue with the server at all

#

+its the company money so...

#

do i really care about how its payed... Nah

digital swan
#

I just wish for hetzner to provide managed databases

sharp geyser
#

I just wish for hetzner to offer dedis in the US

digital swan
#

Their server auctions are eu only?

bitter granite
#

I wish ovh provide on indonesia

digital swan
#

Ik digital ocean and vultr have a lot of regions

bitter granite
#

Unless they finaly added it

sharp geyser
#

they only offer vps in us

bitter granite
digital swan
sharp geyser
#

Hope so

#

I'd love to see it

bitter granite
digital swan
#

If your target audience is Europe though it’s fine

sharp geyser
#

@prime cliff is a separate api even needed for blazor? I am looking at all this example code, and other peoples projects and they manage to do everything server side

tacit estuary
#

Are there better ways to use "files" in python besides the default "read, write, append" method? Maybe a library python thing has something better I suppose.

sharp geyser
#

Wdym

#

What else do you want to do to a file?

tacit estuary
#

It's just annoying when you have to use ALL 3 "r, w, a" in the same block of code and you have to close file, open it again, close, open it again, close, open again.

pearl trail
sharp geyser
#

Its pricey for what you get in the US

#

its EU servers are good tho

pearl trail
#

oh

pearl trail
radiant kraken
#

@pearl trail @lyric mountain anyone knows why this warning happened?

#

idk why its spoilered

#

stupid discord

#

e is List<Enum> btw

sharp geyser
radiant kraken
sharp geyser
#

parseLong returns a primitive long, so re-boxing happens. Whereas valueOf will return a long object.

#

For some reason this is better

#

I dont know too much myself, only what i've heard

radiant kraken
sharp geyser
#

👍

radiant kraken
#

guys is this valid

#

type Coin and Cash is an enum

sharp geyser
#

Looks fine, what are you worried about

radiant kraken
#

(List<Enum>)e

sharp geyser
#

I mean why not, all you are doing is telling the compiler its type

#

Rather

#

why not make it take in a List<Enum>

#

Why does it have to be Object

radiant kraken
sharp geyser
radiant kraken
#

this.getNominal((List<Enum>)this.getCoins(), (List<Enum>)this.getCash()) doesn't work either

sharp geyser
#

This is Java right

radiant kraken
#

cc @pearl trail

sharp geyser
#

Honestly I might be washed

#

Never knew Enum was a type

radiant kraken
#

Enum is a class

#

for every java enum instance

#

it has .name(), etc

sharp geyser
#

Ah right

#

hm

#

Can I see the definitions for the Coin and Cash enums?

#

I mean it doesn't really matter if it takes in Object afaik

#

Im more curious why its giving you problems

#

if Coin and Cash are both enums, then they are instances of Enum afaik

radiant kraken
#

damn TIL java's final functions more like javascript's const than C++'s const

#

never knew that

sharp geyser
#

Ah

#

So you can't assign a list of enum values aka a list of Coins to a base type

#

Compiler doesn't really know what that will end up being I think (if im understanding this correctly)

#

Honestly just take in an object and cast if need be

#

Its the easiest way, unless one of the bigger java brains like @wheat mesa or @lyric mountain can answer better

radiant kraken
#

oh wait nvm it worked pog!

pearl trail
lament rock
#

Nodejs devs, what node version do you use?

radiant kraken
#

now that i think of it, i should update

lament rock
#

I know someone personally on v12

#

Really what I'm going after is if a good chunk of devs still use something older than v14 because of global.fetch (my lib makes use of it and putting a dep on undici makes the min node v20)

radiant kraken
#

nvm my beloved

radiant kraken
lament rock
#

I mean I forgot what node v my prod machine is on. I know it's at least > v19

#

v12 is reasonable though since that v saw considerable performance improvements to Promises

radiant kraken
lament rock
#

Someone requested I support a min of v14 as that's when fetch was added

#

For snowtransfer

#

But I don't know if some people genuinely have projects that break on newer node versions. Like, some native libs dont have binaries for later node versions

#

Tim also fucks around and finds out with node internals changing

prime cliff
#

Passkey/webauth needs routes too with a little bit of js function invoke

#

Uploading files too needs routes

digital swan
frosty gale
#

there's a couple that are lts I think

warped summit
#

Best language to code a heavy bot with?

deft wolf
#

The best language to write any bot will be the one you are most familiar with

frosty gale
#

a better library will allow you to scale more easily

#

and basically any language can scale if you try hard enough

warped summit
#

What’s a better library ?

frosty gale
#

library that has full coverage of the discord API, frequently updated, etc

#

do note frequently updated != frequently introducing breaking changes (discord.js dig)

warped summit
frosty gale
#

we are entering highly opinionated territory

warped summit
deft wolf
#

Let's start the war 🔥

warped summit
frosty gale
#

im not a fan of discord.js because of the frequent breaking changes but discord.py can be a little bit on the heavier side because of the nature of the python language

#

it depends on what tradeoffs youre willing to accept

#

every person you ask will give you a different answer

#

id recommend for you to choose one you think looks the best and cleanest

warped summit
#

Ooo

#

I’ll go with djs

bitter granite
frosty gale
#

id only start one for the sake of starting an argument

quartz kindle
quartz kindle
#

for lots of servers you're better off using the discord api directly or writing your own minimalistic wrapper for it

#

discord.py and discord.js are not really good at handling lots of servers (100k+)

#

its not hard to use the discord api directly, you just need fetch, websocket (you dont even need websocket if you go full slash commands) and read their docs

obsidian radish
#

@bitter granite

wheat mesa
#

That would be a better way to handle it

radiant kraken
#

oh they can be like Rust?

wheat mesa
#

That way you’re not parsing out a string for it

#

Not necessarily exactly like rust but somewhat similar yes

#

    public enum SomeEnum {
        VALUE1("Value 1 Description"),
        VALUE2("Value 2 Description");

        private final String description;

        SomeEnum(String description) {
            this.description = description;
        }

        public String getDescription() {
            return description;
        }
    }
lyric mountain
wheat mesa
#

That too

lyric mountain
#

Using enum constants would be better than parsing too yeah

#

Java enums are more flexible than classical enums

sharp geyser
#

Realistically everything else can be done via blazor no?

#

All the external apis, I will end up using some other companies api so its not like I need to make it myself

sharp geyser
#

and some teachers are like "You can only use what you're taught"

lyric mountain
#

Ah, it's a class assignment

sharp geyser
#

I think so

long marsh
#

I use DiscordJS ... but purely for the embed builder / component builders. I .toJSON them for the HTTP interaction response

#

I could have built my own ... but they already had it available

#

It likely slows my responses by a few microseconds ... but meh. Could care less about that

sharp geyser
#

The builders and such are probably the worst of it for discord.js

long marsh
sharp geyser
#

discord.js uses a lot of memory, mainly because of what it does internally to make your life easier

long marsh
#

When I say builder, I legit only mean the embed builder / action row builder components. That's it.

sharp geyser
#

Which si fine for small bots and beginners, but once your bot starts scaling, a lot of that is no longer useful for you, and in turn actually limits you

long marsh
#

My stack is

Discord -> AWS API Gateway -> EC2 -> Redis - > DynamoDB

#

When building out a bot, what are some of the better ways to influence people to come into your help server?

deft wolf
#

Bugs

neon leaf
#

lol

long marsh
# deft wolf Bugs

low key ... I think this is actually may problem; however, I don't think the answer would be to inject "fake" bugs 😄

digital swan
frosty gale
#

occasional random issues will encourage people to join to ask then probably just stay

frosty gale
#

now that i think of it their initial strategy of caching everything was a horrible idea that was never going to work

long marsh
#

I agree on your sentiment though

frosty gale
#

but for smaller bots yeah doesnt matter much

frosty gale
quartz kindle
#

for example many things are a requirement for all the permission checking methods

#

guild cache, channel cache, role cache

#

the only thing that can be disabled without affecting most core functions is users/members/messages cache (except the bots own user/member)

#

but afaik the default is to cache everything as it comes

#

except messages which are limited at 100 or 200 per channel

frosty gale
#

by default its extremely bloated and you have to do a ton of config and uninstallations to make it bearable

sharp geyser
#

Whats the best way to silently refresh access tokens?

solemn latch
#

Isn't that the point of access tokens? To be silently refreshed

sharp geyser
#

Right, but how do I silently refresh them

#

I know I can make a post request with the required things

solemn latch
#

Using the refresh token

sharp geyser
#

I know

#

Let me fully explain

#

I am wondering the best way to silently refresh them using the expiration time. Do I use some type of cron job, a timeout, or something else? What if the process goes down, how do I resume the timer etc etc

solemn latch
#

I actually don't know the answer to this, I thought youre supposed to refresh them just whenever you send the next request after it's expired.

#

But I might be wrong

sharp geyser
#

Well

solemn latch
#

IE check every time you plan to send a request

sharp geyser
#

The point of silently refreshing them is to do so without the user's input

#

So it looks "seamless"

solemn latch
#

The user wouldn't know here either. Other than the extra delay to get a new token.

sharp geyser
#

I guess yea

solemn latch
#

Which hopefully is quick

sharp geyser
#

Hm yea I guess I could check every request

solemn latch
#

Yeah, since you need to poll the db anyway you should have the expiration time too.

#

So it's a simple now > expire check

sharp geyser
#

Yea fair

#

I can check prior to every request to see if the token is expired, if so request a new, replace the old and continue with the new one

#

Should hopefully be a quick process

#

Im having to implement the entire Authentication library myself since I can't use the .NET one

#

😔

solemn latch
#

I assume that's how it's intended to be done. But I've never really looked that far into it

sharp geyser
#

Hey man, im learning new shit every day to complete this project

#

some of which I dont even fully understand 💀

#

I have so much work to do its insane

prime cliff
#

😆 Welcome to development

sharp geyser
#

Yea i've never taken on such a massive project

#

With such unfamiliar tech stacks

#

I just initalized a new blazor project, and its different from the last time

#

So now im confused on what to do

#

💀

prime cliff
#

Can't be as massive like my project currently? 🙃 having to do all the auth, 2fa, ton of UI/data with API support/clients, swagger, multiple oauth connections and LOTS OF FUN xD

sharp geyser
#

Uhm

#

Sir

#

or ma'am

#

My project is so much more 💀

prime cliff
#

You trying to clone Discord then mmLol

sharp geyser
#

No, we are making a new marketplace

#

I can't go into the specifics

prime cliff
#

👀

sharp geyser
#

but we have a lot of work cut out for us.

Not only is there auth and UI, we have to handle payment processing, order fulfilment, tracking, emails, account management, and product management to name a few

#

and thats just the tip of the iceburg

prime cliff
#

Oh nice haha payment stuff is gonna be crazy have fun 🙂

sharp geyser
#

Well we plan on using stripe so it won't be as bad

#

but still a pain to integrate all these technologies into one place

prime cliff
#

Do you have help from other people or?

sharp geyser
#

We are a team of 2

#

I do the backend, they do the frontend

#

Since we are using blazor though, I do all the C# required stuff as well on the frontend

prime cliff
#

Well at least you don't have touch frontend that's a plus css wise

sharp geyser
#

Though im not going to bother making a separate api for this project

#

We won't be exposing any api endpoints to the public so theres no need

#

I plan on doing it all server-side on the blazor project and have the client talk directly to it

prime cliff
#

It's pretty easy to do api stuff in asp.net and just make your own authorization attribute to lock it down

sharp geyser
#

Yea

#

Right now im having to implement my own auth lib

#

since I can't really use the one provided by MS

#

or I can and I just dont know how

prime cliff
#
public class IsAuthenticatedAttribute : ActionFilterAttribute
{
    public override void OnActionExecuting(ActionExecutingContext filterContext)
    {
        if (!filterContext.HttpContext.Request.Headers.ContainsKey("Authorization"))
        {
            filterContext.Result = controller.CustomStatus(401, "Authorization header is missing.");
            return;
        }

        string AuthKey = filterContext.HttpContext.Request.Headers["Authorization"];
        if (string.IsNullOrEmpty(AuthKey))
        {
            filterContext.Result = controller.CustomStatus(401, "Authorization header is empty.");
            return;
        }
        //if (!_DB.Keys.TryGetValue(AuthKey, out ApiUser User))
        //{
        //    filterContext.Result = controller.CustomStatus(401, "Your token is invalid, for support go to " + Config.Discord + " ");
        //    return;
        //}
    }
}```
🙂
sharp geyser
#

Yea

#

My thing is

#

I use OIDC, but my requirements are strict

#

I only allow certain email domains when registering for an account, so I have to build my own login ui instead of using the hosted one so I can intercept the request to check the email before continuing.

#

So I can't use MS OpenIdConnect package, since im not using the auth server's hosted login page

prime cliff
#

That's easy with blazor you just do an EditForm with POST request and asp.net identity has built-in user management/login

sharp geyser
#

How so?

#

Mind if you show me an example cause I couldn't find anyway to do something like that

#

Since I use Microsoft & Google OIDC

prime cliff
#
[HttpPost("/auth/login")]
public async Task<IActionResult> Login([FromForm] string email = "", [FromForm] string password = "", [FromForm] bool rememberMe = false)
{
    if (string.IsNullOrEmpty(email) || string.IsNullOrEmpty(password))
        return BadRequest("Invalid email or password.");

    AuthUser? AuthUser = await _userManager.FindByEmailAsync(email);
    if (AuthUser == null)
    {
        return BadRequest("Invalid email or password.");
    }

    Microsoft.AspNetCore.Identity.SignInResult Result = await _signInManager.PasswordSignInAsync(AuthUser, password, rememberMe, false);
    if (!Result.Succeeded)
    {
        return BadRequest("Invalid email or password.");
    }

    return Ok();
}```
sharp geyser
#

Im not sure that will work for me

#

The way my auth server works, is I can use OIDC methods to interact with it, and then it acts as a relay between Microsoft & Google

#

User Login -> Auth Server sends request to whatever they choose (MS or Google) -> Google or MS responds with the information on that account -> Auth Server logs them in saving that information -> Redirected back to page

prime cliff
#

You can intercept the oauth callback with the data given and check the email format too

sharp geyser
#

The problem is, I can't

#

Well

#

I could, but I would end up having to do 3x the work to get the end result I want

#

It's better to just implement my own login UI and not use the provided auth package

#

It'd be less work in the long run

prime cliff
#

You should probably look at an asp.net google oauth sample then or an OIDC example

sharp geyser
#

The problem is right

#

My auth server, when they login with an external identity provider, auto creates an account for them when they first login.

#

So I can't intercept the callback, because an account is already created

prime cliff
#

So you do have user accounts then with a password or?

sharp geyser
#

No

prime cliff
#

Just oauth only ok

sharp geyser
#

There is no password, it simply uses whatever external idp I provide, and they login with those accounts via oauth

#

but the problem as I stated, is when they first login, an account is created on my auth server.

#

So intercepting the callback wont work since an account would already be created

#

They'd continue to be able to login, so even if their email is bad, it wouldn't matter

#

My auth server allows me to do so by making a series of api calls

prime cliff
#

Something like

public void ConfigureAuth(IAppBuilder app)
  {
    app.UseExternalSignInCookie(DefaultAuthenticationTypes.ExternalCookie);

    app.SetDefaultSignInAsAuthenticationType(CookieAuthenticationDefaults.AuthenticationType);
    app.UseCookieAuthentication(new CookieAuthenticationOptions());

    app.UseOpenIdConnectAuthentication(new OpenIdConnectAuthenticationOptions
    {
      ClientId = _clientId,
      ClientSecret = _clientSecret,
      Authority = _authority,
      RedirectUri = _redirectUri,
      ResponseType = OpenIdConnectResponseType.CodeIdToken,
      Scope = OpenIdConnectScope.OpenIdProfile,
      TokenValidationParameters = new TokenValidationParameters { NameClaimType = "name" },
      Notifications = new OpenIdConnectAuthenticationNotifications
      {
        AuthorizationCodeReceived = async n =>
        {
          // Exchange code for access and ID tokens
          var tokenClient = new TokenClient($"{_authority}/v1/token", _clientId, _clientSecret);

          var tokenResponse = await tokenClient.RequestAuthorizationCodeAsync(n.Code, _redirectUri);
          if (tokenResponse.IsError)
          {
            throw new Exception(tokenResponse.Error);
          }

          var userInfoClient = new UserInfoClient($"{_authority}/v1/userinfo");
          var userInfoResponse = await userInfoClient.GetAsync(tokenResponse.AccessToken);

          var claims = new List<Claim>(userInfoResponse.Claims)
          {
            new Claim("id_token", tokenResponse.IdentityToken),
            new Claim("access_token", tokenResponse.AccessToken)
          };

          n.AuthenticationTicket.Identity.AddClaims(claims);
        },
      },
    });
  }
}```
You can check the email in AuthorizationCodeReceived and redirect to an error page or exception.
#

Time to do my oauth stuff 🙂 bye

sharp geyser
#

I've not seen ConfigureAuth before

prime cliff
#

That's just a normal C# function that you run

#

You can split up your service configs into different classes based on what you're doing instead of all in 1 class

#

🙂 just pass to the service collection into the function to build

sharp geyser
#

Oh cool

#

I never did that before

#

I ought to do that

#

👍

#

Thank you for the advice

#

I will look into this more

sharp geyser
prime cliff
#

Yea

long marsh
#

I can remove discordjs entirely from my discord application if I built the one piece of it that I use: embed / action row builders. Do any of you know of a typescript library that can help with this? I can always build my own / reference the discord documentation regarding the JSON ... but hoping to use something off the shelf

lament rock
#

Personally I'd rather just the JSON

long marsh
#

I just like the pattern / easy to use

lament rock
#

@discordjs/builders is its own lib

long marsh
#

I also like the typing DiscordJS provides

#

But yeah, I'll check out that library!

#

For reference, this is what I'm using in one of my imports:

import {
  ActionRowBuilder,
  ButtonBuilder,
  ButtonStyle,
  ComponentType,
  InteractionContextType,
  InteractionResponseType,
  InteractionType,
  type APIInteraction,
  type APIInteractionResponse,
  type APIUser,
} from "discord.js";
#

Some of them appear to be from discord's own library ... so I could maybe switch those out.

lament rock
#

djs just re-exports those types

long marsh
#

Yeah, that's what I figured as well.

vale pilot
#

Yippepe my bot got approved

deft wolf
#

Good job

sharp geyser
#

@prime cliff Thank you so much kind sir, your advice helped me find a solution to my problem without breaking my back. I was able to think of a way, while still crude works well enough

frosty gale
#

java convention is to use builders for everything which i find to be so much boilerplate

earnest phoenix
#

want to add a new field?

be ready to edit at least 4-5 files

lament rock
#

I can live without the insane compiled module import strings size in my heap

amber rose
#

I like the boilerplate though

frosty gale
#

im only ok with boilerplate if it results in faster code

#

i find it very difficult to accept my 2 line simple code if it can run 0.1x faster if i add lots of overcomplicated code

scenic kelp
#

builders are much nicer when you're programmatically constructing things

#

yeah it's a pain to initially write out but they're basically necessary in statically typed languages

pearl trail
#

anyone have experienced slow intellisense on jetbrains ide? it's kinda annoying

sharp geyser
#

Running low on wam

pearl trail
#

wam?

sharp geyser
#

Ram

pearl trail
#

hmm interesting, i still got 5gb free

#

i'll just leave it as it is

bitter granite
#

Whats tbe rate limit message ammount again?

lament rock
#

If you mean sending a message in a normal channel, it's 5 messages per 5 seconds

frosty gale
#

they can make code unpredictable to people from the outside and encourage complex unmaintainable patterns

scenic kelp
#

how would macros help with that?

lament rock
scenic kelp
#

yes but you're losing all type safety

#

beyond this is a json object

lament rock
#

What does type safety matter if you're the one sending the JSON

lament rock
rigid flume
#

Hello, im a payment gateway provider... PayPal,square,authorise

pearl trail
#

hi payment gateway provider

quartz kindle
#

I'm a payment gateway provider...I provider account like PayPal, square, authorise net....etc

#

"i provider account"

#

written with google translate?

deft wolf
#

Even google translate couldn't screw it up like that

earnest phoenix
quartz kindle
#

yup

earnest phoenix
#

Yeah

frosty gale
#

yay my laptop came with an NPU

#

what a waste of cpu die space 🤦‍♂️

muted harness
#

I wonder if the top.gg bot list will support user counts like it does server counts

pearl trail
lucid vessel
#

How to show a user's activity in discord.js

warped summit
#

It’s auto updating too 😛

neon leaf
#

why did verifying bots become so easy

#

just verified all my bots in like 10min

#

even private ones

deft wolf
#

Because Discord probably tried to make it not so "special"

#

They want everyone to be able to create a bot and verify/monetize it because then they can also make money from it

#

This is probably the only way they make any money from someone creating bots

neon leaf
#

I see

deft wolf
#

Such a system sounds better than asking for money to use an API

neon leaf
#

yeah

quartz kindle
#

or maybe the backlog for the old verification system was so large they said fuck it

sharp geyser
#

Its likely a mix of the two

#

They saw how huge the backlog was, but they couldn't justify just letting everyone verify so easily so they found another reason as well

#

Notice how strange it was the monetization system came into play right about when they said fuck it everyone can verify

deft wolf
#

Real

stark jolt
warped summit
#

56h 😩

prime cliff
amber rose
#

Cool

amber rose
scenic kelp
#

type safety makes your code easier to reason about and prevents an entire class of issues at compile time

lament rock
#

Trust me, my code bases are as type safe as TypeScript lets me be. But the web isn't type safe

wheat mesa
sharp geyser
frosty gale
#

thought 16gb was supposed to be good in 2024

digital swan
#

16gb is quickly becoming the minimum 😔

crimson plaza
pearl trail
frosty gale
#

yeah in linux 16gb is usually the 32gb for windows

sharp geyser
#
{"user":{"297712327216594946":"mercatus.gg"}}

How is this not a dictionary C#

#

well a dictionary inside a dictionary

#

First key : User
First Value : Dictionary with key stringified number, with value string

#

or am I wrong?

#

JsonSerializationException: Error converting value "{"user":{"297712327216594946":"mercatus.gg"}}" to type 'System.Collections.Generic.Dictionary`2[System.String,System.Collections.Generic.Dictionary`2[System.String,System.String]]'. Path 'urn:zitadel:iam:org:project:297838639419752450:roles', line 1, position 482.

#

Nvm I figured it out

prime cliff
#

Were you trying to convert an actual string to dictionary 🙃

lament rock
sharp geyser
#

Because this used to work, but now ig it doesnt anymore

quartz kindle
#

i went for reading the stream into a blob and then passing the blob into formdata

#

but for large files yeah, the formdata class itself is very limited and badly implemented in node

#

you could always use a better formdata lib

lament rock
#

Man... That sucks. Though I guess it wont be THAT big of a deal as the file upload limit on Discord is being reduced to 10MB

#

I thought about making my own FormData lib

#

Since I know how to create the body and headers

quartz kindle
#

yeah thats what i did in tiny discord lel

#

made my own formdata with the http lib

lament rock
#

iirc fetch supports a ReadableStream as the body, so I can just circumvent that

quartz kindle
#

it should

#

but they are doing all this weird differentiation between node streams and web streams

#

they wanna copy everything browsers offer, but then they make it incompatible with node's own version of things

lament rock
#

It's not hard to convert between them. Readable.fromWeb and Readable.toWeb

#

stream.Readable

quartz kindle
#

yeah but its messy

lament rock
#

Indeed

#

at least node streams support async iteration ive heard

quartz kindle
#

they both should

#

but idk

pearl trail
#

has anyone ever encountered ...~ files in the project directory? with jetbrains ide? it happened to me both in goland and webstorm

#

it's annoying

#

i didnt find the solution on google

sharp geyser
#

In case the IDE crashes or something it has a place to go back to so you dont lose your work (if you didnt save)

pearl trail
#

hmm yeah, i know it's a temp file from this popup earlier...

#

but isn't it annoying?

sharp geyser
#

Depends on you

pearl trail
#

like you got bunch of files already, and it doubles

sharp geyser
#

If you dont like it you can turn it off afaik

pearl trail
#

oh

#

let me see

sharp geyser
#

Once the IDE closes they should be deleted though

pearl trail
#

because local history does exists, so i don't really bother about the temp file

sharp geyser
#

Ah

#

Once you save that file it gets deleted

#

So pages.tsx is saved, pages.tsx~ is deleted

pearl trail
#

oh

#

interesting

#

thanks

sharp geyser
#

npnp

prime cliff
spark flint
#

does anyone know what causes this

#

its a simple for loop

#

the array has 4 functions, not much at all 😭

quartz kindle
#

node basically has 2 different sets of tools for the same things, one is node's own stuff and the others is browser stuff

#

and they are not compatible with each other, so you need to convert one into another and vice versa

prime cliff
#

At that point just create an asp.net api to handle uploads 001_NK_XD chunked uploading by default with compression support and better form and data handling

radiant bramble
#

hehe

lament rock
# prime cliff At that point just create an asp.net api to handle uploads <:001_NK_XD:521339646...

The thing is that you were able to trick undici (the fetch impl in nodejs) into thinking you were passing it a File instance and supply a custom stream function, but they since patched it with more strict prototype chain checks. Now you'd effectively have to re-make the FormData class and then build the body and headers yourself. Luckily, undici supports supplying a ReadableStream to the BodyInit so if someone makes a better FormData class with a similar API then I would actually use that, but for what I am doing (Discord REST lib), I don't need to worry about it too much since the upload limit for bots and webhooks will be 10MB in Jan

#

I tried to do this, but I got stuck on working on support for iteration of the class since thats how undici gets the form fields. If you were to do a for (const [name, value] of form) … that would work as it has its own [Symbol.iterator]

I got stuck because I wanted to extend the undici FormData class so that undici would accept it and I wont need to build the body myself, but you can't get a reference to the internal state of the undici form without iterating over the form, but if you implement your own [Symbol.iterator] and try to get the super state, you'll just hit a loop and reach the max call stack size.

#

Actually. I think I just figured out how to do it, but idk if it will work since the [Symbol.iterator] is defined as a property and I think only methods are stored on the super

#

@quartz kindle Can you confirm?

swift barn
#

Hey sorry
Can I have to api docs to configure vote rewards
?
(Python if available )

swift barn
pearl trail
quartz kindle
#

but are you trying to extend node's built in FormData class?

#

or are you actually importing FormData from undici as an external lib?

#

afaik node built ins have more restrictions, even though they are the same as undici under the hood

quartz kindle
# lament rock undici

yeah i dont see what could be done, you'd just need to have your subclass wrap the original iterator with some method

#

do you want to like intercept the iterator when undici fetch uses it?

lament rock
#

Because I need to get the super state

quartz kindle
#

the beauty of js, everything can be hacked in the weirdest ways

#

:^)

lament rock
#

Yes :)

frosty gale
#

replace object with function \🧌

quartz kindle
#

replace function with yourmom

sharp geyser
#

replace yourmom with yourdad

prime cliff
wheat mesa
#

I mean, extensions are apps… if you don’t trust them, don’t install them.

prime cliff
#

"run everything with windows administrator if you trust them" is basically what you're saying 001_NK_XD

sharp geyser
#

I have no idea what is going on here

#
<div class="w-full h-full">
    <div class="flex flex-column text-center gap-4 w-full h-96">
        <h1>This should be above</h1>
        <p>This should be below</p>
    </div>
</div>
#

Is this not how flex works???

#

Examining with inspect element, h1 and p are assuming its paren'ts height as well

queen needle
#

Are you using tailwind?

sharp geyser
#

yea

queen needle
#

flex-col

#

Is what you're looking for

sharp geyser
#

Right

wheat mesa
#

was gonna say

sharp geyser
#

😭

wheat mesa
#

pretty sure that's too long for a tailwind class name as common as that

sharp geyser
#

ahem

#

yup

#

that worked

#

ignore me

#

:)

#

I am used to using bootstrap apparently

#

So how would I have text to the left and an image to the right if im using flex-col?

#

I can't mix row and col no?

proven lantern
#

space between

#

or around

wheat mesa
#

I would recommend using grid for layout, flex for content

sharp geyser
#

Whats the difference?

wheat mesa
#

I'm not a super good-at-frontend person, but that's generally a good style to follow as far as I have learned

#

Grid is better at making layouts, flex is better at centering and spacing content

#

You can mix the two

proven lantern
sharp geyser
#

Actually

#

I got it

wheat mesa
#

productive work day today

#

I did more than that but gitlab is refusing to show it for some reason

#

oh god damn I did a lot, that was page 1 out of 5

#

thereeee we go

sharp geyser
#

Damn

#

My current codebase is messy asf

#

Especially since im still not fully used to blazor

real rose
wheat mesa
long marsh
#

Just removed the discord.js dependency 😎

Used discord-api-types and @discordjs/builders instead

remote cargo
#

I forgot to add a perms check on the main command KoiraAAAAAAA actually I did add it just didn't add the right permissions lol

#

@bitter granite sorry for the ping, quick question, upon denial do I have to fully resubmit the whole bot profile or is there an option to resubmit without having to go through the whole form process?

gilded plankBOT
#

@remote cargo

topgg Adding Your Bot To Top.gg

So you want to list your bot on Top.gg? We have a support article to help guide you through the process! If you need more help please contact us in #support!

topggDotRed Click here to follow our guide!

bitter granite
#

you need to add again if you have fix the issue

remote cargo
crystal yew
#

So im trying to submit my discord bot but topgg is telling me its too new and not registered to discords api, but I made the bot a month ago and have been using it. Is it because its only a user installable application?

bitter granite
#

since we cant invite them to test

long marsh
#

Does anyone here use the monetization features Discord provides? Ie. one-time purchase SKUs?

#

I have implemented one-time purchaseables and the subscription. Fortunately, I've had customers purchase both, but I only see the subscription revenue and not the one-time purchases.

I'm curious if there's a lag on those metrics. I would contact official discord support, but my request would likely get lost in the sauce there. I want to exhaust my resources first 🙂

pearl trail
#

even tho i got access control headers on the preflight, i'm still blocked with CORS??????

#

ok now i got it working to send the POST data, but i'm now not getting the response, but still "CORS Error" even tho it's 200 OK

#

sorry for the trouble, i fixed it

prime crescent
#

At which point of spaghetti code is it worth the hassle of refactoring everything KEKW

Im at 10k loc rn, im not a beginner programmer but this is my first discord bot. I think after a refactor with my current experience id be at ~6k weirdsip

quartz kindle
#

:^)

prime crescent
pearl trail
#

hello, does this mean it's out of bigint range too?

#

oooo, i need to stringify it first before putting into BigInt

neon leaf
#

yes, or do 243873285723851298173459218775n

#

(n at the end defines a bigint)

pearl trail
neon leaf
#

correct

pearl trail
#

i see, thanks for the information

tacit estuary
#

Does discord require ALL commands use slash commands to use their search thingy or only some?

frosty gale
tacit estuary
#

Darn it.

#

I'm trying to add in BOTH '?' prefix and '/slash' command.

#

Does one have to be listed as client = this and another bot = this? Cause using client = and client2 = don't work.

frosty gale
tacit estuary
#

I literally can't use ALL slash commands ONLY. I can only use prefix or mixture of the two since I am completely oblivious on how to make slash commands work with "cog files".