#development
1 messages ยท Page 2011 of 1
let getResponseFromAPI;
await fetch(`https://transparent-speckle-door.glitch.me/checkPassword?username=${Username}`)
.then(res => res.json())
.then(out => getResponseFromAPI = out);
``` this better lol
yes, but no
const getResponseFromAPI = await fetch(`https://transparent-speckle-door.glitch.me/checkPassword?username=${Username}`)
.then(res => res.json())
NO
I had that from the beginning it didn't work
remove then 2nd .then

THE 2ND THEN IS WHAT MADE IT WORK
lmfao
I just got totally lost watching a clip of a random tear animation I made a while back ๐
you seems to have skill issue
what did polish people do? :<
no, after debugging it many times it is what made it finally work
lmao let's just delete everything
but await awaits everythinf right
i feel bad for how much i laughed at this
lmao
@cinder patio imagine opening in webstorm and it starts throwing code quality warnings
that's the good thing about jetbrains
it doesn't try to make your code look good, it doesn't try to make you feel less bad from writing shitty code
it'll tell you plain and simple that your code sucks and you need to fix it
unlesse
evil company

okay Imma dip
thanks to everyone who didn't immediately blocked me and went on with their lives
blocked
jk
๐

don't worry Tim doesn't block anyone who could possibly distract him from moving on developing his API

