#development
1 messages ยท Page 279 of 1
It's half-half really, the new CEO was part of activision management and also a company called King with a lot of micro-transaction games, plus Discord is trying to go public so there's a lot of uncertainty as to which direction Discord is going on
Blizzard has been known to make interesting decisions that affect their softwareโs future poorly
Hence why people are nervous about a blizzard exec stepping up
Im prepping the "It's Time To Ditch TeamSpeak Discord" ad campaigns
Lmao
Are password confirmation fields in websites becoming obsolete? I am seeing a lot less of it in web designs and I am wondering if its because they are too lazy to include it, or if thats just a new trend
Like, Confirm Password type fields?
Itโs a UX thing. People can accidentally type the wrong password, youโre much more likely to not type the password incorrectly twice in a row without realizing
Iโd say itโs a must for every website
I see
I am just noticing in a lot of mockup designs they fail to include it
Thought I was using some outdated shit

a lot of the sites are moving towards a click to view button
i prefer that tbh
Most people will not view it
Users are stupid; treat them as such
just spent a few hours implementing a password confirmation thingy a few days ago lol
rate design
ignore cloudflare captcha, testing on localhost, so its disabled
wondering if i should get rid of the password requirements, people hate that stuff
im eager to see 1234 passwords in the db
so tim has been storing password in plain text this whole time!?!!???!! ๐
yes
:^)
jk i lied
# SERVER_ERROR: [AggregateError: ] { code: 'ECONNREFUSED' }
POST /api/auth/sign-up/email 500 in 494ms
Gotta love this error
I wonder whats wrong exactly

noooo
Is there a way I can get proper logs
cause this is bs
wtf am I supposed to do with AggregateError
Idek where its coming from
Woah no way @clear plinth check this thing out
check codes on the endpoint that have potential cause of the error
I found the issue
Wish it was more descriptive
but turns out my SSH tunnel to my vps with postgres running on it closed


How does Crowdin work? I am noticing I am making a lot of mistakes, and polluting my commit history due to it.
It requires you to set a source path and translations path, but then whats the point in keeping the old source file if it just generates a new one.
For example say I support english (en), spanish (es) and french (fr). I have en.json, es.json and fr.json. Crodwin expects me to set a souce (base) language, okay so lets set it to en.json. Now I set the translation path to be /messages/%two_letter_codes%.json well, turns out that is a conflict cause en.json already exists, and crowdin doesn't like that, so it wants me to do something like /messages/%locale%/messages.json or something different.
Now lets say I do all my translations, I commit them to github using its integration, and now it has /messages/en-US/message.json file, so then whats the point of the old en.json file? It's not longer the source anymore no?
isn't en.json already stored by default as your source since source path is english? or the same for any other language
My question is mainly, is there a need to keep the old files if it just generates new ones
no its temporary im sure, it'll be replaced
so i don't thnk there's a need to keep the old files
I hate it but i understand it's required to stop dumbasses getting into my account

I mean if I delete en.json then the source is no longer valid
and then I have to set it to en-US which then just starts the whole issue of Crowdin complaining of conflicts
so im confused on what Crowdin expects me to do
im not on the dev-side of this but i've worked and seen this before, since you're approaching /messages/%locale%/messages.json that forms a local directory and eventually as you said it'll turn into /messages/enUS-/message.json , i suggest just removing the original one
Right
So I should just ignore Crowdin complaining about possible conflicts and overwrites
now /en-US/message.json is your original source file
yea ignore it, it uses it's own structure lol
hm ok
there was a transifex to crowdin migration, shit was hard to watch but i know devs did a great work backend
Implementing the changes from crowdin is being a pain in the ass already
crowdin might be a bit of pain in the ass but once u go through the initial setup it;s smooth af
Yea
Thank you so much
Finally got crowdin to work for me :D
https://pastes.dev/yt7JOS1Pef think my translation keys could be a bit better or are they fine how they are?
the more simpler the better
The problem is Idfk what to name em ๐ญ
so this is fine
First time translating
Oh sweet
but as the complexity increases
you have to give contexts to some things that might sound too generic
refer to few strings from crowdin/top-gg youll have an idea of hoe snippets are handled in translations
Honestly, I forgot almost all of the keys I named in my translations for my bot. Even if I don't remember, I have a script generate .d.ts files off the english version .json and use the string I wrote so I know what its english value is in editor. Plus I can also just re read the translations. Most of the files are just command stuff like names, desc, arg names and desc
source is the "raw" texts
Oh yea I know
I was just confused on what I should be using for the source if its not going to be updated
like it generates a new translation file
yes, it's normal
you get the raw file and fork it into several locales, one of which might be the same language as the original
but the source must be kept
I just ended up deleting the original source and making the generated en-US one the new source
๐
they were supposed to be the exact same file
Is what I did bad
Cause I dont see a reason to keep a copy around if im just going to modify it and it be the exact same
I'd rather make the newly generated en-US the new source and just modify it
well, there's always a chance it might glitch out
How come?
like, when you add new keys you'd do it in the source file
so every other locale also receives them
if the source file is also a target it might bug if they didn't treat it

