#development
1 messages · Page 1856 of 1
also it has watchers too so you don't have to log multiple times to see its states changing
That’s correct and I didn’t change my editor my to code with since then
that's the convinience
man code for 14 years and still think websites can't fish people' data
I mean 70 years ago it was common to die of polio but that doesn’t mean it’s a good thing
🤦♂️
"enlarge ur dick today with 3 easy steps"
kuu
I’m really bad with the debugger and I struggle with it, but as I use it more I learn more about it and realize how valuable it is
did you ever go into a website
U need to be careful today, any word can be used against u 
that has ads which its hitbox spans entire viewport
🚣♂️
basically every anime site lul
Learning so much new stuff today 
what am i looking at?
the logo on middle
Just get an SVG Extension for Paint.NET, or export it from photoshop
:3
you mean the lack of antialias?
here is
thats never going to give pretty results
Use adobe illustrator
just a simple page with anims
Either redraw or trace it
also for some reason it gives me abstergo vibes
yeah thats really the only choice, vectorize or redraw it
Watch out Kuhubakuwuku it might fish your discord data 
like those ultra hi-tech evil companies in movies/games
the icon was taken for foreign source, can't judge
phish..
i was doing protagonist util
lmao you guys don’t understand sarcasm yet it seems
imagine not being able to see if an HTML file was "safe"
I always enjoy this shit show 
i wrote it myself so i know
cuz like, they can totally steal your discord credentials with HTML and CSS... totally
I work in graphic design. The number of times I've just redrawn a client's low-res jpg logo just to save my own time trying to get a vector file I know they won't be able to provide me... 
Yes you have to be careful
always remember "enlarge ur d*ck with 3 easy steps"
here's what it looks like
so many stolen credit cards
you can actually draw in illustrator? lol I cant figure out how to make a square
lucky you
bruh that's definitely a futuristic evil company desktop wpp
the only editor i used was clip studio pain
but that was intended for drawing anyway
the HTML file also contains animations too
cool
remember to gimme your thoughts
make a login animation like you see when the MC "hacks" the mainframe
yeah i have that idea
but
then "Welcome [username]"
Illustrator is op if can you learn it well enough
I do want to... I hate my shitty 4096x PNGs
react I can understand why it would be hard, but CSS is just glorified JSON
is there any way to snap it down?
the thing is
I do all my sites using SVG or WEBP files. No pngs or jpgs. Stinky file sizes. Ugly pixels.
so many things to learn
oh, i uh clip-path go brrrr
but because of that
You mean the CSS Rules? yeah, theres probably a few hundred of em by now, but if you use them long enough, theyre pretty simple
wdym stinky file sizes, my png icons have < 1kb each
compressed?
euw
Can't you just use a second object below it and blur filter?
for SVG, as described
^^^^
Like a psuedo element
the thing is, the object has opacity lower than 1
Or just another svg
so the shadow is visible
Just have another element underneath and tweak opacity and blur filter
but i just want the edges
blur will take into account existing alpha
so itll be quite accurate
like so
nothing wrong there...
for SVGs, that's easy
that's an SVG element
designed in Figma
so nothing wrong ofc
figma
if you mean that the visible shadow underneith the SVG is making it dark
just use filter: brightness
on the top SVG
here's the fail auth interface
looks odd
ngl that red box is pretty ugly
and its not centered
use a triangle and make the whole screen reddish
Idk. I code everything manually. I use illustrator for wireframes and mockups then make the webpage from scratch.
adjustment will be done later
⚠️ <-
No figma
but red
ligma
nice
i use figma mainly for ideas
gasp there are other people out there who actually write HTML by hand?
lol, all the "younger" devs these days are all like "just use bootcamp" or "just use a WYSIWYG template"
here is th main user interfa e
heckin evil company vibes
i use a framework as that abstracts alot of thing for me
Yee every damn element
Idk about figma or how it works but what I like about illustrator for mockups is you already have the svg elements ready. You can just copy paste some elements into the site and do the layout in html and css.
so a framework works for me
So, are you making a website, a video game, or an operating system
I cant tell
:3
yes
maybe yes
< _ <
i will see what i can do
after all
it's there
now that i have to learn
but idk the starting point
open source discord bot 
script kiddies: hippity hoppity your code is our property
lol
open sourcing is quite tame if u know how to deal with it
but also i don't have illustrator
Ill admit, I use github as more of a glorified free CDN / Backup / Storage service then a versioning tool
and it's not free, i'm assuming
github as CDN, upvoted
version control is useful ngl
I mean, if you use JSDelivr, cache your github links, it works really well
Blank pages. I mainly do WordPress. I use my own modified version of a blank theme (i think it's called html5blank or something) but only to have extra functions i use regularly across client sites. Other than the functions file, there's nothing else. Page designs are all blank when i start. Too many agencies here charge a client €7,000 for a WordPress theme they bought like Divi for example and modified. Just seems lazy and less bespoke. I always explain that to my clients and explain my design will be bespoke for them and is crafted from nothing, no templates.
github basically IS a cdn at that point
oh... wordpress, alright I guess.
i prefer writing websites myself
all from scratch
CSS, JS, HTML, everything from zero
also the needs for frameworks actually depends on what you want
And I always hire a copy writer to write the copy properly too
if you need the full control of website, you do from scratch
otherwise you just use frameworks as they abstract away the complexity
so learning curve reduced
Yeah but most of my client base is already coming from a WP site so it's just easier when it comes to importing some content or them just not having to re-learn the interface.
why abstract it away? ive always found it more fun coming up with my own dynamic APIs and CSS/JS Compatibility layers for platforms
albiet, it can be anoyying sometimes
but it improves my experience
💯

otherwise, framework is a good place to start
I have a SAAS side project I'll be building from scratch
Ive only ever used frameworks for large scale sites, or when I made one for other people
But for clients, WP is fine
you do frontend right?
Yeah
mind if i ask you about frontend sometimes?
Sure
i just started building this 2 days ago
I'll always answer if I'm free
thanks for the help
if for learning, well it's okay
2 years*
Ive only actively designed sites for 2 years
I was basically still a babbling baboon of a child when i first started programming
:3
my idea was
it's my world
i can do everything in it
my world, presented in sequences of instructions
yeah the developer-god feeling, I think thats what inspires most devs to get into programming
Sounds like a Bob Ross quote lmao
I usually keep friends lists to colleagues and friends but feel free to ping me or DM if you want 
js was a wack place to start btw
little did I realize 3D modeling / art would give me more satisfaction
because you aren't used to strong-type discipline
so debugging in js
might be a pain
yeah but now I have an unusual bond with it, and I can basically use it anywhere involuntarily, I rarely even think about the instructions or operators anymore... its natural... like speaking english, Ive been doing it since I was a kid
strong-type is more verbose but damn I don't regret it
its odd, no other language is the same, C# is nearly there, but I still struggle with it sometimes
JS is just so unnervingly easy
silly errors in developement > hard-to-fix errors in production
😳 any help
you can try TS
nah
update node
repl: unsupported JS syntax
and Ive never once had a happy experience with TS
👀😳
always "FUCKING HELL WHY DOESNT THIS WORK" with TS
thx
TS strong-typed trait helps you write safer javascript
hover on the error, read it carefully
Meh, ive been hearing that for years, never once found a good use for it
I found java to be my sweet spot, js just feels weird for me
also if you know type manipulation, that can be powerful
although I do program in js too
you see, for me, i did a few projects in ts
no regrets
I just found programming in TS to be more complicated and irritating, when most of it was just transpiled back down to the same old JS
again, "safer code"
Where
better safe than sorry
give me an example
two words
I suppose Ive never asked for an example before
statically typed
but give me an actual working example
because no one has ever done that before
:l
actual working one?
yup
there
a working one
.-.
guess not
misty
telling me to go look at an entire repository
of their fuckin TS bot
as an example
like wtf
I mean it's a working example of ts in action
You got what you asked for
no one has given me a STATISTICALLY WORKING OR EVEN COMMON example of a piece of JS that is "unsafe" that TS does better
I asked for a working example of TS being superior, or fixing "unsafe" js
Okay one sec
it prevents you from assigning wrong types, referencing non-existence varibles and unsafe calls that would otherwise be normal in js
Pretty shit example but here we go
Bruh... thats reported in a normal linter or debugger
.-.
linter doesn't help
btw
does for me
Ive never once experienced any issues in JS that I couldnt solve in JS
you try calling non-existen variable
This dude has to be a troll lol
I use a variety of web and modular linters
TS is literally useless for what I do
never found a purpose or reason to use it
then this wouldn't have happened
Thing with typescript is you don't need to use anything extra to get that, it tells you errors before runtime, type mismatch for example can be caught before running the code and a linter can't catch that
I severely doubt that
it reported the error
no
I dont see whats wrong in that scenario
Bruh
that function doesnt exist
that error occured in runtime
simple as that
No, youre just being a smartass, you could like, actually explain something if someone made a mistake
The error occured in runtime but ts could of caught it before hand likely if it's a type mismatch
They gave you reasons and you're dismissing them lol
in TS it will forewarn you that
Property 'deferUpdate' does not exist on type 'CommandInteraction'. (ts 2303)
Yep
.-.
thats the exact same error
again, forewarn
But it happens before runtime
It tells you that before you even run the script is the point.
and? thats why you test things?
So you get it before compile and running
you don't test
TS is just a glorified Linter
...
What
it finds errors before running the code
the same thing a linter does
You're actually dumb I'm sorry
Told y'all lmao
It's a super set of js
it behaves like every compiler language
thats not the point, it behaves the exact same way a linter would
eg. C#
It adds type safety, decorators, interfaces, generics, etc
coolio, I dont see a reason to use em
it does better than a linter
because this time it's the compiler that does the thing for you
No one's saying you do
But if you don't know anything about the language then don't just call it a glorified linter
I dont get the difference... a linter reports errors in code, a compiler language reports errors in code.
also using a superset of js with strongly-typed structures makes you more consitent and write better code
semantically, theres no difference in those two behaviors
Im not saying its a linter
Im saying it behaves similarly
compiler errors gets reported before runtime and will REFUSE to compile if it finds type errors
Indeed
which means the program won't run at all
I know this.
whats your point
oh boy another js ts fight
Hello guardian of development 
hello church of ts
imagine not this
but a node error that crashes the process bcecause a top-level syntax wrror
I've changed to golang thank you
xD
tim
Thinking about to extend it with PHP 
oh boy
i will script in lolcode thanks
Php has no opinions
Honestly I could care less, as long as I get my errors reported before I publish to the build version.
I always extensively test my changes and my code as a whole before I make it public
Sorry
man too stubborn
sure lol
Sounds like extra work
Im perfectly accepting of its behavior, Im just saying I see no reason to use it
technically its "i couldnt care less" xD

you can't test for every cases and add caching functions to handle it
i'm just saying i'm not forcing you
plus
sounds like extra work to learn a transpiled language and setup an entire new bot in TS just for some glorified bug reporting and fancy code.
its all compiled to JS in the end
Sayuri out here breaching ts when they were an avid js user just a few weeks ago

omega
that's a problem with js
The fuck you mean it's not really even a new language at all tbh it's just JavaScript with types and some fancy stuff
did you even read my entire comment
let him be
Yea I did bud
we will be expected to see more stupid runtime errors that could otherwise be forwarned
leave the man be
ya obviously didnt "bud" because you just said the exact same thing as I did. also, theres a reason I said "transpiled" language, its not a dedicated language on its own.. sheesh
if you have strong type discipline, no problem
but for those who are new to programming
that's a must
i dont really agree with that
I also don't agree with that
also dynamic lang makes it harder for me to track types
if you are new to the language, jumping straight to ts will confuse the shit out of you, just like jumping straight to webpack to learn html
Embrace Python

why would I want to change all my code to TS... you guys act as if JS is a broken down car, and TS is a shiny new car.... when both are shiny new cars, TS just has some little dinky parts and extra switches/levers... whatever the hell that metaphor is supposed to mean
No python has no opinions here
no clearly php is better
True
I'm out
but again, you do you
i could care less about what tech people code in and i can not give an f to it
Shut up if PHP isn’t allowed, Python isn’t as well 
half the time its just a glorified debate, but somehow people interpret anger from text messages in a chatroom
update the assets thank you
¯_(ツ)_/¯
glorified
Who says PHP isn't

sure it is
but you will comeback to it eventually
@latent heron amirite?
Php sucks


You suck
No u
It is but we got a lot of weird people in here
Wanna know what else is quite impressive
you know what's more epic?
VSPunk 2077
nim?
The fact a lot of people can speak English and not have a stroke
what the hell are you doing?
nim is something... special
executing a fractal?
er.. sure
44% of the gpu on vscode
well go with that
the big question is... whats his GPU
running a fractal costs you CPU
Lol
hehehe
you would like it, its indented like py :^)
I personally need a litttttttle bit more power
👀 👀 👀 👀 👀 👀 👀 👀 👀 👀 👀 👀 👀 👀 👀 👀 👀 👀 👀 👀 👀 👀 👀 👀 👀 👀 👀 👀 👀 👀 👀 👀 👀 👀 👀 👀 👀 👀 👀 👀
Seems legit
You can download more ram
Ive got some laying around... want some?
and everyone in the team
Download more ram
the freq
It's ez
DownloadMoreRAM.com - CloudRAM 2.0
the freq is slow
;3
i afraid it's not compatible
im cultured
For what
RTX 3080 has the highest Price : Power ratio actually... Even compared to GTX cards....
Atleast at MSRP, but like 99% of cards are NOT at MSRP anymore
I'ma get a 3090 to be like the cool kids
no... dont
Once money starts growing out my ass ofc
its really not worth it
Ha well I suck at planning so