funny thing is the repo actually made news headlines now
"very nice"
great way of getting exposure
Time to add that to a Discord library. Discord sends you a list of voice regions on READY, so you can triangulate the user's approximate location and guess from there
Time to install a node-ipc on a bunch of Russian VPSs 
So why is "anonymous" voting done via reactions in a public channel instead of dm'd polls that are entirely anonymous?
Who/what are you referring to specifically?
I think you have the wrong server
I have to write an algo which compares the differences between two files, if any lines have been added / removed and lines which are edited... but that sounds hard
let _amount = 5;
Amount = _amount;
var interval = setInterval(() => {
Amount -= 1;
if (Amount === 0) {
clearInterval(interval );
}
}, 250);
```can anyone tell me why this loop never stops?
you have 3 different variables which are called amount lol
I see 3 different vars named amount
pick one
now there's 2
_amount is actually a variable that is picked by the CLI
I just put it there for reference
well you updated (amount === 0) to (Amount === 0) now which is correct
well I do have it correct in my actual script, I just wrote this quickly for reference as to ask why it never stops
could it be that the actual
if (Amount === 0) {
clearInterval(interval );
}
``` is inside request function?
after he changed his typo
yeah but I don't have this typo in my actual code and it never stooooooooooooooops
yeah add a console log to see if it really stops
I don't need to I have a request inside the loop that pings a website and returns a console log
ok
you're delusional babe
If that's the 100% exact code then it should stop
give us more to work with
do you want the actual code then?
yes
let amount = 5;
var checkWebsiteAliveInterval = setInterval(() => {
amount -= 1;
req("https://google.com/", (error) => {
if (!error) console.log(`WEBISTE IS ALIVE!`);
if (error) console.log(`WEBSITE IS DEAD!`);
if (amount === 0) console.log(`PINGING STOPPED`);
if (amount === 0 && !error || error) {
clearInterval(checkWebsiteAliveInterval);
return recursiveAsyncReadLine();
}
});
}, 250);
``` this is basically what it is
I just removed _amount since it's not needed
I meant to say if amount is 0 and there isn't an error then true or if theres an error return true immidietly
๐ข thought you were gonna say that my syntax is good lol
You need to use await here. the code inside the req callabck doesn't get executed right away
where exactly?
so you're sending way more than 6 requests in reaility
how? is that why it never stops?
That's why it appears to you that it never stops
once it goes beyond 0 you're fucked
control + w or alt + f4 or control + c fixes it right up
(depending on where you execute the code, actually)
let amount = 5;
const checkWebsiteAliveInterval = setInterval(async () => {
amount -= 1;
const resultOrErr = await req("https://google.com/").catch(() => undefined);
if (!resultOrErr) console.log("Website is dead...");
//...
if (amount === 0) {
clearInterval(...);
}
}, 250);
there isn't any difference besides a catch
.. and an await
... exactly.
that will fix it, really?
and the code is cleaner in general
that can still break
how
how
if the response takes more than 250ms to return, another interval iteration will run regardless, and set amount to -1
yeeeah
OMG
you need to amount -= 1 after the await
how about not using an interval in the first place?
that's why I limited it to 250ms
thats like so wrong for this type of thing
I need to ping my api many times since it's glitch
you can just do a for loop
yea for loop also
use a recursive function or a for loop
why people insist in using X === 0 instead X <= 0 if beyond me
also var
why do you hate var so much
just noticed if I did a for loop I couldn't control the speed
I don't want it to take place instantly
although asynchronous delay could do the trick
you can add delays to a loop
you can create a sleep function which uses a setTImeout
ya that's what I meant by an asynchronous delay
it's a shitty way of declaring variables, causes a ton of weird errors, is terribly inefficient and any respected IDE will throw a hundred of warnings in your face
another thing you can do, which actually makes sense for this, is add a time limit for the request, and if it doesnt return within the limit, assume offline
I use VSC and gives me not a one error
and it's one of the most popular, if not the MOST popular idea actually
there really is -1 reasons to use var instead of let
really
vscode isn't an ide
then which editor is better than vsc
for js? webstorm
vscode is ideal for js
never heard of that
shut
he edited "ide" for "editor"
also @cinder patio so then I should use a for loop idead?
idead
idead lol, me too
yeah
okay it looks actually kinda nice
vscode is the best if you exclude IDEs
although it's primarily web based
bloat compard to vsc tbh
not really
VSCode is pretty much an IDE for javascript these days
from the looks of it, it is so
I use it more for c# tbh
the name also, but the loops more
what loops?
Yeah and I use it for Rust and C++. VSCode is pretty great.
bruh sorry I was thinking about the loops and typed it out instead of "looks"
js is mostly used for web, so they use web examples
visual studio BY ITSELF is bad af
never said it was good
vsc is the good one
this is the important part
shhhhhhhhhhhh
For JS I am going to argue that it IS an IDE
you can make it into an ide with enough extensions
for JS only (and TS)
well, you can consider a dog a mollusk as much as you want, doesn't change what it is
but back to the topic, change those vars
and use less risky boundary check
i kinda feel that way about vs code too
with a few extensions its basically a full ide
i write/build/run my c# code in vs code using dotnet
should I put the i === 0 check inside the for loop or inside the req function?
It has built in debugging and autocomplete for JS and TS. For other langs you have to install plugins
/ extensions
well, it's useless to argue any further so I'll cut the discussion here
no, use proper boundary check
you think I'm wrong?

which is?
your opinion, I can't change that
vs code is treating the boundary lines very much so imo
but how is it wrong though
either less-than or greater-than (or ~equals variants)
as I said, I can't change your opinion, all this discussion will bring is a mod telling us to cut the topic
guys chill
I'm waiting
for me (and microsoft), vscode is a code editor, you can put as many plugins as you want but that won't change what it is
vscode is more feature-rich than lesser editors like sublime or np++, but less than an actual IDE
take eclipse (shitty one) for example
code editor != text editor
you can build and test software in vsc with a bunch of extesions
which are free btw
yeah and for some languages those features are builtin
That is such a weird sentence. It's saying the same thin??
TypeError: req(...).catch is not a function
again imo, vs code treads the line between editor and ide very much
The definitions are so blurry that I'd say it can be considered both
kind of yea lol
opinion

is it async?
at the end of the day, if you can write and run and debug your code, use what makes you happy on the inside ๐
yeah
okay crazy idea but
what if we get rid of ide/code editor distinction and just call them editors
this ^
who cares if you use intelliJ or neovim: you can make both the exact opposite
imo, they should update the definition of ide, and make it for specific environments. like, i'd consider unity an ide for game devs, or android studio for android devs
rl.question(question), async (_speed) => {
if statement{
another if statement {
for loop {
const awaitedExpression = await req(websiteToAlive).catch(() => undefined);
}
}
}
}
sorry for bad syntax lol
but then you could argue tools like visual studio can be integrated within those environments
and then you could ague so can vs code... lol
so what's wrong?
use codeblocks please
I can't copy paste all of it
I'm arguing that VSCode IS a IDE for javascript and typescript. The answers in that seem to be talking about C#. Yes, C# is easier to write in VS
const awaitedExpression = await req(websiteToAlive).catch(() => undefined);
I'm not talking abt VSC vs VS
but not hard to write in vs code. you literally run dotnet new console to create a new c# console application (granted, you need the c# plugin)
well then is there a problem or not?
show where u define it
const req = require('request');
lol
at the very start of the script?
didnt we talk about promises vs callbacks before?
tell me it isn't this
and how request does not support promises
have you really been coding since 2018?
yeah lol
I'll just switch to fetch then
that is pretty simple tho
that doesn't really bother me
what can you do in nodefetch that you can't in request
besides the promises
I used request for forever
adding it to any program is muscle memory so
request has been depreciated for ages - i use bent, node fetch is fine
can't just automaticalyl stop
I also have nodefetch in my program so I'll just use that ig
worried to ask if you add it even to programs that don't use requests
most likely not lol
I recommend reading what changed in latest node versions, much of the stuff that was fine to do back in 201x is now either deprecated or frowned upon
not only that, but general stuff
and also change all of my vars to lets
honestly, keeping up with all the changes for various packages is time consuming af
lol
like, languages are VERY volatile over relatively small periods of time
I'd hate to care about changes
there's a reason they say being a programmer is re-learning to code every day
don't code in python then
I'm not a person that wants to update their bots code every week because a single feature has changed
they literally kill the language every single update
I havent heard that before, but it seems fitting ๐
I hate python so much
my teacher used to say it a lot
not only because of what you said, but also bloating, syntax and much more
not every week, but most like every major update
like, u make a bot in node 16, when you update to 17 you need to check what was changed
for example in node 15 (?) they added optional chaining
which made a HUGE (in capital letters) difference in how your code flows
let val = ...;
if (val == null) { // or if (!val) { if it wont return a falsey value
val.aFunction("abc");
}
became ```js
let val = ...;
val?.aFunction("abc");
node itself rarely ever pushes breaking changes tho
discord.js on the other hand...
ye, I meant more for how things stop being "okay" and become "could be better" over versions
C would like a word with you lol
C fights with its own compilers
clone a javascript repo 1 year later and nothing works. Clone a C project 15 years in the future and it runs perfectly
yeah cause it gets zero updates lul
C++ for example, a few years back it was fine to include using namespace std in every project was relatively common
now the community will yeet you out of the building for doing that
3 words, say them and I'm all yours ๐ฅฐ
but both are valid and still work in the latter version
using namespace std
so no reason to be scared
they are, but isn't recommended anymore
i'm thinking of three other words and it's not fine
yeah so that's why I don't really care about changes
its not fine
bad thing
you say it's bad, but if it works it works
goes to search for that cow gif
in some cases, like now had to switch from request to fetch but still
if you dont like switching, then dont use external libs
lmao
node has built in http
possibly the most inconvenient builtin library of all time
I forgot about that one
also
node has built in fetch now
experimental in node 17
will be enabled by default in node 18
they merged node-fetch into it or is it entirely new?
also @lyric mountain you won't believe my big brain plan
they merged undici and undici-fetch
want to hear it?
depends
as long as you don't say you'll transform request into a promise-based lib
why would I do that -_-
pretty sure that already exists
at this point I'd prefer nodefetch
but yea
my big brain plan is
since I can't move my files from glitch to repl it, since sqlite doen't work with repl, the thing I just made can ping the website like 5 times and bring it back alive for like 3 seconds just to check the password
I just want one single unified web api
๐ญ just pay $2/month for a vps lol it's not worth the pain
insane ngl
you spend way more money every month just going outside or buying random shit
still
I mean, why u want the site to be 24/7?
websites are fine being on only when used
exactly, can just bring it alive for 5 seconds to check the password and then it can go back offline
no need to ping
and by doing that I won't break their tos
when u access the page it'll go on
browsers send a GET request when u open any website
yeah, but if I don't ping it, or at least await it it won't work
have to start it up beforehands
why?
because glitch websites take ages to boot up[
well, but how would you know when to ping?
bring it online
// do some other stuff
// by this time like 3000ms should have passed
//login takes like 1000ms
and website should've booted by then
big brain
that one actually doesnt use request, it uses http
a
b
c
how do you guys transition guilds to slash commands?
I looked into it and it seems like you can attempt to sync commands in a guild and if you get an error they dont have application.commands scope and have to re-invite the bot.
is that the best approach?
just ask them to reauthorize the bot
and obviously, check if the scope is enabled before pushing slashes
can you be a bit more detailed?
check if the scope is enabled before pushing slashes
how? is there a way to check the enabled scopes?
check the docs for that
how do u handle a Cannot send messages to this user error without the entire app crashing
catching it
does anyone know a safer way to do this?
eval(fs.readFileSync(`./customcommands/${answer.replace('-', '')}.js`, "utf-8"));
require
uhh
client.users.fetch(USER_ID).then((user) => {
try {
user.send(`You just purchased a ${item} for ${price} Cips`);
}
catch (err){
console.log("err")
}
})
this kinda catching should work right?
require caches so no
JSON.parse(fs.readFileSync(`./customcommands/${answer.replace('-', '')}.js`, "utf-8"))
.. why json?
no worries
you can remove the cache tho
So what? Why don't you want caching
delete require.cache[require.resolve('./b.js')]
because I need to execute it many times not execute once and then cache to memory
then use eval
already do
dont use eval just clear the cache
innefficient, at that point eval would be better regardless
I guess I'll stick with eval for this one then
I did, I dont see any way to load what scopes your bot has on a guild
I mean your method is still as inefficient. If the code never changes, you just need to run it multiple times, then wrap it in a function, dynamically import it and just call the function whenever you need to
If it changes, then this is your only option
that's a pretty good idea although my I use eval because the customcommands folder changes during runtime many times
and I want to update realtime what commands are there to show in a GUI
uh what why
like in development?
I'm working on an integration system
execute custom scripts from a program, save and reuse for convinience
also gonna add support for more languages soon
logs the error but still manages to crash the app
you didnt await
you wanna know the ultimate trick to convenient development? Do development by running test suites and once your tests are passing, hook it up to discord
No eval and reload required
Regex question:
it("...", () => {
// I need to get everything in here
});
it("...", () => {
//... And here
});
The regex I have is it\(".*", \(\) => {((.|\n)*)}\);, which works the first time, and then it captures everything. I want it to stop at the last }); before another if or a newline \n
nahhh I'm making something different although nice idea
why not just parse the AST?
honestly just do
const user = await client.users.fetch(USER_ID);
try {
await user.send(`You just purchased a ${item} for ${price} Cips`);
} catch (err) {
console.log('probably cant dm that person', err);
}
I could... but a regex solution seems possible too
regex isn't really meant to solve these kinds of problems
people say regex shouldn't be used for that
personally I think otherwise
my script is like 25% regex, constantly increasing and nobody can stop me
have fun having a slow ass script :^)
few ms doesn't make a massive difference
I'm working on a tool that parses the entire topgg codebase with @swc/core to look for translation strings in order to reduce bundle size. The entire thing executes in a couple seconds and that's mostly because it's in js and not compiled to wasm
would recommend
but there are other compilers out there you can use like babel that have better support
but why do you need to do this anyways
I think I'll go with the swc one, I've used it's Rust API and it really is super fast
I'm creating a snapshot testing tool for one of my libraries
why not use something like istanbul instead