I mean I guess I can make a base.json and copy and paste the en-US to it and make it the new source
to put it simply, the base is where you add stuff, the targets are where you translate
dont add in targets and dont translate in base
right
Just made a new base.json file, copied en-US to it, set it as my new source in the github integration app
and should be all good now
All good now
also this, it's intended for some reason not a bug apparently
crowdin is really weird when it comes to some things, if you want to disable QA for a separate language it;s not possible, you either have QA for all languages or don't have AT ALL
I think I accidentally just did something
I was messing around and started a pre-translate job using Crowdin Translate thing
๐
Dk what its going to do
it'll just translate every language u support through it's machine translate and translation memory
for some languages it's good, for some languages there isn't even 30% accuracy
it's not a bad thing at all, they can just simply click on delete button or not approve it
my suggestion is to enable DeepL through apps
DeepL?
that supposedly super fuckin accurate translator?
@rugged dawn So I invited null as a proofreader
how da fuq does it work
null will basically have permissions to approve and deny or delete any particular translation for a string
DeepL is one among the best translators, but nothing is more than 90% accurate, DeepL is the best among the ones which exist
@radiant kraken
I guess you just select a language (you should have access to indo and english) and you can proof read / edit translations for strings
or can they only read and approve / deny them

no, they can translate them, approve and deny them
dropdown for?
approve translations
or some kind of button to proofread
i don't remember, i haven't proofread translations in so long
you should get a 
Click Save
when you are done
and it will pop up in the Indonesion Translations section
you don't have the perms
Nvm
Looks like crowdin wanted to ignore me giving them proofreader
and gave them translator instead ๐
lol
๐
I got to make a support server for this project now that I think of it
Gotta gather minions proofreaders

<@&842556283450425344> <@&1353254053962055723> come here

it's not lol ๐ญ

