#development
1 messages · Page 116 of 1
Hey everyone
They have different limits, yes
I’m open to trading classes, for newbies and also those who are tired of encountering losses during trade I’ve got a way out fellas!
Slide into my Dm if you’re interested. . .
500th bitcoin related message on that server
lmfao
Educating individuals on the importance of acquiring digital assets. Staff member of Bitcoin.com. Enlightening the public about the massive impact of Bitcoin.
Enlightened me about how cringe and fanatic people are yeah
https://host.ithundxr.dev/n5qbtw.png
so how would i use like
a prop inside that
i mean like
{ customCss }
inside that
`` wont work
Something like
a={x ? y : z}
or what
Or like
x={`blah ${blah}`}
Some probably works
hm ok
at least that's how it's done in other frameworks
considering astro is a rip off
like 90% of frameworks these days
everything supports the same shit
How do I stop :hover on elements that are in a :disabled state?
(I don't want the background to change on hover)
Not pointer-events: none because I want to change the cursor still
got it
:not(:disabled):hover
:disabled:hover
{
background-color: initial !important;
}
😉
either initial or the background color the element has without hovering
should also edit the selector to only match your element
like
.myButtonClass:disabled:hover
will this cost significant performance when ran on every http request? yknow its for generating an etag header for caching on all requests that have a full body set
Depends on the hardware but I doubt it's much
U can reset the previous instance and reuse it
Instead of creating 2
U can also store it as a static constant
Also, ur encoding twice
B64 -> bytes -> b64
Nvm, that's the data byte length
Anybody working with Google Docs?
Loading back into my sheet after a while, the sheet already shows the error UNKNOWN FUNCTION.
The function is a self written function within the App Scripts extension.
It takes about 30s - 1min after opening the sheet until the function is loaded and available and all associated cell funtions etc. work properly.
Is there a way of speeding this process up?
I read about settings you can change via. the menu (FILE > SETTINGS) regarding calculation update interval etc. but can't seem to get things improved.
what do you mean by that?
Store the result of createHash
U can reuse it many times, just remember to reset it before hashing
how do I reset it properly?
Type . and press ctrl + space
_flush() ?
do you want me to reuse it globally or just in the function?
On the function
But u can reuse it globally too if u want
Less time instantiating the digester
wouldnt globally risk it getting mixed up with other requests?
guys
how do i fix these errors
Object is of type 'unknown'.
theres like
12 of them
typescript is yelling at me
U need to declare the type
Probably not
Depends on what ur putting into that variable
const user = os.userInfo().username
const path = `C:\\Users\\${user}\\AppData\\Roaming```
Can do this ig
it's data from an API
oh lol
Just uses slashes not backslashes, Windows understands both

because nodejs is an own environment as well as Windows
sure
node devs just lazy to add it 🤓
it simply doesn't know the environment vars of any other environment
isnt there a process. var that has the appdata path?
why don't u just add npm and/or nodejs (executables) to your windows environment path
Anyone have an idea of how I should handle collision in my ECS? I'm thinking that I have a rigidbody component that defines a hitbox, and if it collides with another rigidbody, there's an event that gets fired on both components. I'm not really sure about how much I like this idea though
don't need to use the path anymore but can instead execute them globally
Actually this is a pretty bad idea
AppData/Roaming or just AppData/?
someone help pls 
Roaming
Screenshot & send the error please
why do you actually need to access appdata?
See what data you're receiving and type it
how do i do that
needa save user settings
idk how to type something
create an interface or a type
interface Incoming {
name: string
age: number
}```
With an interface..?
when i copy and paste it from my browser it turns out weird
That’s going to be a hassle
bruh
Just type it out with the appropriate data type
what else am i suppose to do
Spend 5 minutes on structuring your data instead of spending 20 minutes trying to delete and replace random shit from a json response to model a type
How big is your json
windows + arrow right
thats like max 3 mins
copy paste it and replace values with their data types
other way around for me lmfao
since its roblox there are probably already 10 million types made for that
To each their own but deleting all of the stuff and replacing it will be annoying and more time consuming than just typing it out
This too ^
Probably a roblox API types package out there already made for you
typing keys will be slower than select + delete + type value
Not for me 🤷♂️
in terms of keypresses/keyboard ops
there i did it 
Wow look how hard that was
how do i use it now
Also be careful because half of these properties are probably nullable
Like sourceName and sourceDescription for example in your response are null, to tell ts that they could be null put a question mark after their type
type abc = all the crap you just wrote
const something: abc = ...
So like sourceName: string?
wasnt it sourceName?: string
Uhhh, I believe that means that the property is optional not nullable
Let me check my GitHub it’s been a while since I’ve used ts or js
Yeah that’s different from null
sourceDescription: string | null
I could’ve sworn there was an easier way
like that
You could also do a little fancy trick like this: ```ts
type Nullable<T> = T | null;
interface Person {
cardNumber: Nullable<number>;
}
But that’s just syntactic sugar and isn’t necessary
abc?: string is a shorthand for string | undefined but its called a "nullable" because other languages dont have undefined they only have null
I respect ts for making js decent but oh hell do I hate its syntax
Type '[string, unknown][]' is missing the following properties from type 'Game': id, rootPlaceId, name, description, and 20 more.
bro what
show code
what code
where the error is or maybe all
The code surrounding that error
my eyes hurt
imagine using sqlite
Too colourful to my taste
The editor, but that's personal taste
Cast gameStats not Object.entries()
Ik
Hover over gameStats, what does it say?
'gameStats' is of type 'unknown'.
You need to give gameStats a concrete type
as any
No, just don't
🗿
jokes aside don't do that
gameStats is an array of this data
to make less mistakes
then where did .data come from?
ran beautifully
cus the api returns everything under data
Can you show what you're defining gameStats as?
Perhaps you should make an interface that wraps the stats inside an object with data property

That’s why
gameStats as Game[]
response.json() returns Promise<unknown>
So you need to tell the compiler what type to coerce it into
I find it amusing that you think something is bad just because you don’t understand it
imagine tryna use typescript while complaining that its strict on types
broooooooooooooooooooooooooooooooooooo
Perhaps a couple days on java would be good for you
lmao
It's fairly easy to understand typing on it
I sometimes wonder why Battleless doesn't take anything seriously, always on the troll or lazy mood
“I hereby sentence you to 3 days of Java”
He is this time, at least more than before
I mean, he did try a calculator project
i don't understand this gibberish
Which is progress already
nooooooooooooooo
This is a perfect demonstration on why I think that javascript is bad for beginners

I got away with it completely fine personally, the start was a bit rough but it ended up great in half a year
whats a better language for begineers
Unrealistic expectations are formed, and they have no understanding of why a typesystem is useful or what it is
Go to codecademy and search for practice projects
i recommend assembly for beginners so that they can really learn to understand how the computer works
There should be some ideas on what u can make
youll find that most languages while different in syntax all use the same concepts
why does learning take so long
I would say JavaScript is great for beginners, just not for beginners who don't take a lot of things seriously and are just trying to skip through crucial details and try random things until it works
I think it's easy to use but I still recommend anyone asking me for what language to start with to try Java or C#
I prefer recommending static typesystems because it really helps you along the way
The compiler does quite a bit of safety work for you
It's more of a learning curve than a dynamically typed language, but overall I think it's more intuitive after a bit
oh boy let me tell you about the rest of your life...
Start with the easiest ones
you have instructions / information on the left, and a code box w/ terminal on the right
Try not to cheat as much as you can
i have to signup 
education doesn't come free
bruh
Some courses are free there
i am not paying to leearn javascript
There are free options
You don't need money to learn programming
yeah you can learn everything you need to know free, its just not bundled up into a course with interactive elements
thats what you pay for
switching back to js
well
because typescripts whole point is for those errors to help you
Tim already told you the solution
why do you want to use typescript if you dont like typing?
my god dude, we told you not to convert an existing codebase to typescript as your first project
literally ignored us completely
Yeah, though from my experience of recommending statically-typed programming languages to beginners most of them have failed, way more than times when I've recommended dynamically-typed programming languages to beginners, this is why I gave up recommending statically-typed ones as most of them will fail

but i don't want to rewrite 50 lines
So I want them to start easy and go up and up slowly
no 60
theress battleless and the chat is in chaos
I wonder how overwhelmed Battleless would be trying C++
oh god
rust
🧌
honestly I don't know which one he'd have more trouble with
I think that C++ would be easier for him than rust because the compiler does not give a fuck what you do 50% of the time
how about assembly
The problem is that the C/C++ compilers are way less helpful with error messages compared to the Rust compiler so there's also that 
ok i decided i'm quitting again for today
Yeah
@earnest phoenix adb shell pm uninstall android rn
You can't stop me, I am soon joining the Unicode consortium, and then to every other major organization/consortium
anyone has ever used prisma here?
i might need some help converting from normal pg to prisma on my api
join revanced in the meanwhile and maintain helper for me ty
Only if you become a catgirl
knew it
whats revanced
Java consortium 
That requires becoming an Oracle employee, I'm choosing Google over Oracle obviously :^)
Gonna also become a member of the C++ Standards committee
maintain android :trollface:
mfs on his way to maintain litterally everything
i litterally remember you becoming a member of nodejs

I'm not familiar with Android's codebase whatsoever so there's no way that's gonna happen
But I could if I dedicate a good amount of time
i mean
its java and java
most of the things are in java
Android's codebase is 80% C++
yes but most of them are also java
Nope
systemui is in java iirc
and many system apps
@earnest phoenix how about maintaining turkish gov-made shit :trolley:
and possibly find many many many vulnerabilities and find where i live
Literally 80% is C/C++, just go through them
They used to be written in Java, but not anymore
holy shit how many repos are there
insane
I wouldn't touch that shit with a thousand meter pole, those are insanely outdated and very poorly written
But at least not as bad as this country's
💀
java and c#
youll love
No thanks 
i can bet that most of their shit run on either java or c#
Java or C# aren't bad, their stuff is just very poorly written
not really
oracle is just one of the contributors
i know
bet i could rewrite them in js and make it better and secure
https://openjdk.org/contribute/
Over time, it's expected that skilled Contributors will eventually earn full commit rights for themselves.
but if you're recognized as a "skilled contributor" you can already consider yourself elite
they're extremely rigid on standards
"skilled contributor" = unpaid volunteer
lmao
I imagine having that on your curriculum would be a free pass to any coding job
best free discord bot dashboard site?
none
Im trying to make one
you need to code your own site from scratch
with html or some frontend framework
i wanna make my own discord bot website, and I dont know how to code websites where do i start?

is that free?
where can i start with this html thing
how are you a dev but don't know what html is 
I got help
I wanna make one by myself now
expect to input quite a bit of effort if you desire to make a site
it wont be simple nor quick to learn it
Huh, apparently that has changed, back when I looked it up you needed to become an Oracle employee
tho the time will depend on how maleable your knowledge is
didn't u check for JVM contributor?
cuz like, the oracle jvm is proprietary
the openjdk project itself is open-source
I'm talking about the OpenJDK project, from what I remember it required that though my memory could be fuzzy at that part
I mean im an fast learner
many providers have their own jvm implementations, some are open and some are proprietary
apache hotspot jvm is entirely open source, and the whole apache thing is community-driven
Yeah
I'd try to contribute to it, but I don't think my skills are high enough for that
still much to learn
what i do after i did what they told me to
click next
Ok
next probably?
thanks
Hey!
Hey!
Hru
make sure to pay attention and not just belly-push the course
i am good
if you're stuck in something you can always go back to previous lessons
Kuu, I worked on intervals and made it work, just having issues it won't read the excludedUserIDs array
Good
what's u current code?
(Obviously time will be edited this is just on the testing bot)
No just MySQL, however its in JS
It works now anyways, the issue must of been it could read it without it being in string form and I figured out why because the database oddly puts the ID in String form
Works for definite! Thanks
I need help
u need to put it nested inside div
ok
What's prisma?
prisma dn
no its terry
Okay
Nah you commit the migrations to GitHub
Nice
Genius
Ah yknow that’s a damn good point
Tim knows how to avoid any work 
Tim has been avoiding work for years now
wait a minute 
Might be thinking the 0 is null and tries to do that
Cast the 0 in an integer
But Javascript looks cringe
Says the Java user 
@neon leaf so I added a new domain to the mailcow and did all the DNS stuff but I can't send emails to the email, I can only email other people with it
@earnest phoenix ok yk what fuck https://rocket.rs

never ever use an unstable feature of a language in your library
Check your reverse dns
Also check the logs within mailcow
Yea I did all that
and doesn't seem to be any errors or problems with DNS stuff
Whats your email under that new domain
seems like now i am getting no emails from either domains nvm
ofc as I send it I get a email, but the other email still wont go through
Susmail
what you mean
I am happy to let you all know that this is the third year i take the spot as the greatest developer of all times
sounds like some weird domain name 
With the website title being
WATCH MOVIE
XNO VIRUS 100% SAFE
Sent you a mail
Make Sure you only use one Mail Subdomain, on the second Domain mail.second.domain needs to be a cname to mail.first.domain
Least complex rust framework type
This is the mail system at host mail.cringe.dev.
I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.
For further assistance, please send mail to postmaster.
If you do so, please include this problem report. You can
delete your own text from the attached returned message.
The mail system
contact@phantommovies.com: host
eforward2.registrar-servers.com[162.255.118.52] said: 554 5.7.1
contact@phantommovies.com: Relay access denied (in reply to RCPT TO
command)
Your mailserver is brok
Sanest type in the blazingly fast™️ and safe™️ programming language called Rust™️
🚀🚀🚀🚀🚀
I see so I need to make a CNAME of mail.phantommovies.com -> mail.aarondye.dev?
I think I did that though
I can’t confirm rn cause I’m omw to school
@earnest phoenix @civic scroll me when ```rs
warp::filter::then::Then<warp::filter::and::And<warp::filter::and::And<warp::filter::and::And<Exact<warp::path::internal::Opaque<&P>>, impl warp::Filter + warp::filter::FilterBase<Extract = (), Error = Rejection> + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase<Extract = (std::string::String,), Error = Rejection> + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase<Extract = (vote::Vote,), Error = Rejection> + std::marker::Copy>

{"key": {"hello": "world"}}
What would be the best way to get "key" from {"hello": "world"}
javascript
Get the key from the value
Well that kinda defeats the purpose of a map doesn’t it
But if you really needed to, there’s a .find() method iirc
Object.keys(obj).find(key => …)
Got it
hi waffle
Hi
i hate rust ownership + lifetimes + async so much 😭
rust has the same async shit as js/dart?
yes
but you have to use a third-party runtime like tokio to use it
async fn func(a: u8, b: u8) -> u8 {
a + b
}
#[tokio::main]
async fn main() {
println!("{}", func(1, 2).await);
}
I really really hate that kind of asynchronous flow
like, I get it on langs like js or dart where there's only one thread handling everything, but ffs stop adding it on every new language

Object.entries(obj).find(([key, value]) => boolean);
less access call
I'm 100% happy that in java all you need to do is ```java
try {
var res = someasynctask.get();
} catch (InterruptedException e) {
// handle the exception, if it ever happens
}
just use .some()
no contagious async bullshit
in this case
Object.entries(obj).find(([key, value]) => key === "key" && value?.hello === "world");
you don't use some when you wanna retrieve an element from an array
isn't this basically just threads
oh right mb
yes, we eat our threads with bacon and eggs

@earnest phoenix imagine javascript with threads
Worker threads:
but worker threads are very unintuitive to use + you can't pass class objects within them
How are they unintuitive to use? And you can pass objects around, there's a thing called structured clones
then what about references
Concurrent references are not really possible in JavaScript because of the nature of the language, the language itself needs to support multi-threading in a way that it has keywords and functionality to synchronize and join threads
yeah workers stink because you can't really share memory
I think you have shared buffers but that's about it
is it possible to only have two fields per row in an embed?
like
field field
field field field
field filed
or sum
You can't really organize them no
there's one (hacky) way to do it, which is by using invisible characters for the "empty" fields
it'll look AWFUL on mobile, you've been warned
Yeah that's the thing
Will never be consistent and looking decent on every platform
So better just forget about it 
I can see why they couldn't put more than one column on mobile but damn the result is horrible
i hate discord
because placeholder
why
because I havent installed ms yet

average useless command giving 0 useful information
what would be useful?
it'll look like this on mobile:
CPU Model
AMD blablabla
CPU Clockspeed
69420MHz
Memory Usage
25.58GB
Memory Total
33.27GB
Storage Usage
138.48GB
Storage Total
242.11GB
since fields flex horizontally but not vertically
yeah I saw it
ok guys
it fills the entire screen
time to work on typescript again
and that's ONLY 6 fields
things get much worse near the limit
Servers/users count and maybe some other stats depending on what your bot does
user count dont bother, nobody cares about it
user count does matter
it's a meaningless big number

Certainly more interesting than the CPU model
you could put any number you like there and nobody would know
definitely
Users only count imo if theyre users in your database whove done something to be put into that db
it shows stats of my nodes, nothing to do with my bot
i have a string "18april 5:45pm"
i want to get the leftTime in ms;
any solution?
I could put that my bot is used by 12 billion people, wouldn't prove anything
but you'd be lying
how would you prove?
there are only 8 billion people in the world
i think only one person has used your bot in CW out of like 600k people
609k
thats me
only i have used it 

user count is just an arbitrary value
lol
not if you would only count people that ever executed a command
but nobody does that
'Members: ${Math.floor(Math.random() * 1_000_000)}'
I can't

what I mean is, that value represents nothing at all
why not
just that you share servers with X people
yes
it means i could dm advertise to 800k people
🤩
no discord has my id
they will sue me
Against Top.gg rules too unless a user does something to trigger it, like levelling up
won't be hard to recognize it's your other account

not even a tiny bit
ok
i will make it like mee6
when you rule a command
it's like finding a glowing bowling ball in a haystack
it'll spam you with dms
btw guys
how do i check if someone has dms open
cus error when closed crashes my bot 
this is not ideal
you're supposed to catch your promises
force me to manually add group counter to gatito
in a haystack of 10 cm^2
await user.send().catch(() => {}) // catch if closed```
i don't really have anything to dm advertise to people anyways
and i can't even i don't have the guild members intent

meaningful numbers are average ping, server location, guild count, uptime, version, database latency, etc
stuff that directly influence the user experience
i need to fix my bot tbh
server location is pretty useless
useful for music bots
or not
its for my nodes, it has nothing to do with my actual bot
database latency, meh, eventually for developers - users just want it to work they don't care if it's 10ms or 15ms latency
average ping, depends what you measure
and guild count, sort of useless but not entirely
can just get the oauth invite and you see the number
it's good info to have if you ever need to troubleshoot shard issues
that way u can ask the affected user that info
you should get the information by yourself
it's not hard to get relevant information on your own with some small information coming from the user
once you understand what a shard is it'll get clear why they do it
what is it
🗿
thats all i really know
LMFAO
quoting
"i do know what a shard is"
quote of the day
@rose warren where is starboard where we need it most 
Sorry I just had to remember to ask your mum to force it into the channel
||it doesn't||
who said that lol
no more cringe jokes
someone told me that coding is bad
And they were right
How long after changing my bots name does it take the website to update?
I have over a month ago and it still hasnt changed
you have to click save on your bots edit after that
-refreshdata
Fetching Your New Bot Data
To fetch your bot's new name or avatar, please follow these steps:
Click the Refresh Data button in the sidebar on the right.
Click Edit on your bot page and then Save.
💡 Please note: If it still doesn't seem to change, make sure you actually changed the bot's avatar / name on your Discord Developer Portal and not the application's icon / name.
Fetching Your New Bot Data
To fetch your bot's new name or avatar, please follow these steps:
Click the Refresh Data button in the sidebar on the right.
Click Edit on your bot page and then Save.
:bulb: Please note: If it still doesn't seem to change, make sure you actually changed the bot's avatar / name on your Discord Developer Portal and not the application's icon / name.
WHAT
https:///top.gg
wtf is happening to the hyperlinks 
discord trippin
discord momen

omfg
i HATE NEXT-AUTH
ITS SO SO SO SO SO SO SO SO SHIT
like it was working perfectly
THEN I GET CLIENT_FETCH_ERROR???
time to scream at people in the discord devs server 
like no code changes or updated etc
fix it
CLIENT_FETCH_ERROR
If you see CLIENT_FETCH_ERROR make sure you have configured the NEXTAUTH_URL environment variable.
[next-auth][error][CLIENT_FETCH_ERROR]
https://next-auth.js.org/errors#client_fetch_error undefined {
error: {},
url: 'http://localhost:3000/api/auth/session',
message: undefined
}```
NEXTAUTH_URL exists
because its going to localhost:3000
lol
Not that I know your framework at all but the error let's me assume the client's session can't be fetched which probably means the client blocks all cookies
Just a wild guess
well theres nowhere that blocks cookies
https://i.imgur.com/GKpWzZf.png noooo wtf
and like
bro
it worked 5 mins ago, then i restarted next.js (replaced a bot token), and it broke
discord try not to break challenge
lul
need discord 2
apparently emojis will no longer work even after it's fixed

final words
bro
i got banned for sending too many emojis
wtf
😭
i kept forgetting you're not allowed to send emojis by themselves 
Changes are being reverted for now. Going forward though, links with emoji in the title will probably not work.
guessing this is related to discord starting to open up markdown to user accounts?
markdown is already enabled in a few servers
Search the world's information, including webpages, images, videos and more. Google has many special features to help you find exactly what you're looking for.
now i need to manually remove emojis from all the game titles
and like half of roblox games has emojis in the title

can't wait to do this
stupid server
Will lead to even more scam
yes and no
why
they added a new popup to markdown links
stop bullying
this is why i hate discord
redesigned link modal
That still doesn't prevent people from not reading the real url or disable the warning forever
guys
The popup already exists, names the url and people still and already fall for it
regex
test
test 
for you
sus link
ok i'll send a hastelink with the code then
ok

(codelink)
Lemme guess we got new emojis?
What's new this year? Pregnant men 
Pregnant man would be worrying
Oh wait
I actually wonder, does anyone ever use 99% of the available emojis?
Some are so fckin niche that it's hard to ever come by a valid context
Indeed #development message 
same here
Glad I didn't update my phone (yet)
lol
stop
does 25$ per month for 20mbps expensive?
getTime(dateStr, locale) {
const dateObj = moment(dateStr, 'DDMMM h:mma').locale(locale);
const ms = dateObj.valueOf();
return (ms - Date.now())
}
dateStr = "18april 8:15am"
locale = "en-us"
but the ms i get is wrong
its 8:03 rn,
when i type "<t:<ms>" it shows "1:40pm"
The number should be in seconds, not milliseconds and it needs to be a timestamp
im converting it into secs but still wrong
not just secs, but also a timestamp?
<t:${Math.trunc(dateObj.valueOf() / 1000)}>?
isn't that what you need?
oh thanks
love how he says this to the guy who literally made shit to counteract suspect links

Lol
lol
I don’t even bother
So paranoid yet the same type of person to try to use a clash of clans free gems generator
free robux generator
I used a minecraft account password generator lmao
I HAD AN ACCOUNT
Lmao
oh the stupid things kids do
enter your username and password and we'll generate you a new one!
The thing is, doing those stupid things I learned so much.
Those phases of doing stupid things are so valuable, and will be for my whole life
getting scammed on runescape, good life lesson
it's like the saying "playing stupid games allow you to win stupid prizes"
Is there any global function or methods available for fs in nodejs to get the file hash I'm not aware of or do I need to use the crypto module?
crypto
you need to use your brain
error: brain not found
its still the correct way to do it
unless you wanna spin a third party pure js hashing algo, which will likely be slow for big files
anyone here know how to install wifi drivers on liveboot kali linux?
Why are you using Kali Linux may I ask?
lmfao the
educational purposes
sentence
just go to the vendor of your network card and install the driver
as easy as installing a random software
let me tell you the entire error
my limitations
first, i dont have any wifi/ethernet so i cant install some drivers.
I dont have my ethernet cables laying around, my router is kinda far from my pc and im using a wifi extender
You know USB keys are a thing
Then use that
Download the driver, put on USB key, plug in desktop/laptop, install driver
ok
U can still download the driver on your phone
liveboot
can u even install stuff on liveboot?
yes
You can download it from your Pc when connected to your phone after
im not using phone
im using kali linux that is on a flashdrive
though not really useful to install on live mode
so i need to put the drivers on another flashdrive first and install it afterwards in kali linux?
ok
i'm surprised people don't come up with such ideas on their own lmfao

I'm facing a new issue with my bot. I'm using the correct token and when I'm trying to login, it's saying invalid token is provided. I've reset it 2 times, but still the same issue is arising
nope, I tried doing console.log and it's showing correct
and even I tried to login directly by passing string as token in client.login
but still the same issue is arising
Well something you’re doing is wrong, I can’t really help you without more details
Can you show your code..?
It's a large code, which part of it should I show ?
Token should be string no?
The part where you’re logging in
yes it's string only
const AresClient = require(`./structures/AresClient.js`);
const client = new AresClient();
(async () => {
await client.initializeMongoose();
await client.loadEvents();
await client.loadMain();
await client.login(client.config.TOKEN);
})();```
it was working fine an hour ago
I gtg but I’ll help later if you haven’t figured it out
but my bot gone offline without any reason
Looking at this, it already doesn’t look right
I also tried using
curl -H "Authorization: Bearer token" -I "User-Agent: DiscordBot()" https://discord.com/api/v10/users/@me, but it's showing this
curl: (3) URL using bad/illegal format or missing URL
HTTP/1.1 401 Unauthorized
Date: Wed, 19 Apr 2023 16:12:26 GMT
Content-Type: application/json
Content-Length: 43
Connection: keep-alive
set-cookie: __dcfduid=f97613fadecc11ed8ff356de646c551a; Expires=Mon, 17-Apr-2028 16:12:25 GMT; Max-Age=157680000; Secure; HttpOnly; Path=/
strict-transport-security: max-age=31536000; includeSubDomains; preload
Via: 1.1 google
Alt-Svc: h3=":443"; ma=86400, h3-29=":443"; ma=86400
CF-Cache-Status: DYNAMIC
Report-To: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=N2odYgbgoXHHijoCsZLaW0Hgz7%2BUGWTq11A63ztmyHTStI7gr8doaxrrUFaJ3JxAnZra0aYDIt%2FyQ4Qgi6PeseydNCItCNtOo%2BEZ3Y6L4UbZ5Kq4yN%2Bg2CxvUYXQ"}],"group":"cf-nel","max_age":604800}
NEL: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
X-Content-Type-Options: nosniff
Set-Cookie: __sdcfduid=f97613fadecc11ed8ff356de646c551a41efa4809b0feeec4539a60f50f1088c01a55cc10703f3d70e1d25f92826dee2; Expires=Mon, 17-Apr-2028 16:12:25 GMT; Max-Age=157680000; Secure; HttpOnly; Path=/
Set-Cookie: __cfruid=9ca4f8e92cf3bc22e88a8b62326b7bcbfb90bea1-1681920746; path=/; domain=.discord.com; HttpOnly; Secure; SameSite=None
Server: cloudflare
CF-RAY: 7ba66dd44ee58a24-BOM```
A discord bot has no bearer token
It has a bot token
Authorization: Bot <Token>
Not Authorization: Bearer <Token>
I highly doubt that client.config.token is your actual token btw
If it was, it would be working
Probably the client secret or something similar
I still don’t even see where you’re loading that anyways
still it's showing same
401 Unauthorized
Then your token is invalid and not a bot token
You know rate limits exist
then what should I do now
ok
I'd wait up to 24 hours
so i noticed a website that was using a websocket for it's entire functions and the data passing through was encoded with binary
how does that work
it was using blazor btw
The client encodes the data and send to the backend.
The backend decodes and read the content.
The backend encodes and sends to the connected client(s).
The clients decode and read the content.
Very mind-blowing
how doesn't the significantly slow down the site
b64 encoded data isn't very slow to revert to bytes
test
test
🤌🏻 MADE MY DAY :>>>

depends a lot on the encoding methods but the internet is already binary to begin with, for example:
json:
object -> json string -> utf8 bytes
utf8 bytes -> json string -> object
meanwhile a binary enconding method can be much simpler and faster:
object -> binary encoded bytes
binary encoded bytes -> object
so depending on the actual encoding method used and the efficiency of the encoder and decoder, it has the potential to be much faster than string/json based data
Anyone know how to approach this practice problem? I feel like I am lacking some understanding or some information to solve this problem
schools teaching assembly like that should be abolished
I know right
nobody does that anymore, completely pointless
could've helped with actual asm but that's out of my knowledge 
Like anything would help
I mean, is it good knowledge to have? yes it is
But is it completely sadistic to teach it nowadays? definitely
I bet the answer is 7