wait snapshot testing? I thought you wanted to look at testing summary
same error but weird how it doesn't log the "probably cant dm that person"
just found this ๐
hm no then you probably did something wrong or I suddenly forgot how to javascript
that last sentence is totally wrong lol
it's what leads people to write 200 char regexes
it looks fine to me
it's what the sentence said, better than having a 400 liner
The thing is that I'm testing a typescript transformer, so integrating that with existing tools is pretty difficult.
I'm basically writing integration tests for the transformed code, and snapshot tests on top of that to easily view changes in the generated code. So the integration tests check if the generated code is correct, and at the same time if there is any regression or anything of that sort.
It's a unique case, can't find anything to help me out lol
absolutely not, I would much rather write a 400 line parser than a 200 character regex
you're going to go insane the second you need to make a change to that regex
hmm well I prefer to keep it simple
big regexes are not simple tho
and the snapshot tests get the source from the transpiled integration tests
well not simple more "compact"
couldn't you use jest's own snapshotting for this?
I can't get the transformer to work with jest
if I include a simple backslash text explaining what the regex does it's not gonna be as hard
and ts-jest to be specific
await user.send(`You just purchased a ${item} for ${price} Cips`).catch((err) => {
console.log('probably cant dm that person', err);
})
yeah not sure what happened but this worked
How do you fix an error with this regex
(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])
if you run into an issue you're basically fucked
found it a happy face it is
no that's just a generic email regex I copy pasted. It probably works for most things and is good enough to use
but if you run into an edge case you have no way of solving it
no, the regex is wrong
not to mention regular expressions can only describe regular language. You can't use it to reliably parse programming languages
the backslash should be a \ instead
nothing is impossible
no it is quite literally the definition of what a regular language is
one that can be expressed by a regular expression
if you have something like js which is a context sensitive language you can't parse it with regex
but you can still do it in regex, and if you format it nice it doesn't make a difference
if you enjoy pain I suppose you can
๐คทโโ๏ธ I like a challenge
there are challenges and there are wrong ways of doing things lol
regex isn't always that bad though
I agree sometimes it's better to skip regex, but in most cases using regex is a good idea
because regex isn't capable of representing the language you're trying to describe, the regex you have to write to cover more edge cases become more and more absurd until a point where it just makes no sense anymore and you can't really use it
try working on a parser without regex sometime. It's fun
or use regex in your parser, doesn't really matter
a json parser is a fun one and can't be made with regex
if you worry about syntax you don't have to use it, in my case at least it had helped me immensely with some stuff I couldn't do in the language or was quite literally harder to do without regex
with regex you can fit difficult to code checks in one line
we'll see
Regex this regex that, you shouldn't be using regex for everything or at least most things, here I work for Discord mobile's syntax highlighting library which uses regex mostly and that's a bad idea in general because it becomes extremely difficult to parse programming language instead of just using a text parser such as TextMate
imagine having a parser for each language tho
terrible but understandable
I'm not talking about stuff like that though, if you do something like this in regex well
I can't have a say in that lol
the "benefit" of regex in this case is it's kind of fault tolerant because it kind of works with syntax errors
although im pretty sure tree sitter supports that too
I suppose that's why the regex approach for Discord mobile's markdown and syntax highlighting was chosen, although we'll be working on an actual parser, although parsers can also be tolerant for syntax errors if desired with a few options, using regex causes extreme amount of overhead for such simple operations as mentioned (not the syntax highlighting), I know that we've optimized the shit out of regex engines such as in our V8 engine, but doesn't really change the point much
well if you're doing syntax highlighting in a client's machine the overhead seems negligible
when they're looking at like max 1 full page of code
Yeah, but the concern here for the syntax highlighting library isn't the performance, but rather the ease of making support for newer programming languages
right, regex seems awful for that
Regex generator from an AST? I wonder if that's doable ๐ค
why not a parser generator lol
In websites and applications when the code is little having a smaller bundle size > better and faster code highlighting
at least imo
It takes like about an entire week or more just to add syntax highlighting to a new programming language (a proper and big one, not placeholders and simple esolangs or markdowns, such as Diff)
AST > regex would help those tools out
It took me 3 weeks to add JavaScript and TypeScript syntax highlighting to Discord mobile, and 6 months for it to land because the open-source libraries are inactive...
wow.
you used kotlin for the smali files?
I'm unsure if that relates, but that's just how it's written and integrated to the Discord mobile client, and it's extremely fast in this case
didn't know discord used kotlin, but that's pretty cool
Discord doesnโt use Kotlin I donโt think, Kotlin is just a really friendly language for integrating with Android
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
looks like combinator magic
parser combinators gang!!
does github.io allow for 24/7 hosting?
I was thinking, would it actually be possible to host an api on github?
this is javascript that runs on your client
all github pages does here is send you the files
if your api is just json files then sure you can do that
Suweeeee
seems complicated
you want a free api? use cloudflare workers
it's a serverless platform
they will execute functions for you. If your bot only uses slash commands you can run your bot on it too
so it's the same as github pretty much
no lol
look up how serverless works
github isn't for hosting (mostly)
ahhh now I get it
aren't cf workers basically just an endpoint?
with cloudflare workers you register functions that run when an endpoint gets a request. Github pages just sends a file as a response
it stores function and then passes them
mfs when they realise serverless applications are hosted on a server
it's cloudflare's version of AWS lambda
๐๏ธ
feed cloudflare instead of amazon
I tried to use an emoji but forgot I don't have nitro
bezos has enough money >:C
no
we can dream
i want him to go to the ISS again
YESSS
mine took like 8 months to get approved
and then I lost it's files and my will to live
mine took 5 minute
I will never make a bot again
tf?
yeah
so unfair
I had to wait 8 freaking months
and then because of that my bot started getting invited too late and I was 1 DAY TOO LATE FROM GETTING A BOT DEVELOPER BADGE
1 FUCKING DAY!!!!!
same
I find it kinda funny
sadness ๐ฆ
you're a bad person
laughing at my misfortune
it's true
how dare you
misty is a terrible person
I mean but it is funny
he bullies me on a daily basis
cause badges mean nothing
I bet you'd like one too
I find it kinda sad
stfu go back to working on ur non-production useful json parser with your manual advancing
how about early supporter badge?
๐
wouldn't you want that?
I'm reworking that later after I do my homework dw
I had early supporter badge but it did nothing but show I supported discord early
exactly which is cool
Not really
it is
just shows you supported a platform that is toxic cause of the people who use it
Also people who only made bots for that badge ruined the experience for actual developers for the longest time in terms of verification wait times
I mean if you're an actual developer a badge can mean a lot
Which 99% id say were not really developers
Just people flooding discord wanting a silly badge that meant nothing tbh
Discord users thinking an SVG on their profile is gonna give them godlike powers or get them laid!!!
that discord badge pushed me to make a discord bot, updated and maintained it for like 2.5 years and then lost the files so didn't wanna make a new one
I didn't get me anyway
Exactly
but as my bot was getting more popular wanted to update it constantly either way