literally, its currently holding the #1 spot for the worst price : power ratio of any GPU
3090 with a threadripper to play Roblox
ima make a virus that deletes osu and then itself from your system
And it prevents you from downloading osu again
login page
Forces you to delete osu and never download again or else it activates again
i didn't say you have to download tho

Damn just took a look into the convo and all I will remember of ts over JS is PHP is and will stay the superior leader 
That’s because you’re saying things like this:
Php sucks
That will decrease your social points counter
How I can delete an attachment from a message?
You have to delete the message

Does exposing a database publically(with authentication enabled) ever make sense?
I have a database which only will be accessed remotely and am making an api middleman(that's all it will do).
Does it actually matter at that point?
if you have an api in front of the db then no
its the same principle as a reverse proxy
web <https> nginx <http> node
web <https> api <tcp/socket> db
the only time it would make sense is if you have a large project running on multiple machines and all of them need direct remote access to a central db
If you have static endpoints like I have for example, nodes of proxmox (VMs), just whitelist them in your database firewall and drop any other connections to the database.
The authorization should be an extra security layer anyways
Hello. How do I delete a slash command?
Sending a delete request to the API
Or using the corresponding method of your library if you use one
Oh, very simple. Thanks
I havent seen this error before:
node:events:353
throw er; // Unhandled 'error' event
^
Error: Packets out of order. Got: 0 Expected: 2
at Parser._tryReadPacketHeader (C:\Users\Flo\Desktop\Discord_Bot\node_modules\mysql\lib\protocol\Parser.js:470:15)
at Parser.write (C:\Users\Flo\Desktop\Discord_Bot\node_modules\mysql\lib\protocol\Parser.js:33:29)
at Protocol.write (C:\Users\Flo\Desktop\Discord_Bot\node_modules\mysql\lib\protocol\Protocol.js:38:16)
at Socket.<anonymous> (C:\Users\Flo\Desktop\Discord_Bot\node_modules\mysql\lib\Connection.js:88:28)
at Socket.<anonymous> (C:\Users\Flo\Desktop\Discord_Bot\node_modules\mysql\lib\Connection.js:526:10)
at Socket.emit (node:events:376:20)
at addChunk (node:internal/streams/readable:311:12)
at readableAddChunk (node:internal/streams/readable:286:9)
at Socket.Readable.push (node:internal/streams/readable:225:10)
at TCP.onStreamRead (node:internal/stream_base_commons:192:23)
Emitted 'error' event on Connection instance at:
at Connection._handleProtocolError (C:\Users\Flo\Desktop\Discord_Bot\node_modules\mysql\lib\Connection.js:423:8)
at Protocol._delegateError (C:\Users\Flo\Desktop\Discord_Bot\node_modules\mysql\lib\protocol\Protocol.js:398:10)
at Protocol.handleParserError (C:\Users\Flo\Desktop\Discord_Bot\node_modules\mysql\lib\protocol\Protocol.js:380:10)
at Parser._tryReadPacketHeader (C:\Users\Flo\Desktop\Discord_Bot\node_modules\mysql\lib\protocol\Parser.js:478:10)
at Parser.write (C:\Users\Flo\Desktop\Discord_Bot\node_modules\mysql\lib\protocol\Parser.js:33:29)
[... lines matching original stack trace ...]
at Socket.emit (node:events:376:20) {
code: 'PROTOCOL_PACKETS_OUT_OF_ORDER',
fatal: true
}
Seems to be an mysqld con. error. Any idea what could this cause?
does anyone know how to use columns as variable?
await sql.execute("UPDATE savedroles SET %s = %s WHERE userid = %s", (num, role.id, ctx.id)) this gives an error: TypeError: not all arguments converted during string formatting
cause mysql bad
is there a way to prevent select menu placeholder from resetting upon selection?
like keep the selected option as the placeholder
Not if you’re using template queries
You can still use columns to update the data field, for example:
(UPDATE database.table SET whatever = whatever + %i, integer)
Using column names as arguments you pass will not work
Oh nvm I see you’re talking about something else
Well no, this won’t work as there’s no reason to do so
Template queries are made to be used for an automated data type conversation nothing else
You have to write the actual column name into your query
Of course this will work, too:
"UPDATE database.table SET " + column + " = %s, string"
(or use template strings)
((before somebody cries again))
((()))
And yes I know they’re called prepared statements, fu 
@boreal iron talking to yourself again?
Yee happens from time to time
leave me alone
U should visit one for talking trash about PHP & SQL 

(imagine I would point that gun emoji towards you)
Huh wtf where did my gun emoji go?!
Hello?
WTF

What the fuck is happening …. Now it’s there
your gun is gune
👉👉 hands up
One day I will fucking throw that phone away and will nuke my ISP
Oldschool you know 
There’s no syntax highlighting in npp for template strings 
pretty sure concatenated strings take up more memory since it has it's own entry in heapdump inspector and each string takes a base of 20bytes for alloc
Pff that’s just an issue for poor people can’t pay for enough RAM
You don’t care if your average server has 128 GB
Not everyone has the money to make that kind of investment especially for hobby projects. Until it turns professional
Right. That’s why I said I’m not gonna bother with micro optimization BUT that doesn’t mean I prefer string concating
Using template strings nowadays, too at least in newer projects
For example using shorthand statements inside the template string is a mess in my mind which causes me to string concat the statement
Which is just a "look and feel" issue for me, nothing else
fair
I wouldn’t say professional tbh but server prices are damn low over here
And yeah I can only speak about me, doesn’t mean I generally disagree with what u say
you can manipulate the js engine to get rid of concat strings
lmao
its not worth it tho
concat strings are extremely important for performance
Huh they are?
for example, building a string with a loop
if you "flatten" the string on every iteration, its gonna be like 100x slower
^
a lot of it is about just making garbage collection performed as little as possible
Makes sense tho if the concerted string is already allocated to the memory
pew pew
wanna see the code to "flatten" a string?
:^)
Well why not can only cause me to hit a tree eventually
Bro how do you do dat
magick
teach me the ways of magick
play magicka
Because you hate PHP you have to pay for the education services
Gonna send you over some well educated PHP enthusiasts to make sure you will love it, too after their visit
(wearing a rona mask of course)
does php have an engine similar to node?
that you can run php on an event loop in a cli thing
that would be cool
I think you can but you probably need an extension
Not sure if that’s build in natively
imagine people start building desktop and mobile apps with php
give it an electron-esque UI capabilities
since php interops extremely well with html
that would be dope
quit while you still can
I exist to close that gap.
We’ve got educated employees to make you support our project
See: #development message
wooops pingy
Ah, a baseball bat!
can't imagine
this is a living facebook moment 
Regarding your name you must be a little more optimistic
I want to scan for NSFW content in videos, however nsfwjs only supports images and gifs. How would I convert videos to GIFs without having to download it before converting it?
Don't need to
It'd result in more processing than necessary
Just extract the frames from the video
About 1 frame every 1 second or so
And yes, you do need to download it
rip if its a 1gb download lawl
Well, that's the toll for processing video ig
Is the function embedbuilder async or does it return a promise
extract the frames from the vid and scan those
rip ur cpu if its a 4k vid
lol
it already takes multiple seconds to scan one large image with nsfwjs
don't wanna imagine how long it is for videos
Gonna code now
How do you destructure this.
var current = result[0].current;
destructure what
const [{ current }] = result;
destructure a destructure 
doesn't that just get an array of currents?
It's the same as result[0].current;
you can't get the second element's current property
but you can get the second element
const [{ current }, secondElement] = result;
so basically
thats useless
unless you want just the first elements current property
function check(msg) {
return words.some(word => message.content.split(" ").includes(word.word))
}
if (check(message.content) === true) {
message.delete()
}
``` is same as:
```js
if words.some(word => message.content.split(" ").includes(word.word)) {
message.delete()
}
```?
Do you guys know any good modules for uploaded file streaming?
Busboy and multer are shit
1st is old and 2nd is not supporting streams
Why not
Just call it something else
you can't call it something else afaik
why not
it has to be current
you can iirc
hoooooooow
property: variableName
const [{ current }, { current: current2 }] = result;
nice
Hey, in slash commands, is this possible since I want to make a !deposit command.
I want the user in the first option to choose whether he wants to input an amount or the word all.
!deposit <amount/all>
👀
The first option was set as a type called Integer.. but that makes him only input an integer.
You can't do that without making the type string or using subcommands
Oh.
Sub-commands are really confusing.. god dammit.
you can make the amount optional and have a all boolean option which is also optional
Or make the amount optional
you can define a default value can't you?
Well.. I am reading the official Discord Documentation to get a better understanding about sub commands.
Can you have sub command groups inside of sub commands groups?
Idk. 😂
!deposit <amount/all>
I'm trying to do this.. I'll check back in a few minutes to check if I did it correct or not.
If you're using subcommands then use !deposit all and !deposit amount <amount>
The base command can't exist if you have subcommands
Cause discord
I'm trying to make it like !deposit all and !deposit <amount>
.. or should I use type string?
Then make amount a string, that's the only way
DIscord..
You'd have to parse the integer yourself
Yikes.. parseInt()
and .toLocaleString() and some other stuff. 😐
Or Number() if you don't want the user to add unnecessary characters
🤷♂️
Thanks though!!
What are you using to send the request
typically any module would have a post method
when I'm sending message using a webhook
Make sure you have the right webhook url
Show code
Oh you are using discord.js
ya
no idea then
k
I dont use discord.js webhook client
bruh
Can I not send the discord.js server
ok
ya
which token is that?
the token in the webhook url https://discord.com/api/webhooks/${WEBHOOK_ID}/${WEBHOOK_TOKEN}
and you're sure that webhook exists?
which version of discord.js are you using?
Quick question, when I use an args[0] and use its number, I use parseInt for no decimals, right?
Since when I don't use it, it's adding to a string causing issues.
if the user types a number with decimals, parseInt will remove the decimals yes
Sweet.
I used to not add ParseInt making it <string> + <number> merging.
I realised it real quick.
I know inputs like args[0] are always strings even if you input a number.
ye
👍
v12
ohh...what should I write in options?
options are optional, not needed
just that the id and token are separate instead of an object
(id, token) instead of ({id:id, token:token})
what you had should work for v13
wut
Doesn’t it force node 16?
16 will become LTS in like a month
yeah but typescript can compile JS, no?
you can use js files in a ts project and it'd get compiled down
idk if it would change whats in it or just basically copy it to the out dir
It’s basically the same as putting any everywhere I would think
I don’t see why djs won’t if it’s possible
Yeah but when 90% of their users don’t understand the difference between 14 and 16, it just causes problems
skill issue
lmao
Skill issue
most people should be able to upgrade to node 16
I hope so
it was the same thing in v12
There are still people who use v12
people had to upgrade their node anyway
million
Yeah but they had to upgrade to LTS I thought
they decided to upgrade to the next LTS
they are using node 16 features
And guess what
Every single day we had like 3 people come in asking about Array.flat or something
which will be soon
I hope so
im still on djs v12
but using node 16 unofficial builds just for pointer compression
less then 2 months
hmmm
month is almost up
He may lives in the future, who knows
only even ones
they will remove it when they release v18
smh
they only make even ones lts
so rude
Anyone knows why when I use a specific slash command it doesn't even trigger the interactionCreate event? But when I use a different one it does work
Discord is giving me this error
const fullperms = cmd.reduce((accumulator, x) => {
^
TypeError: cmd.reduce is not a function```
In the past that has happened when the slash command you are trying to use id is different then what is registered (there are other reasons but I forgot em)
wdym id?
when slash commands are registered they are given an ID iirc
Happens sometimes after editing a slash command and/or restarting a bot
^
Yeah I didn't touch the code in liek a month
it re adds the slash command
so idk what happened
Nothing you can do about it atm
Bruh moment
Running the command a few moments later will work again, mostly at least for me
how do I do that
how i change font at this :/
Make sure NOT to register the same slash commands any time your start your bot
How can i select top panel's and button' color with css?
Thats why I do this
for (const command of this.commands.values()) {
let existingCommand = existingCommands.find((registeredCommand) => registeredCommand.name.toLowerCase() === command._options.name);
if (!existingCommand || !this.commandsEquals(existingCommand, command)) toRegister.push(command);
}
Register them only/edit them only if you have changed something
const fullperms = cmd.reduce((accumulator, x) => {
^
TypeError: cmd.reduce is not a function```
You’re sure commandEquals does it’s job correctly?
I accidentally edit slash commands on each startup, too
Was comparing the fetched client commands with my locally loaded commands and their options and didn’t notice for some time the fetched commands are returning a string null for options while my loaded commands had the data type null in it
public commandsEquals(command1: ApplicationCommand, command2: BaseCommand) {
return command1.description.toLowerCase() === command2._options.description.toLowerCase() &&
this.commandOptionsEquals(command1, command2);
}
public commandOptionsEquals(command1: ApplicationCommand, command2: BaseCommand) {
return JSON.stringify(command1.options) === JSON.stringify(command2._options.options);
}
Stringifying the command options?
They usually return the string null if not set
I mean anyways not needed to discuss about it, you can simply log if an edit happens or not
At least that was an issue for me as I explained
Invalid commands even if they are existing are an issue on Discord’s side atm
I’m sure they will investigate that at some time
Ye so I managed to fix it turns out I patched this bug a while ago in my other project but forgot to patch it in this one
What I'm doing now is removing all undefined properties and then doing checks and then looping over all the keys and checking if they're in the other object
Well there you go 👍
how do i check if a message.content includes http, .com, .xyz etc etc
const express = require('express')
const Topgg = require('@top-gg/sdk')
const app = express() // Your express app
const webhook = new Topgg.Webhook('topggauth123') // add your Top.gg webhook authorization (not bot token)
app.post('/dblwebhook', webhook.listener(vote => {
// vote is your vote object
console.log(vote.user) // 221221226561929217
})) // attach the middleware
app.listen(3000)
what is Top.gg webhook authorization?
This guy is ghost pinging lmao
He straight up pinged community managers and deleted it. What a morron.
if (message.content.includes("https")) return;
what if i have an array with mutliple words
if (message.content.includes("https") || message.content.includes(".com")) return;
array.some(balls => message.content.includes(balls))
do you know what an array is?
tthanks flaz
here's a handy regex for that
https?:\/\/.+\..+
is there a way i could update nodejs from its console
Use nvm or download from a packager. The packages aren't always updated though
okay
#topgg-api check there for examples. On the vote event send a DM.
Uh I can't find any examples....
In the docs or in the pins
Okay..
const cooldowns = new Discord.Collection();
^
TypeError: Cannot read property 'Collection' of undefined
Trying to update from v12 to v13
const { Discord, Client, Intents, Collection } = require('discord.js')
const client = new Client({ allowedMentions: { parse: ['users', 'roles'], repliedUser: true }, intents: [Intents.FLAGS.GUILDS]});
hehe
okay
how if at markdown type?
okay
@pale vessel I fixed it now i want know how to fix this
throw new TypeError('CLIENT_MISSING_INTENTS');
^
TypeError [CLIENT_MISSING_INTENTS]: Valid intents must be provided for the Client.
const client = new Client({ allowedMentions: { parse: ['users', 'roles'], repliedUser: true }, intents: [Intents.FLAGS.GUILDS]});
Imagine having something called "bracket)
@shrewd hazel where
Somewhere.
I have seen this error a lot and I am wondering what this causes and how to fix it:
const token = this.client.token ?? this.client.accessToken;
^
SyntaxError: Unexpected token '?'
You are using an old version of nodejs
Discord.js v13 needs at least node 14
my webhook isn't working....it's not showing any error but it's not working also
Somewhere where?
open the terminal and run npm uninstall discord.js then run npm i discord.js@12
Somewhere somewhere
node 16
You need to update node
wait what
Where where the somewhere
I am asking for another guy and he is using replit. I think he has to update node version there
v14 has ?? and ?.
This is for replit
try to read that again
you're telling the person to downgrade their djs version
big brain moment
yes....because replit doesn't support djs v13
it supports v12 or lower
Open your vbs code
I am in
@signal estuary try transferring your code to a bash or deno repl
For some reason those ones have node v14 installed
that's the different stuff
yeah it is
message event is not recognized in that
but for some reason you can use node v14 in different language repls
replit team are 5heads
my webhook isn't sending any message....how do I fix it?
what?
client.on('message', message => {
})```
this is not recognized
the 'message' event
wtf
didn't v13 rename it
idk
messageCreate I guess
that also doesn't work
Check your intents
I did
Yes but not in that combination iirc, you need node 16 for that
that version is having many problems
i cant help but say
what the fuck is wrong with you replit
v16.9
Ah
v69
i am searching people who can install mongodb with authentication on my ubuntu server
Why not do it yourself
^
_what could go wrong installing a database on a server without any clue especially about networking and firewalls _
Default inbound policy: ALLOW

proceeds to drop database in production
discord.js related, can someone please for the love of god go to your package.json and just past your discord.js version here? pleasee
lmao
Bobby's friends with everyone
?
If it’s up to date it should be: 13.1.0
XY problem maybe
(if I’m up to date)
ok, so I've got the token now...?