before:
TotalSeconds : 136,9656257
TotalMilliseconds : 136965,6257
after:
TotalSeconds : 31,1562804
TotalMilliseconds : 31156,2804
๐ฅ more speed
file content now multithreaded instead of just individual files
file content now multithreaded
condition tho beware race
ye rayon handles the annoying stuff for me
i tested 1000 iterations comparing the hash of all files in the directory
always a match
nice
still very cursed tho
no idea what that does, but i know anything you make is cursed by default
you are the curse itself
:^)
dang
hey in css, how do i create a grid that contains 2 different sizes?
so the first column has a 2fr:1fr ratio
second column an equal ratio like 1fr:1fr
correct
its for my deduplicated backups
aka store once reference how many times you want
you define that on the items
the grid itself is equal sized, but the items can occupy different amount/aspect ratio of cells within the grid
yup! i got it! Thanks!
I was able to set the grid-columns to repeat 6, 1fr
and then define how much span each item took.
No idea what that is
Hi Robert 
hi
no
hi tim
Tim ๐ฝ๏ธ๐ฅ๐
hi
hey guys
no matter what i do:
client.on(Events.PresenceUpdate, async (oldPresence, newPresence) => {```
this simply never emits
eventhough my bot has presence intents
Did you actually specify the intent in the WS options when constructing the client
why the different functions and not something like is_token_type(your_expected_token_type)
@unkempt ocean ^^
@radiant kraken ๐ซ[@community guidance]
<ht
tp
s:/
%64%69%73%63%6f%72%64%2e%67%67/%59%74%38%6b%4d%78%45%51%4e%45>
bro
inline bool is_token_type(const calculator_token_t* const token, calulator_token_type(?) expected_type) {
return token->type == expected_type
}
something like this? im not familiar with cpp
they are the same, so you'd have to do expected_type->type no?
thats pseudocode bc idk if null even has this type
and calculator_token_t != calulator_token_type
yes
token->data can still be different
I'd use enums personally
the number itself (if operand) or a character (if operator)
how can it be different?
Right but does the number itself matter in this case
You are simply checking the type
You dont make use of data even in your original code
i dont understand your token types, normally you would have a different type for every single thing like:
pub enum TokenType<'a> {
#[token("(")]
LeftParenthesis,
#[token(")")]
RightParenthesis,
#[token("{")]
LeftCurlyBrace,
#[token("}")]
RightCurlyBrace,
#[token(",")]
Comma,
#[token("+")]
Plus,
#[token("*")]
Star,
#[token(".")]
Dot,
#[token(";")]
Semicolon,
#[token("_")]
Underscore,
#[token("=")]
Equals,
#[regex("[a-zA-Z][a-zA-Z0-9<>,]*", | lex | lex.slice())]
Identifier(&'a str),
#[regex("[0-9]+", | lex | lex.slice().parse().ok())]
Number(i64),
#[token("func")]
Function,
#[token("interface")]
Interface,
#[token("struct")]
Struct,
#[token("package")]
Package,
#[token("type")]
Type,
#[token("return")]
Return,
#[token("main")]
Main,
#[token("int")]
Int,
}
that was my token types for my rust lexer e.g.
but maybe i just dont understand your approach
me too

(if i use rust)
except i'm writing a tokenizer from scratch in C 
how does the language change the approach?
I guess it depends on what C offers in regards to what rust has
fair
Idk what C has since its a rather old language, not all the "modern" aspects exist
and that's what i love about C

you're only left with the most barebones tools
but that also means you also had to get your brain to work

Is it still not possible to use enums here?
Just out of curiosity
it's possible
I've only ever used enums when making something like this to represent tokens
try ```c
typedef enum {
TEST1, TEST2, TEST3,
} Something;
the output should be negative tho
--(10,42+-358,5)5
(10,42+-358,5)5
(10,42-358,5)5
-348,08*5
-1740,4
I dont think -- is a valid operator in a calculator
yeah, but without parentheses it's not a valid thing
unless there's a left value
so 1--2 would be valid due to 1 - -2
tbf, desmos can even do physics simulation
one day someone will run doom on it
cuz bad apple was already done ofc
already done in 2021
well damn
close enough
theres another one that is something similar to the like walls of desmos
Embedded videos ๐
๐ฅ
that font looks rather delicious
roboto mono 
oh shit no way
my code already looks messy ๐ญ i aint handling it that deep
i might need to differentiate between --5 and 1 -- 5
i think this should be fixed, that was an old screenshot
cuz i found a bug with -- shortly after sending that screenshot

i didn't tell y'all
mmm
wdym
You put a black box over the path in the console so people cant see your name
oh

mspaint projects are now transparent so
when u select something and delete it its transparent
it's nice to see that they finally support png after all these years
guys should i work on suffixes (e.g: 50%) and functions (e.g: sin(x))
honestly i feel like this is too much effort for a lil side project 
scams used to use believable links smh
Yea, they are not even trying right now
all good domains taken smh
Maybe too many automod rules have been created and they need to try something different xd
Shunting yard algorithm
Easy to implement and very good for calculators
i usually throw on double negative without parens
there can only be one unary op at a time
Then ask it!
How do i add commands to my bot's profile page ?
Someone else will have to answer that.
It just happens from your bot being used iirc
does anyone know how to invoke slash commands directly from embeds?
Mention them and click them? That's what you mean?
Like they click something and it runs?
like this for example
i dont see anywhere in the docs where you could make 1 part of the text a clickable
yeah, you click on this and it autocompletes a slash command
like this
is there the searache dropdown / autocomplete api? i see this github issue https://github.com/discord/discord-api-docs/discussions/3873 but nobody has replied
ig autocomplete lets you provide some array of strings where it filters based on user input?
I know autocomplete exists for slash command choices, but if you mean select menus then I have no idea
yeah was looking for select menus
@dense flame
yikes
It's strange that this domain hasn't been blocked yet
dw
guys do u know how to convert infix tokens to prefix
i knew about postfix but not prefix

Waffle might know
hey, i have this:
client.on("presenceUpdate", async (oldPresence, newPresence) => {```
for some reason it is not detecting some people?
maybe because their activity status is not set to open or something?
This only detects people who are in the cache, no?
really?
Is there any way to cache all users then?
I mean I'm not sure about it
or is it maybe because some people have their activity status (like playing ....) on private?
Because it somehow detects all users except a selected few, that i could only see its game status of when i friended them
you can fetch all members but its not advised
If anything do it only once at startup
If their activity is disabled then yes
It only detects those whos activity status is set to be shared
This must be enabled afaik
pretty sure their activity status is enabled.
maybe they are not cached then?
ofc bro
You dont want to do it too often
i assume all we have to do is
await guild.members.fetch({ withPresences: true });```?
Uncaught DiscordjsError Error [GuildMembersTimeout]: Members didn't arrive in time.
cuh what is this
There you go
Hot
Yeah i was missing the intent ๐
Okay another problem, my bot only tracks the game activity of users who are online and who dont have their status on idle/busy etc etc
Is that normal behaviour?
I don't think this is normal
finally managed to hack together a go library for my c library for my rust library https://github.com/0x7d8/ddup-bak/blob/main/go/ddupbak/ddupbak.go ๐
ima make a node library for your rust library that uses your c library that uses your go library
do it i dare you
ima make a python library that calls a c++ library that uses the v8 library to use your node library for 0x7d8's go library for his c library for his rust library
does anyone here understand mathematical induction?

ima make a lib in brainfuck that calls your mom
would 403 be the proper HTTP code for this?
another question, i'm trying to make my API more developer friendly. Do i keep it MS or change it to proper format?
use retryAfter key
and add it as a header
best practice
most use an X-Retry-After
and "retryAfter": ms
if you want it to be machine readable and easily handleable via code anyway
like this is all im doing rn
yea
just add it as a seperate key
so
{
"error": {
"code": 429,
"message": "Too many requests",
"retryAfter:": 69420
}
}
thats better
and it sets the header
mint

Thank you for your input!
always happy to help 
Honestly is using a custom rate limiter a bad idea?
nah a lot of people do it
mine literally just checks the ip against a map
yea thats very common
would it be easily bypassed?
I mean
ip rotation is possible
but
sites like youtube just block whole ASNs if ip rotation happens bad enough
ASNs?
eh seems like too much of a hassle to add
If it's accessed via a token, you can set rate limits per token
thats what we want to do just creating a base for now
also each token can have enhanced limits
So I just cross-tested it across 2 devices and seems like each device is using its own seperate rate limiter
same ip
you using cloudflare
oh i found the issue
its now basing the IP off of 'cf-connecting-ip'
yeah so could that be the issue?
yup
damn is there anyway i could fix it?
is it named cf-connecting-ip?
try checking for X-Forwarded-For too
also case-sensitive, aswell as CF-Connecting-IPv6 being a thing too
hmm ill try that rq
from what i saw yes
yeah still not working
So it looks like Discord is banning all bots created with Shapes which means less work for reviewers on top.gg 
wtf is shapes
These AI bots
You give them a bot token, configure what "character" the bot should have and chat with it
Cringe
Hey anyone using @common.js/quick-lru?
I am tring to make const serverCache = new QuickLRU({ maxSize: 200 });
But it's giving me this error TypeError: QuickLRU is not a constructor
That means itโs not a class and canโt have new used on it
Are you sure youโre using it correctly?
Check your imports
I just copy paste right from docs, That why I wornder why it's wont work
Show your code exactly including imports
Interesting
Might I ask why you are using commonjs?
Instead of the normal quick-lru package thatโs maintained still
I was doing for whole codebase so I think about might be using es when rework
because the regular package only supports esm
so you'd technically have to const { default: ... }
I see
Thank you!
hi
Hello
guys, i switchd to webstorm for my frontend development
it's absolutely fucking cracked i love it
Crazy advertising from spammer
lowkey the pack is fire
does anyone how to do this?? this bot is not even in my server but this dude is using its command
like wtf is wrong with discord?
i wanna do this for my own bot now
You can install applications per user and then use them in servers without emepheral messages if they have less than 20 members iirc
my server has like 700 members and is there a way to disable this
will check thanks
how do i do this, i dont see any option in my settings
ok so i was able to install it per user but the commands arent showing up

hmm?
Was not talking aboit you
hey quick question: is there a way to only register new slash commands use rest API?
like i dont want to refresh all commands everytime i want to add a new command
import { REST } from "@discordjs/rest";
import { Routes } from "discord-api-types/v9";
const client = DISCORD_CLIENT_ID;
const token = DISCORD_BOT_TOKEN;
// const token = DISCORD_TEST_BOT;
// const client = DISCORD_TEST_BOT_CLIENT_ID;
if (!token || !client) {
throw new Error("missing bot token");
}
const rest = new REST({ version: "9" }).setToken(token);
(async () => {
try {
console.log("updating slash commands...");
const resp = await rest.put(
Routes.applicationCommands(client),
{ body: allCommands }
);
console.log(resp);
console.log("slash commands refreshed");
} catch (err) {
console.error(err);
}
})();```
Ah yes, another support scam
No mods moment
frfr
anyway bump
Just make a request for every new command... ๐ (there might be a better way but that's what i'd do)
Reference the docs: https://discord.com/developers/docs/interactions/application-commands#create-global-application-command
thanks
Currently ur code seems to be sending a request to the "Bulk Overwrite Global Application Commands" endpoint aka https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-global-application-commands
can you share a code example? im passing object in the body but im getting error Only dictionaries may be used in a DictType
const resp = await rest.post(
// Routes.applicationCommands(client),
Routes.applicationGuildCommands(client, guildId),
{
body: JSON.stringify({
name: "Math",
description: "Do some math"
})
}
);
even tried without JSON.stringify
should be without JSON.stringify
So real
ik u wanna try it ๐
not really, since its nothing new
I think I'm gonna open mod ticket
it is
Someone is advertising here
[x] doubt
i aint doubting it
@modern sable ๐ (read up)

@earnest phoenix please do not advertise
TIL google has an icon of a guy dabbing
Time to replace all my icons with that
you can
generate a hashcode of each command, store them in a database or a file, should be a command=hashcode relation
when you reload the commands, generate the hashcode again for every command, if it doesn't match update the stored hash and reload the command
this way only commands that were actually changed will be reloaded
sends pics of some of your components 2.0 implementations! curious how ppl have utilized it.
Was about to mention there's a ton in the showoff channel of the alpha discord where people tested it early but realized that you weren't in there. I can share a few for inspiration
dv8 cooked with this release
Are there other examples?
These looks great!
that didnt work either, i got the same error
show full error
i figured it out. I was using Math instead of math for the command. it expected lowercase
files: undefined,
json: { name: 'Math', description: 'Do some math' }
},
rawError: {
message: 'Invalid Form Body',
code: 50035,
errors: { name: [Object] }
},```
ah lol
How to you guy dealing with cache in client? such as messages, users, guild
Because it's growing overtime
depending on your library you can set limits
with 16k guilds I use about 3,5gb ram rn
Yes my library does support memory limit but my host service charge on memory usage I am trying to improve the caching and find the best way to deal with it
I just set all my caches to max 0 and set an exclusion to actually only cache the data I need
you probably did meth instead
WTF ๐
I had memory leaks up to 48gb so I'm quite happy rn
storage usage is currently a higher concern
I ran out of storage 20 times in april
Using djs eh?
yeh
No wonder then djs is a ram hog
To compare i have a 100k bot using 4.4 GB atm and that's with a bunch of user cache and data too using discord.net
i mean I use JavaScript what do you expect
anyone know how i can collect user input from options from a select menu?
like for exmaple what im trying to do is send a select menu showing the user some options and when i choose 1 i need to ask a follow up asking how many they want to use. if that makes sense 
do i need to use message collector and let the user type it out? wondering if there a better way
select menu has an event iirc
all interactions fire an interaction create event
I'd generally advise against using any sorts of collectors
(I don't use any and all my modals, buttons, selects work just fine)
djs is just intrractionCreate
interactioncreate would be for any interaction no?
and use type guards to figure out what type of interaction
jda also has onGenericInteraction, but we also have specific ones
djs has the events structured the same way the discord gateway has
wow djs really got worse over time
yup
i remember when going from v12 to v13 and then to v14, it went from 400mb to 900mb at 10k guilds
haha cool
I will probably merge the shards together into clusters
at least two shards per cluster
should help with memory - and also I only have 16 cores so more clusters is useless
the gold standard is 8 shards per process
but you can go 16 shards per process with some tweaks
well I have to see how my CPU and code seals with it
wait wtf im confused
I had a folder mwya/bot where my bot ran in
now I have mwya/new
same bot token but slighly different source
I deleted mwya/bot
I opened htop
it still runs
it will keep running since its in memory
lmao
and rebooted the system since
somehow its still running
and it doesnt respond twice either
xD
in case of doubt, nuke them all
ok this is what I wanted to show
https://discord.mx/i/7ibsu375If.png?
With a problem like this does anyone have any tricks to work it out easier
rate my old discod bot (1/5 shards)
nice
rly have to finally kill it off
because i just get lost in all of it
recur(27)
recur(recur(27 / 3)) -> recur(recur(9)) -> recur(18)
recur(recur(18 / 3)) -> recur(recur(6)) -> recur(12)
recur(recur(12 / 3)) -> recur(recur(4)) -> recur(8) -> 16```
but that's a lot to keep track of and I only know I reached the end because I know the answer, and also the last one has only one function with the end case
i guess writing it down would make it easier to understand
im guessing it was made on purpose to confuse your brain
not very nice of them, my brain is not made for this
so just kinda write them out just like I did?
yeah
Another question
"Incorrect. At //Point C, n will be 2 or less, since when n is greater than 2, the while loop iterates decrementing n until it has the value 2."
I don't understand the explaination
is it because the loop ends when n is less?
n cant be greater than 2 in part C because the loop always decreases n until n fails the while test
ahh and c is the return so it has to be less to get there
but at point B it is still in the loop so it will always be greater
Honestly writing it down is the best way to track
in point B yes, n is always greater than 2 there
because point B is defined before n is decreased
At point C n will never be anything greater than 2
it can be 2
To break out of the loop above it, it needs to be less than or equal to 2
I also get tripped up on substring questions like this, https://discord.mx/i/zIE0ximp18.png?
Therefore it can never reach that point without being less than or equal to 2, hence why it is never greater than two
First argument to substring is inclusive, second argument isnโt
lmao these are made on purpose to be confusing
well that one was weird dealing with the k's and following back what it would be at each instance of the for loop
but just writing it out would help probably? just saying this is when k is 1, k is 2, going through it like a debugger lol
yeah
Well it starts at k = 1 so you know for sure that the first letter is o, so that rules out 2 answers. Then since the second argument is exclusive, it will only add one character at a time for each iteration of the loop
you can see k starts at 1, so the substring is (1, 2), then k is increased by 2, so the next substring is (3,4), then the next is (5,6)
the input could be < than 2 for all we know
oh, right
E is in fact true then
since it cannot ever be less than 2 at point B
I appreciate the help and explanation with these it is helping me understand a lot more than their explanations
np, always down for these kind of things xd
I am confused on why B is correct, i know why D is correct
wait
I know why D is incorrect*
B is correct because the type of the array is Book, the compiler canโt tell that the method pagesPerMinute exists (since it doesnโt exist on type Book)
all the other ones I missed just fall under these categories like substrings(i get every substring question wrong)
https://discord.mx/i/HzrHVsl6Q7.png?
The only other type I got wrong is thisn one because I didn't think all the way through the options
they love throwing problems at you that'll be trivialized by simply trying to run the code
lmao
i mean, a good programmer is supposed to be able to write functioning code with a pen and a piece of paper
:^)
thank god im not a good programmer ๐
like, I get it knowing the outcome beforehand is important, but in an actual job nobody will be solving code by paper
imagine writing code in a piece of paper and giving it to an ai robot and ask it to execute the instructions
at the very least you'll get ambiguous requirements and told to make it work
I mean Iโm actively procrastinating at work rn because I donโt want to code or do testing ๐
No tickets left for me to do except testing ๐ญ
me every day
excpt i dont have a (regular, full time) job
so i do it on my own projects
xD
Tbf Iโm an intern so I donโt have a full time yet either
is that like a job test drive?
that sucks lmao
nice
My summer internship is going to be significantly higher though
CS internships can pay pretty good, just depends on what company youโre working for
do you have an invite to that server by chance?
I think the server is only for library devs ๐
The alpha period is over and anyone can use components v2
I need some input on our dashboard concept, does this look good?
i might have zoomed out i cant remember
ah
no it was on my big monitor
idk what else to add tbh
i don't think there's too much deadspace but i'd personally make the dashboard content occupy the same width as the content in the navbar
rn its just a concept but i will take into account of this
yeah i'll take that into account
Personally the navbar irks me having the user profile not all the way to the right but having the icon and name all the way to the left
its not actually
thats just his screenshot
making an AI is not the same as making a request to an API for an existing AI ๐
Now if you really spent the millions it takes to train an LLM from scratch or implemented some new architecture on top of an existing model, that would be considered making an AI
I hope it's not a bot made with Shapes 
Sorry didn't know that
cant
Nope, that company shutdown on discord
It's hosted by me
shapes got banned by discord lol
how does discord know it's shapes
ip
they nuked the primary app and also checked the IP the token was connecting from
ahh i see, checking the ip..
What's shapes? Wasnt that this AI Discord bot as a service type shit
It's shapes inc, an AI company. Thought discord said they steal your data
yea, they got nuked by discord source
Wow big news
Does this embed looks good
you can use command mentions instead of plain text
also how will u even sustain the gemini cost?
I offer ai shit in my bot too but it's not sustainable (16k servers)
OH CIRCLELABS
yeah now it clicks lol
Painful bots to review when you can't decline them for being a clone somewhat -ish
search "shapes" in #mod-logs 
pain
kinda hard to believe they didn't collect anything nor used any data to train their AI
Back here with questions, I am a bit confused on how 2 works but 1 doesn't
https://discord.mx/i/SFxpxndYf2.png?
https://discord.mx/i/woRRF1E1oI.png?
For this one, the list has a length of 6, starting at 0, going to length - 1, so 0-5 how is that not 6 times ran?
https://discord.mx/i/WbVKEaSCyZ.png?
again I am lost, it resets arr so how is it not all 0's
https://discord.mx/i/jej8d0RwNg.png?
Im just confused on this?
https://discord.mx/i/UOCtdEC9ix.png? I don't really understand their explanation
1 is not using else if
so it'll go through all those statements, messing the price up
y starts at x. It is 4 outer iterations, but then the inner starts at 4, then 3, then 2, then 1. 4 + 3 + 2 + 1 = 10
Attention to detail is going to be your biggest priority during the AP test. If you slow down and read it carefully, itโll save you a lot of lost points
For this one, arrays are passed by reference, but you cannot reassign a reference and have it affect the parameter. Doing arr = new int[5] is just reassigning the reference, not the actual value held by the reference
Think of the question more like this:
public static void doSomething(int value) {
value = 5;
}
public static void main(String[] args) {
int someValue = 2;
doSomething(someValue);
System.out.println(someValue) // Still prints 2, variables cannot be reassigned when passed as a parameter.
}
public static void doSomething(int[] arr) {
arr[2] = 5;
}
public static void main(String[] args) {
int[] arr = { 1, 3, 1, 7, 3 };
doSomething(arr);
System.out.println(arr[2]); // Prints 5, because doSomething modified the actual ARRAY, not the REFERENCE to the array
}
Any clue on this one? I'm decently confused on it
But thank you so much your explanations helped a lot on the other two
hey guys, my ts is absolutely tweaking and i really need some help
i have a js file after compiling my ts that contains 4 functions.
I got one function doing the following:
function test(){
console.log(test)
}```
at the bottom of the fille i got a simple test();
for some reason this function runs without exiting... but when i comment out the other functions it does exit???
What in the hellie is going on
getSolToMainWallet("test");
console.log("test2");```
test2 does log though, so i assume that the function does exit and return to the caller function. Though, my vsc thinks otherwise.
so guys, i have an app which also uses a discord bot, i run it on a docker and the issue is for some reason the discord bot disconnects and it doesn't reconnect unless i restart docker. Any workaround of that?
Using a lib or not?
discord.js
oh okay
other than that add some debug logging for those events and see why it's crashing out
yeah i will thanks alot.
no problem 
Itโs not really smart to force a reconnect.
From what I recall anyway
If itโs disconnecting and not reconnecting on its own, then you need to start a new session all together.
Discord.js should be handling this though which is weird itโs not
Thereโs some other underlying issue here
from what I remember is it's not recommended but honestly it doesn't matter. As long as you use the correct public methods it's handled the same way
since it's all internal logic
I see
From what I was told forcing a reconnect is bad
But this was years ago
If it works it works
Thatโs my motto
you mean the program is not exiting from reaching end of code? that means whatever getSolToMainWallet does is keeping the process alive, probably by setting up event listeners
I replaced the AI with Google Search because the Gemini API costs are giving me headaches
so you can't replace the entire array but you can use indices?
to replace things
some of the problems are stupid, asks about what an array looks like at a certain time in a for loop
they just take a second and are easy for error
Yes, because the array is an object. The variable named arr is just a reference, but if you modify the content of the value it points to, then itโs modified for all references
so it's like
4-0
4-1
4-2
4-3
4-4? all being summed
ahh i understand now, thank you
1 + 2 + 3 + 4
those two get the same answer, i just truthfully don't understand where your 1,2,3,4 come from
The inner loop is the one that increments count, right
yes
So then each time the inner loop runs, it increments once. The inner loop first runs 4 times, then 3 times, then 2 times, then 1 time
ohhh
i just went, it runs 4 times, starting at x, so inner_end - outer_variable because y is set as x
so it's the same thing i just thought about it really weird
do you have any other general tips
Honestly the biggest thing is to just take your time and fully understand the question before answering it
yeah, most of the mistakes i've made are very small things
can't put image links in large_image property in activity?
I'm testing this, and it's not working
Where do you guys host y'all bots on? I host it on silly development and discord bot host.net
I used to host mine on Contabo which offered great stats for great price, but their support is ass and one of my VMs was totally unreachable for over 9h one time so I swapped to GalaxyGate. Much better experience for my intend-to-be-large projects. For smaller/personal projects I bought an orange pi 5 I have right next to me
Nice
VPS
oooo
Some on bisecthosting some, on my home server
I love how 1 person writes an entire paragraph of their host then there is this guy with "VPS" as if that wasn't obvious 
The topic of the host I use has been discussed here many times + I don't want it to be considered advertising 
Especially when talking to "new" users of this chat
Besides, using a VPS to host bots is not as obvious as it might seem since most people still use "discord bot hosting"
Ah okay
My bad
me when hosting on bare metal
you "made" an ai?
aka consumed an ai api :p
I remember a dev here once that was training their Ai off messages back when that was socially acceptable
I think the Ai had problems with being a little too out of pocket or nonsensical
you mean like every AI that's trained off the internet ever
lmao
there's a reason for SRA when I add chatbot memory I'm specifically making it a keybased memory that is linked to their API token 
Not anymore. Deleted it due to high APi cost
kinda funny icl
im hosting a localai instance that solves most of the issues with the chatbot endpoint we provide
so 
@shell tundra @dense flame @unkempt ocean โ๏ธ
that was quick
Lmfao
Yeah cuz of this
yeah, it's nigh impossible to have an AI bot in discord due to that
no wallet will be able to sustain it for longer than a few weeks
your only option is to have a selfhosted llm, which has it's own issues
jokes on you
im still running mine
(1000โฌ+ spent)
(im in debt)
๐
Why are you guys relying on 1 api?
use multiple ais, you can have a list of 10/15 AI's and you wont runout of free daily tokens
"free"
True
they are
No AI is free
most have a daily free token amount
ai wouldnt be popular if millions of users couldnt use it for free for stupid questions
im talking for small bots btw, imagine having an AI bot for your community, thats super duable for free, the only cost would be the hosting
no AI company will ban you if you rotate and manage spam and rate limits
Why would you need an AI bot when you already have a community ๐ค
W
Validation works
and error reporting also works aside from when an error occurs with the SMTP stuff but yeah
I still need to do a stepper for the register stuff, cause I want to incorporate doing verification into signup, but I can't be asked right now 
Im in a developer server where when someone needs help a thread is created in his help message and the ai gives an answer, you would be surprise on how many times no other user help is required for their question
Idk why but it sounds like a very bad thing
why?
AI responses are not welcome on any of the servers I'm on. Feeding people AI answers is simply bad practice that firstly makes you a lazier person and secondly takes away the contact with another human being which is probably important in the community (apart from the fact that AI is mostly wrong and it's hallucinating)
True
I got a bot to share with you guys that I built that I leverage for Japanese products I buy frequently
clippy โค๏ธ
We give warnings for AI responses too.
Its been awhile though.
Acknowledged. I recognize that AI-generated responses are also subject to moderation protocols. Noted that a significant time interval has passed since the last instance.
Thanks for the totally normal response
No problem
The most normal response from a "blockchain developer"
just did that the other day with nodemailer lol
the most annoying part is honestly setting up all the checks and redirects on relevant pages
if not logged in, redirect to X, if logged in but not verified, redirect to Y,
and all the testing to make sure it works
Well luckily if they arenโt verified they canโt even login to begin with
So I just check on pages that require auth if they are logged in
Ive really come to hate nodejs streams ever since using rust
I use better-auth
felt so bloated, it doesnt provide functions that do the basic things you want without rolling some sort of webserver api on its own
you have to make backend fetch requests to itself
instead of calling its funcgtions directly lol
and some of its auth functions are supposed to be called from client side
like i cant run my own forms stuff?
idk i tried but i didnt like it
so i ditched it and rolled my own using lucia v4 as a base
Wym?
You definitely can
I use my own forms
What do you mean here?
Web api?
When was the last time youโve used it?
None of the problems you had with it seem to be the case anymore
like last month lol
Interesting
Iโve not had any issues with it
None of what you described Iโve had to do
for example i tried using authClient.signUp.email on my backend after receiving data from the form, and it failed
then i saw in the examples that authClient is supposed to be used from the client side
authClient is meant to be used on the client side
It makes server calls internally
To validate what itโs being fed
yeah
so if you use authClient, you dont use your own forms, i mean you dont submit them the normal way
Wym?
Iโm confused on what youโre talking about
I can show you my code if youโd like
like
I use my own forms, validate them and everything
the normal way is this:
form -> submit -> backend -> register
if authClient is used client side, than they want you to do this instead:
form -> js -> auth
ignoring/bypassing your own backend
Why would you need your own backend?
because i do?
What would you do yourself?
thats what i meant
they dont let you integrate it in your own backend
they replace your backend
i didnt like that
I understand that, Iโm wondering why youโd need your own backend here though
In what scenario
Itโs meant to replace the auth part of your backend
in what scenario wouldnt i want my own backend lol
You can still have your own backend
You just wouldnโt handle auth yourself
Youโd offload it to better-auth
that makes it way too weird for me
Interesting
having half of your backend outside of your control
I mean fair enough I guess
I just donโt have the know how to implement auth securely myself
im using sveltekit, i use its backend on many things
And most articles are half baked and from people who have no idea what they are talking about
every page has a frontend and a backend component
I have a C# backend
ah lol
i mean, idk about c#
But no one seems to know what they are talking about