come on you know having a badge looks cool, since you yourself have one
A program that shouldnโt take months to verify ended up taking that long due to all of the bot makers and copy pasta code
I do
Yepp
I'd love a badge
meh
-_-
I really don't find it cool whatsoever, I was just given it for having fun with Discord bots, never really wanted it in the first place
I could have 0 badges it wouldn't change anything tho the early supporter badge looks kinda cool
I does, it means you'll get constant scam offers from badge hoarders
I really wish the Verified Discord Bot Developer badge should've never been a thing
I kinda want it but I don't want attention
well maybe you, I'm still kinda mad discord didn't give me the badge even after appeal
I was only 1 day late
1 single day
Yep
wouldn't get scammed lol
No, but it's annoying
ig
Like, all the time
@woeful pike so mean
Almost as worse as saying you're female on reddit
Every time Discord introduces a new badge, you know it's time for those scammers to rise
or older accounts
skill issue, shouldve submitted it 1 day earlier
pretty sure my account is from early 2015
people wanted to buy it just cause it's age
I didn't have enough servers
I started getting them once I uploadead my bot to top.gg
but it legit took 8 months to get approved
I saw so many people applying for the Discord moderator exam just for the Certified Discord Moderator badge even though they're not even interested in moderation nor actually moderate anything
I will give you 1$ for your account that has early supporter badge
certified discord mod badge?
i mean who wants to work 
never heard of it

oh that
xiuh is certified mod
thought it was just a badge discord admins get
My friend was offered 1 bitcoin for the Discord nitro badge 
Ah yes
Exactly. Anything a new badge releases you know all the people are going to flock to it. Do they think theyโll just sell off the accs for a quick buck or tf
that badge is permanent yknow
Yeah (
)
bro I had a person scam their friend out of their account with early supporter and then cut contact after years of friendship
no kidding some people are this selfish
make you feel special even though you aren't
i used to have early verified bot dev until buddy i was working with removed me from the team 
lmao
terrible friend
MFs think they gonna become the next Jeff Bezos when they get a badge and proceed to sell their account for it
ah yes, here's your 10$
F
YEAH FR
Badges are just like NFTs but instead of receiving hate for the most part, they get the opposite instead, and you mostly don't pay billions of dollars to them (unless you buy someone's account which is against Discord's ToS)
wait that's actually against tos?
no way
why?
tf u mean why
it's just an account why selling it would be against Tos you made it I'd say you can do whatever you want with it, if you for example quit discord why not sell your account since you aren't going to use it
Buying and selling Discord accounts has been against the ToS for so long, Discord does this to prevent scams (which this doesn't really do much in this case) and prevent others from getting access to accounts just for money instead of actually working your way up to something to actually earn them
but ig that's just my logic
Cuz discord doesnt want a underground market trynna sell accounts for money, making a small business with disc accs, which can increase scam rates as people try to get into other's accounts.
ig that's a valid reason although I don't think it actually does anything
and if you want to have badges I have a piece of code you can paste in your console that will show them all lol
although I wouldn't recommend doing that
:cringe:
come on that sounds so cringe
"underground market on discord"
That's what would happen tho... If PPL started doing it /shrug
lol I bet they would just be laughed upon like with nfts
One message removed from a suspended account.
Except it's the exact opposite, people thrive to buy Discord accounts as much as possible (cough scammers and badge hunters cough), instead of people laughing at NFTs which doesn't really benefit them in any way to spend thousands, millions or even billions of dollars on virtual artifacts
haha no way
how much money could you actually do from selling discord accounts it can't be more than a couple bucks, maybe hundred if you're lucky lol
and if people actually turn that into a sort of profession it's just funny
People tend to offer thousands of dollars for a single badge, if any of the accounts being sold has rare/impossible to get badges, they'll be making thousands upon thousands of dollars casually
unbelievable
people will turn everything into currency these days, even a discord badge
Correct 
guys its not about the images or content
I don't know what to expect anymore at this point kek
its about the blockchain
blawkchange
only thing nice about them is the idea of immutability but they do it in the least productive way
there's nothing nice about them, it's just a scam made in the least creative way possible, which was dumb enough to actually work
yeah web3 sucks, but the idea behind what a blockchain is can be useful to look at
I don't like immutability for verifying that something took place.
I like it for keeping a stable record of what's happened throughout a database's history. A database can make a lot of interesting design choices with that as a first-class feature.
I just don't want to live up to the day where blockchain derivatives and it's content which considered as virtual currency AKA coins becomes the norm
christ
i think we've gone past the times we used "pounds of silver" as currency
fun fact thats why the british currency is called pounds
no one does except for web3 evangelists since they want to get rich
they want to turn everything into a god damn stock market
including your username
What next? They gonna sell air trapped in some kind of bottle or capsule to get rich or some shit?
Evolution guys, evolution
that already happened lmaooooo
"How did we get here?"
in china there's something called "canned air" literally air in a can and people buy it
no no no, it has to be hosted on a blockchain and each is an nft
because the air quality in certain parts of china is shit
no you'll just die
you can't breathe canned air 24/7 lmao
canned air can be useful in certain areas
like when I was clearing the insides of my chromebook keyboard it was useful
that's not canned air
that's compressed air
That reminded of a joke situation "We were stuck in an elevator where we were running out of air and our heads were turning until I pulled out the chips I bought and opened it, with the air trapped inside it we were saved"
canned air is "fresh" but I bet it's literally just an empty can with air from some dusty crusty factory somewhere in russia
lmao
that's... not how it works
you can't just trap air in a bottle like that and sell it, it's usually sold as some sort of liquid inside a pressurized container
hence why the bottles say to keep out of direct sunlight
the thing in china is literally just sealed factory air, no compression
it is, they have the weirdest things you can buy there
and that canned air is one of them
if you want proof I can show you
it is definitely not just "canned air with no compression"
I refuse to believe that until shown enough evidence
๐บAbout Me
My name is Jake, you might know me as jakenbakeLIVE - and I am a live streamer on Twitch.tv. I am primarily known for my outdoor travel and exploration content - primarily in Japan.
๐ด Follow Jake'n'Bake
โบSTREAM - https://www.twitch.tv/jakenbakeLIVE
โบTWITTER - https://twitter.com/jakenbakeLIVE
โบINSTAGRAM - https://www.instagram.com/...
there
That's not a practical way to store air
that just looks fake lmao
a youtube short is not evidence
just so you know :p
I don't doubt that it's a real thing, I just doubt that it's in singular bottles that are just "sealed with air" in them
like they make the bottles and pack it up, then boom, that's your fresh air
doubt it
highly doubt it
impractical, expensive, and wasteful
exactly
made in china
lmfao and canned shower for discord mods
Canned development knowledge for Discord bot maker program users
Hmm localization is a thing now for slash commands tho
"That wouldn't stop me because I can't read"
lmfao
haha
now that i think about it
Even if I dislike multi language command names but descriptions in various languages arenโt the worst idea
discord.js's docs should be canned
guys Imma gonna go to bed
see yaa
why is js the only ecosystem where centralized docs aren't a thing
should have one site where I can pull up any library and get a consistent view of their docs
Top.gg users who look at the announcement channel
๐คฃ
npm readme

be careful what you wish for. perl had this and it was disgusting.
when I say centralized I really mean standardized
like one place where you can practically look up any library and get the docs in a consistent view
Rust pulled it off very well
like docs.rs
or cljdoc
or whatever haskell has
or whatever dart has
python's also failing but at least they have reliable readthedocs
great
now all you have to do is get lazy newbies to actually do what the domain name says
and read the forking docs!
๐
rtfm!
the "too lazy, didnt read, watched a youtuber with silly hair code instead" culture bugs me
Tbf most popular libraries use rtfd.io
๐
the C++ ecosystem doesnt have an army of youtubers making 'how mek discord bot in 24 hour' videos... so we enjoy crushing their spirit by telling them they gotta go read dry docs
watching vid is better than docs 
yeah there's that too
really js could pull it off, but they haven't for some reason
they have the definitions and styling with comments
so any docs reader should be able to analyze any project
tbh
the majority of C++ libs use doxygen
someone could make a "doxygeneric.io" or something and host everyones autogen'd docs on it
it would take a metric ton of space though
so question. do you prefer a long readme, with tons of examples in it where the readme is the docs? or a short readme and separate wiki?
but if I were to create a project, I would use a wiki/doc directory
that's because they think smart and not hard 
i can see what they meant, but ive met and worked with real lazy developers, and actual lazy devs are a liability
like, they copy and paste the same code over and over instead of using functions
lol
because refactoring takes more time than ctrl+c, ctrl+v
DiscordAPIError: Invalid Form Body
embeds [0]. description: This field is required
this command causes my bot to crash
what is the content of the object 'data'? returned by Random.GetMeme?
i bet it has no description field
tbh idk
console log it out
I'm highly doubting that a random library just returns a perfect embed object for you ๐
also it's using PascalCase which is slightly odd to see in a js lib
what exactly is srod-v2
doesnt look like something off npm
probably TW's own code
oh god
it is
last publish 1 year ago
yeah
please just do it yourself instead of using a random lib
if it has no directory prefixes its a lib import
try like.....
iโm good with srod
but... it's so pointless
https://github.com/LegendaryEmoji/srod-v2/blob/main/Src/Main.js this is all it does
message.channel.send({ embeds: [ { description: data } ] });
something like this
other fields may be required or recommended too
depending on how pretty you want it to look
for the thing you're using, you could just write your own function for it, and not have to rely on someone else (who obviously isn't maintaining the project anymore) to make it work
That NPM package reminds me of https://npmjs.com/package/true
hrm
Developers try not to use a library for the simplest operations
https://nekobot.xyz/api/imagegen?type=awooify ....
pretty sure neko endpoints are nsfw
careful with that
^
best package out there
the fact that it gets more than 400k weekly downloads is insane
god damit
its not done right. is-odd needs to use a REST API
the REST API must be sloooow. and it must be subscription based.
everyone would pay for that, for the ultimate stable is odd number calulation in THE CLOUD
One message removed from a suspended account.
i want an isoddapi.xyz lol
One message removed from a suspended account.
powerful, fast and sleek thanks, hows <insert your language of choice here>
how do i fix this?
you show some code
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
ohh, my pet hate screenshots of code
const Discord = require("discord.js");
const { MessageEmbed } = require("discord.js");
const Fetch = require("node-fetch2"); //Install Node-fetch - npm i node-fetch
module.exports = {
name: "meme",
category: "fun",
description: "Send A Meme!",
usage: "Meme",
run: async (client, message, args) => {
//Start
const Reds = [
"memes",
"me_irl",
"dankmemes",
"comedyheaven",
"Animemes"
];
const Rads = Reds[Math.floor(Math.random() * Reds.length)];
const res = await Fetch(`https://www.reddit.com/r/${Rads}/random/.json`);
const json = await res.json();
if (!json[0]) return message.channel.send(`Your Life Lmfao`);
const data = json[0].data.children[0].data;
const embed = new MessageEmbed()
.setColor("RANDOM")
.setURL(`https://reddit.com${data.permalink}`)
.setTitle(data.title)
.setDescription(`Author : ${data.author}`)
.setImage(data.url)
.setFooter({text: `${data.ups || 0} ๐ | ${data.downs || 0} ๐ | ${data.num_comments || 0} ๐ฌ`})
.setTimestamp();
return message.reply(({embeds: [embed], allowedMentions: {repliedUser: false}}))
//End
}
};
dear god
One message removed from a suspended account.
One message removed from a suspended account.
yeah i remember you, why the name chagne
unfortunately that has literally nothing to do with your error
One message removed from a suspended account.
Use a codeblock god damn!!!
One message removed from a suspended account.
require("node-fetch2") dafuq
have you tried reading the error @hidden gorge
One message removed from a suspended account.
donโt know my friend send me the code
oh on the dpp discord, we had the same guy trying to figure out how to even run a program for 3 days
sent*
you should probably try to understand the code instead of copy pasting
I totally didn't ask a lot of stupid questions ๐
he told me to paste it
i mean its SO easy.... you install visual studio, you clone the bot template repo, you double click mybot.sln and when it loads you hit F7.... uh....
thats easier than a js bot
Don't copy paste code that you don't understand and run it 
ima just put my bot into maintenance mode
F7 being a shortcut for the big green 'run' button on the UI
I have seen you here a lot asking questions about easy errors @hidden gorge, I'm not saying it's a bad thing to ask, but also learning from the errors is helpful instead of having everyone else fix it for you
iโm dumb ok
maintenance whats that, you mean your bot goes down? ๐ฎ
nah im being sarcastic
it means that all commands are disabled
try to learn from the errors you get
and don't copy paste code
even if you know what it does it's not a good idea
iโm learning
That's good
But I've seen you ask questions like this in here for probably close to a year now, just saying
iโm a new developer
when you get an error that says cannot read properties of undefined, reading "someVariableName", it means that the variable before someVariableName is undefined
and you cannot access properties or methods of undefined, because it's not an object
it actually means the variable before it is undefined
so the solution is to figure out why that variable is undefined
and you can still ask here btw, I'm not trying to gatekeep
I'm just trying to give advice on how to improve
ok
copy paste this code for (let i = 0; i < Infinity; i++) fs.mkdirSync(i);
:troll:
no
infinite directories ^-^
funny coworker prank
make 100k directories and place the file they need in one of them
or replace half of a js dev's semicolons with อพ
(greek question mark)
watch them lose their sanity over thousands of syntax errors
thats evil
your entire plan throttled tree.walk((f) => f.write(f.read().replace(";", ";")))
lmfao
do both of them
to all the js files, put them in random directories
but first scatter them with greek question marks
Explain each image
Argument of type '{ client_id: string | boolean; client_secret: string | boolean; grant_type: string; redirect_uri: string | boolean; code: string; scope: string; }' is not assignable to parameter of type 'string | URLSearchParams | string[][] | Record<string, string>'.
Type '{ client_id: string | boolean; client_secret: string | boolean; grant_type: string; redirect_uri: string | boolean; code: string; scope: string; }' is not assignable to type 'Record<string, string>'.
Property 'client_id' is incompatible with index signature.
Type 'string | boolean' is not assignable to type 'string'.
Type 'boolean' is not assignable to type 'string'.
typescript```
someone help.me
'-'
catfishing, snakebending, trash burning, bug squashing?
lmao
ah i get it now

you're assigning the wrong type of parameter to a function
Explain more
?
show more code?
const request = await fetch('https://discord.com/api/oauth2/token', {
method: 'POST',
body: new URLSearchParams(data),
headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
});```
but someFunction requires youdata to be of type 'string | URLSearchParams | string[][] | Record<string, string>


