#development

1 messages · Page 1856 of 1

zealous trellis
#

14 years ago there werent really a lot of debuggers anyways..

#

VS Code integrated terminal / debugger wouldve been a pipedream back then

civic scroll
#

also it has watchers too so you don't have to log multiple times to see its states changing

boreal iron
civic scroll
#

that's the convinience

#

man code for 14 years and still think websites can't fish people' data

wheat mesa
#

I mean 70 years ago it was common to die of polio but that doesn’t mean it’s a good thing

civic scroll
#

it's just unreal man

boreal iron
#

🤦‍♂️

lyric mountain
civic scroll
#

kuu

wheat mesa
#

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

civic scroll
#

did you ever go into a website

boreal iron
civic scroll
#

that has ads which its hitbox spans entire viewport

lyric mountain
civic scroll
#

and one touch redirects you anywhere

lyric mountain
#

or most movie sites

#

disgusting

boreal iron
#

Learning so much new stuff today KEKW

civic scroll
#

also kuu

#

i can't trust svg conversion anymore

lyric mountain
#

what am i looking at?

civic scroll
#

the logo on middle

zealous trellis
#

:3

lyric mountain
#

you mean the lack of antialias?

civic scroll
#

it was a png, but

#

i converted it to SVG for standalone use

zealous trellis
#

oh.. you tried converting a PNG to an SVG?

#

euw

#

yeah

civic scroll
zealous trellis
#

thats never going to give pretty results

rose warren
#

Use adobe illustrator

civic scroll
#

just a simple page with anims

rose warren
#

Either redraw or trace it

lyric mountain
zealous trellis
boreal iron
lyric mountain
#

like those ultra hi-tech evil companies in movies/games

civic scroll
civic scroll
zealous trellis
#

not fish

#

XD

civic scroll
#

also that HTML file is safe

#

rest assured

boreal iron
#

lmao you guys don’t understand sarcasm yet it seems

zealous trellis
#

imagine not being able to see if an HTML file was "safe"

boreal iron
#

I always enjoy this shit show smirk

civic scroll
zealous trellis
#

cuz like, they can totally steal your discord credentials with HTML and CSS... totally

rose warren
lyric mountain
civic scroll
#

here's what it looks like

lyric mountain
#

so many stolen credit cards

zealous trellis
#

lucky you

lyric mountain
civic scroll
#

but that was intended for drawing anyway

civic scroll
lyric mountain
#

cool

civic scroll
#

remember to gimme your thoughts

lyric mountain
#

make a login animation like you see when the MC "hacks" the mainframe

civic scroll
#

but

lyric mountain
#

then "Welcome [username]"

rose warren
civic scroll
#

i know nothing about React

#

and CSS

zealous trellis
civic scroll
#

SVG time

#

but idk why thr SVGs always fit in the center of the container box

zealous trellis
civic scroll
#

is there any way to snap it down?

rose warren
#

I do all my sites using SVG or WEBP files. No pngs or jpgs. Stinky file sizes. Ugly pixels.

civic scroll
#

so many things to learn

civic scroll
#

but because of that

zealous trellis
civic scroll
#

i can't do shadow effects

#

it bugged me alot

quartz kindle
zealous trellis
#

euw

rose warren
civic scroll
zealous trellis
#

^^^^

rose warren
#

Like a psuedo element

civic scroll
rose warren
#

Or just another svg

civic scroll
#

so the shadow is visible

rose warren
#

Just have another element underneath and tweak opacity and blur filter

civic scroll
#

but i just want the edges

zealous trellis
#

so itll be quite accurate

civic scroll
#

like so

zealous trellis
civic scroll
#

for SVGs, that's easy

#

that's an SVG element

#

designed in Figma

#

so nothing wrong ofc

lyric mountain
#

figma

civic scroll
#

until you put it

#

into the main

zealous trellis
#

if you mean that the visible shadow underneith the SVG is making it dark

#

just use filter: brightness

#

on the top SVG

civic scroll
#

here's the fail auth interface

lyric mountain
#

looks odd

zealous trellis
#

and its not centered

lyric mountain
#

use a triangle and make the whole screen reddish

rose warren
#

Idk. I code everything manually. I use illustrator for wireframes and mockups then make the webpage from scratch.

civic scroll
#

adjustment will be done later

lyric mountain
#

⚠️ <-

rose warren
#

No figma

lyric mountain
#

but red

quartz kindle
#

ligma

civic scroll
#

yeah i will probably change the design later

#

but as for SVGs

#

idk

civic scroll
#

i use figma mainly for ideas

zealous trellis
civic scroll
#

here is th main user interfa e

lyric mountain
#

heckin evil company vibes

civic scroll
civic scroll
#

and i don't have to touch them

#

i don't need to

rose warren
#

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.

civic scroll
#

so a framework works for me

zealous trellis
#

I cant tell

#

:3

civic scroll
#

maybe yes

zealous trellis
#

< _ <

civic scroll
#

i will see what i can do

#

after all

#

it's there

#

now that i have to learn

#

but idk the starting point

zealous trellis
#

open source discord bot SCEMPen10

#

script kiddies: hippity hoppity your code is our property

civic scroll
#

if they understand what i wrote

#

then yes

zealous trellis
#

lol

lyric mountain
#

open sourcing is quite tame if u know how to deal with it

civic scroll
zealous trellis
civic scroll
#

and it's not free, i'm assuming

lyric mountain
#

github as CDN, upvoted

civic scroll
#

version control is useful ngl

zealous trellis
rose warren
# zealous trellis *gasp* there are other people out there who actually write HTML by hand? lol, a...

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.

zealous trellis
#

github basically IS a cdn at that point

zealous trellis
#

all from scratch

#

CSS, JS, HTML, everything from zero

civic scroll
#

also the needs for frameworks actually depends on what you want

rose warren
#

And I always hire a copy writer to write the copy properly too

civic scroll
#

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

rose warren
#

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.

zealous trellis
#

albiet, it can be anoyying sometimes

#

but it improves my experience

civic scroll
#

if i need full control on something

#

i will do from 0

rose warren
#

💯

zealous trellis
civic scroll
#

otherwise, framework is a good place to start

rose warren
#

I have a SAAS side project I'll be building from scratch

civic scroll
#

each person has their own way of doing things

#

also mac

zealous trellis
rose warren
#

But for clients, WP is fine

civic scroll
#

you do frontend right?

rose warren
#

Yeah

civic scroll
#

mind if i ask you about frontend sometimes?

rose warren
#

Sure

civic scroll
#

i just started building this 2 days ago

rose warren
#

I'll always answer if I'm free

civic scroll
#

thanks for the help

civic scroll
zealous trellis
#

imagine having a dedicated frontend dev to help you

civic scroll
#

i'm just 2 days into it

#

you had 5 years

#

:)

zealous trellis
#

Ive only actively designed sites for 2 years

civic scroll
#

still

#

that's alot more than me

zealous trellis
#

¯_(ツ)_/¯

#

Im also like... 16

civic scroll
#

@rose warren mind if i friend you?

#

i didn't code until i was 17.6

zealous trellis
#

I was basically still a babbling baboon of a child when i first started programming

#

:3

civic scroll
#

my idea was

#

it's my world

#

i can do everything in it

#

my world, presented in sequences of instructions

zealous trellis
#

yeah the developer-god feeling, I think thats what inspires most devs to get into programming

boreal iron
zealous trellis
#

I wanted to create whatever I wanted

#

so I learned JS XD

rose warren
civic scroll
#

js was a wack place to start btw

zealous trellis
#

little did I realize 3D modeling / art would give me more satisfaction

civic scroll
#

because you aren't used to strong-type discipline

#

so debugging in js

#

might be a pain

zealous trellis
# civic scroll js was a wack place to start btw

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

lyric mountain
#

strong-type is more verbose but damn I don't regret it

zealous trellis
#

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

civic scroll
#

silly errors in developement > hard-to-fix errors in production

lone creek
#

😳 any help

civic scroll
#

you can try TS

zealous trellis
#

nah

lyric mountain
zealous trellis
#

I tried it

#

multiple times over the years

civic scroll
zealous trellis
#

and Ive never once had a happy experience with TS

lone creek
zealous trellis
#

always "FUCKING HELL WHY DOESNT THIS WORK" with TS

lone creek
#

thx

civic scroll
civic scroll
zealous trellis
lyric mountain
#

I found java to be my sweet spot, js just feels weird for me

civic scroll
#

also if you know type manipulation, that can be powerful

lyric mountain
#

although I do program in js too

civic scroll
#

no regrets

zealous trellis
zealous trellis
civic scroll
#

better safe than sorry

zealous trellis
#

give me an example

civic scroll
#

two words

zealous trellis
#

I suppose Ive never asked for an example before

civic scroll
#

statically typed

zealous trellis
#

but give me an actual working example

#

because no one has ever done that before

#

:l

civic scroll
#

actual working one?

zealous trellis
#

yup

civic scroll
#

there

#

a working one

zealous trellis
#

.-.

earnest phoenix
#

You sure sayuri is the right person to ask

#

They a big nub

zealous trellis
#

guess not

civic scroll
#

misty

zealous trellis
#

telling me to go look at an entire repository

#

of their fuckin TS bot

#

as an example

#

like wtf

civic scroll
#

?

#

man you asked for a "working example"

#

also the thing is

earnest phoenix
#

You got what you asked for

zealous trellis
#

no one has given me a STATISTICALLY WORKING OR EVEN COMMON example of a piece of JS that is "unsafe" that TS does better

zealous trellis
civic scroll
#

it prevents you from assigning wrong types, referencing non-existence varibles and unsafe calls that would otherwise be normal in js

earnest phoenix
#

Pretty shit example but here we go

zealous trellis
#

.-.

civic scroll
#

btw

zealous trellis
#

does for me

civic scroll
#

try ESLint

#

doesn't

zealous trellis
#

Ive never once experienced any issues in JS that I couldnt solve in JS

civic scroll
#

you try calling non-existen variable

zealous trellis
#

easily

round cove
#

This dude has to be a troll lol

zealous trellis
#

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

civic scroll
earnest phoenix
zealous trellis
#

it reported the error

civic scroll
#

no

zealous trellis
#

I dont see whats wrong in that scenario

round cove
#

Bruh

zealous trellis
#

that function doesnt exist

civic scroll
#

that error occured in runtime

zealous trellis
#

simple as that

round cove
#

This homie actually trolling

#

Sayuri don't take the bait

zealous trellis
earnest phoenix
round cove
#

They gave you reasons and you're dismissing them lol

civic scroll
#

in TS it will forewarn you that
Property 'deferUpdate' does not exist on type 'CommandInteraction'. (ts 2303)

earnest phoenix
#

Yep

zealous trellis
civic scroll
#

again, forewarn

earnest phoenix
round cove
#

It tells you that before you even run the script is the point.

zealous trellis
earnest phoenix
#

So you get it before compile and running

civic scroll
#

you don't test

zealous trellis
#

TS is just a glorified Linter

civic scroll
#

...

earnest phoenix
#

What

zealous trellis
#

it finds errors before running the code
the same thing a linter does

earnest phoenix
#

You're actually dumb I'm sorry

round cove
#

Told y'all lmao

civic scroll
#

TS again is not a linter

#

it's a compile language

earnest phoenix
#

It's a super set of js

civic scroll
#

it behaves like every compiler language

zealous trellis
civic scroll
#

eg. C#

earnest phoenix
#

It adds type safety, decorators, interfaces, generics, etc

zealous trellis
#

coolio, I dont see a reason to use em

civic scroll
zealous trellis
#

Im perfectly content with JS

#

¯_(ツ)_/¯

earnest phoenix
#

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

zealous trellis
civic scroll
#

also using a superset of js with strongly-typed structures makes you more consitent and write better code

zealous trellis
#

semantically, theres no difference in those two behaviors

#

Im not saying its a linter

#

Im saying it behaves similarly

civic scroll
earnest phoenix
#

Indeed

civic scroll
#

which means the program won't run at all

zealous trellis
#

whats your point

quartz kindle
#

oh boy another js ts fight

civic scroll
#

in js + linter it will just run

#

until the error goes wack

earnest phoenix
quartz kindle
#

hello church of ts

civic scroll
#

imagine not this
but a node error that crashes the process bcecause a top-level syntax wrror

earnest phoenix
quartz kindle
#

xD

civic scroll
#

tim

boreal iron
quartz kindle
#

oh boy

civic scroll
#

i will script in lolcode thanks

earnest phoenix
#

Php has no opinions

zealous trellis
# civic scroll in js + linter it will just run

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

earnest phoenix
#

Sorry

civic scroll
#

man too stubborn

earnest phoenix
#

Sounds like extra work

zealous trellis
quartz kindle
#

technically its "i couldnt care less" xD

boreal iron
civic scroll
#

i'm just saying i'm not forcing you

#

plus

zealous trellis
# earnest phoenix Sounds like extra work

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

earnest phoenix
#

Sayuri out here breaching ts when they were an avid js user just a few weeks ago

civic scroll
#

imagine you write ES2020

#

and run it on ES3 machine

round cove
#

omega

civic scroll
#

that's a problem with js

earnest phoenix
civic scroll
#

you can't get compability

#

but anyways, man likes dynamic

zealous trellis
civic scroll
#

let him be

earnest phoenix
#

Yea I did bud

civic scroll
#

we will be expected to see more stupid runtime errors that could otherwise be forwarned

#

leave the man be

quartz kindle
#

no need to hate on js either

#

i prefer js over ts myself

zealous trellis
# earnest phoenix Yea I did bud

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

civic scroll
#

if you have strong type discipline, no problem

#

but for those who are new to programming

#

that's a must

quartz kindle
#

i dont really agree with that

civic scroll
#

otherwise they will just struggle on relatively easy problems

#

i had it myself

earnest phoenix
#

I also don't agree with that

civic scroll
#

also dynamic lang makes it harder for me to track types

quartz kindle
#

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

earnest phoenix
#

Cause Tim doesn't agree

slender thistle
#

Embrace Python

civic scroll
zealous trellis
#

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

earnest phoenix
slender thistle
#

Clearly it does cuz y'all are having beef

#

😎

quartz kindle
#

no clearly php is better

slender thistle
#

True

earnest phoenix
#

I'm out

civic scroll
#

but again, you do you
i could care less about what tech people code in and i can not give an f to it

boreal iron
quartz kindle
#

again, technically its "i couldnt care less"

#

:^)

civic scroll
#

it is what it is

#

HOUJUU

zealous trellis
civic scroll
#

update the assets thank you

zealous trellis
#

¯_(ツ)_/¯

civic scroll
#

glorified

civic scroll
#

sure it is

slender thistle
#

you ok bro?

#

PHP clearly superior

civic scroll
#

but you will comeback to it eventually

slender thistle
#

@latent heron amirite?

earnest phoenix
#

Php sucks

zealous trellis
slender thistle
#

You suck

earnest phoenix
#

No u

quartz kindle
#

you know whats actually quite impressive?

#

nim

boreal iron
earnest phoenix
#

Wanna know what else is quite impressive

civic scroll
#

you know what's more epic?
VSPunk 2077

slender thistle
#

nim?

earnest phoenix
#

The fact a lot of people can speak English and not have a stroke

slender thistle
#

Oh right

#

Yeah ngl

zealous trellis
slender thistle
#

nim is something... special

zealous trellis
#

executing a fractal?

civic scroll
#

VSPunk

#

2077

zealous trellis
#

er.. sure

earnest phoenix
#

44% of the gpu on vscode

zealous trellis
#

well go with that

zealous trellis
civic scroll
#

running a fractal costs you CPU

earnest phoenix
#

Lol

civic scroll
#

my GPU?

#

GTX 1660

zealous trellis
#

hehehe

earnest phoenix
#

A 1660

#

Nice

zealous trellis
#

meh

#

its pretty good

#

even in 2021

civic scroll
#

46% usage tho

quartz kindle
zealous trellis
#

I personally need a litttttttle bit more power

civic scroll
#

render 100 cards async @opaque fern

#

cool ig

slender thistle
earnest phoenix
#

Seems legit

civic scroll
#

i just need more ram

#

and a misty qe

#

and a houjuu

earnest phoenix
#

You can download more ram

zealous trellis
civic scroll
#

and everyone in the team

earnest phoenix
#

Download more ram

civic scroll
#

the freq

earnest phoenix
#

It's ez

civic scroll
#

the freq is slow

zealous trellis
#

;3

civic scroll
#

i afraid it's not compatible

zealous trellis
#

im cultured

civic scroll
#

@earnest phoenix also

#

i honestly need a project manager

earnest phoenix
#

For what

zealous trellis
#

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

earnest phoenix
#

I'ma get a 3090 to be like the cool kids

zealous trellis
#

no... dont

earnest phoenix
#

Once money starts growing out my ass ofc

zealous trellis
#

its really not worth it

civic scroll
#

3090 for mining

earnest phoenix
civic scroll
zealous trellis
earnest phoenix
#

3090 with a threadripper to play Roblox

civic scroll
#

no

#

to play osu

#

at 680 x 480

#

px

#

30fps

#

bro imagine

earnest phoenix
#

ima make a virus that deletes osu and then itself from your system

civic scroll
#

ok

#

get pass

earnest phoenix
#

And it prevents you from downloading osu again

civic scroll
#

login page

earnest phoenix
#

Forces you to delete osu and never download again or else it activates again

civic scroll
#

okay

#

i will make a virus

#

that sends math to misty

#

auto misty repellant

earnest phoenix
#

I will never download anything you send me

#

So ha

civic scroll
earnest phoenix
#

For it to be a virus it'd have to infect my device no?

#

@drowsy crag

rustic nova
#

@everyone LOL

#

KEKW

earnest phoenix
#

Imagine that worked

#

I'd cry

#

Veld still won't respond to my dm

#

I'm sad

quartz kindle
#

dming veld is a skill issue

#

lmao

boreal iron
#

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 smirk

boreal iron
earnest phoenix
#

How I can delete an attachment from a message?

rose warren
#

You have to delete the message

earnest phoenix
solemn latch
#

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?

quartz kindle
#

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

boreal iron
haughty bough
#

Hello. How do I delete a slash command?

boreal iron
#

Sending a delete request to the API

#

Or using the corresponding method of your library if you use one

haughty bough
signal estuary
#

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?

lyric mountain
#

why when something wrong happens

#

it's always mysql

tacit sundial
#

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

earnest phoenix
#

is there a way to prevent select menu placeholder from resetting upon selection?

#

like keep the selected option as the placeholder

boreal iron
#

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 KEKW

#

@boreal iron talking to yourself again?

#

Yee happens from time to time

#

leave me alone

earnest phoenix
#

So

#

I will be signing u up for therapy

boreal iron
#

U should visit one for talking trash about PHP & SQL oldEyes

earnest phoenix
#

SQL is good

#

PHP nah

lament rock
#

string concatenation heresy!1!!

earnest phoenix
#

you cant use `` in sql anyway can you

#

Actually I am dumb

#

dont mind me

#

:)

boreal iron
#

(imagine I would point that gun emoji towards you)

#

Huh wtf where did my gun emoji go?!

#

Hello?

#

WTF

lament rock
boreal iron
#

What the fuck is happening …. Now it’s there

lyric mountain
lament rock
#

👉👉 hands up

boreal iron
#

One day I will fucking throw that phone away and will nuke my ISP

boreal iron
#

There’s no syntax highlighting in npp for template strings notlikenoot

lament rock
#

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

boreal iron
#

Pff that’s just an issue for poor people can’t pay for enough RAM

lament rock
#

it adds up quickly

#

taking a look at Presences taking a fuck ton of memory

boreal iron
#

You don’t care if your average server has 128 GB

lament rock
#

Not everyone has the money to make that kind of investment especially for hobby projects. Until it turns professional

boreal iron
#

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

lament rock
#

fair

boreal iron
#

And yeah I can only speak about me, doesn’t mean I generally disagree with what u say

quartz kindle
#

you can manipulate the js engine to get rid of concat strings

boreal iron
#

lmao is there anything you haven’t a solution for?

quartz kindle
#

lmao

#

its not worth it tho

#

concat strings are extremely important for performance

boreal iron
#

Huh they are?

quartz kindle
#

for example, building a string with a loop

#

if you "flatten" the string on every iteration, its gonna be like 100x slower

latent heron
#

^

#

a lot of it is about just making garbage collection performed as little as possible

boreal iron
#

Makes sense tho if the concerted string is already allocated to the memory

earnest phoenix
#

pew pew

quartz kindle
#

:^)

boreal iron
#

Well why not can only cause me to hit a tree eventually

quartz kindle
#

xD

boreal iron
#

Very "creative"

quartz kindle
#

also "moving target" "up to date"

earnest phoenix
quartz kindle
earnest phoenix
#

teach me the ways of magick

quartz kindle
#

play magicka

earnest phoenix
#

magicka

#

is this skyrim

#

tf

boreal iron
earnest phoenix
#

shush

#

I dont

boreal iron
#

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)

quartz kindle
#

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

boreal iron
#

I think you can but you probably need an extension

#

Not sure if that’s build in natively

quartz kindle
#

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

sudden geyser
#

quit while you still can

boreal iron
#

Shhh we found a gap in the programming market

#

This will be revolutionary

sudden geyser
#

I exist to close that gap.

boreal iron
#

wooops pingy

sudden geyser
#

Ah, a baseball bat!

latent heron
#

this is a living facebook moment joi

boreal iron
#

Regarding your name you must be a little more optimistic

winged mulch
#

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?

lyric mountain
#

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

earnest phoenix
#

rip if its a 1gb download lawl

lyric mountain
#

Well, that's the toll for processing video ig

flat copper
#

?

earnest phoenix
#

Is the function embedbuilder async or does it return a promise

marble juniper
marble juniper
#

lol

#

it already takes multiple seconds to scan one large image with nsfwjs

#

don't wanna imagine how long it is for videos

earnest phoenix
#

Gonna code now

feral aspen
#

How do you destructure this.

var current = result[0].current;
pale vessel
#

const [{ current }] = result;

earnest phoenix
#

destructure a destructure zoomeyes

earnest phoenix
#

doesn't that just get an array of currents?

cinder patio
#

It's the same as result[0].current;

earnest phoenix
#

hm

#

so how would you get the first element?

#

second*

cinder patio
#

you can't get the second element's current property

#

but you can get the second element

#

const [{ current }, secondElement] = result;

earnest phoenix
#

so basically

#

thats useless

#

unless you want just the first elements current property

umbral lake
#
  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()
  }
```?
fringe badge
#

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

pale vessel
#

Just call it something else

cinder patio
#

you can't call it something else afaik

earnest phoenix
#

why not

cinder patio
#

it has to be current

vivid fulcrum
#

you can iirc

cinder patio
#

hoooooooow

vivid fulcrum
#

property: variableName

pale vessel
#

const [{ current }, { current: current2 }] = result;

earnest phoenix
#

so its not useless

#

pog

cinder patio
#

nice

feral aspen
#

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>
feral aspen
#

The first option was set as a type called Integer.. but that makes him only input an integer.

pale vessel
feral aspen
#

Sub-commands are really confusing.. god dammit.

cinder patio
#

you can make the amount optional and have a all boolean option which is also optional

pale vessel
#

Or make the amount optional

earnest phoenix
#

you can define a default value can't you?

pale vessel
#

If no amount provided, deposit all

#

In code, yes

feral aspen
#

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?

pale vessel
#

No

#

Only subcommands

#

Why in lord's name do you need that much nesting

feral aspen
#

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.

pale vessel
#

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

feral aspen
#

I'm trying to make it like !deposit all and !deposit <amount>

#

.. or should I use type string?

pale vessel
#

Then make amount a string, that's the only way

feral aspen
#

DIscord..

pale vessel
#

You'd have to parse the integer yourself

feral aspen
#

and .toLocaleString() and some other stuff. 😐

pale vessel
#

Or Number() if you don't want the user to add unnecessary characters

feral aspen
#

Thanks though!!

near grotto
#

how do I set method to post while sending a message through webhook

#

?

earnest phoenix
#

What are you using to send the request

#

typically any module would have a post method

near grotto
#

when I'm sending message using a webhook

earnest phoenix
#

Make sure you have the right webhook url

near grotto
#

I have it right

#

the method is not allowed

#

the allowed method is post

earnest phoenix
#

Show code

near grotto
#

@earnest phoenix here it is

earnest phoenix
#

Oh you are using discord.js

near grotto
#

ya

earnest phoenix
#

no idea then

near grotto
#

k

earnest phoenix
#

I dont use discord.js webhook client

#

bruh

#

Can I not send the discord.js server

near grotto
#

ok

earnest phoenix
#

I'd ask there

#

this dev channel is a bit slow at responding rn

near grotto
#

ya

quartz kindle
near grotto
quartz kindle
#

and you're sure that webhook exists?

near grotto
#

yes

#

I created it

quartz kindle
#

which version of discord.js are you using?

feral aspen
#

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.

quartz kindle
#

if the user types a number with decimals, parseInt will remove the decimals yes

feral aspen
#

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.

quartz kindle
#

ye

feral aspen
#

👍

near grotto
quartz kindle
#

v12 is like this

near grotto
quartz kindle
#

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})

near grotto
#

ohhhhh

#

an code for v13?

quartz kindle
#

what you had should work for v13

crimson vapor
#

v13 cringe

#

Doesn’t support LTS yet

quartz kindle
#

wut

crimson vapor
#

Doesn’t it force node 16?

quartz kindle
#

16 will become LTS in like a month

crimson vapor
#

Cringe

#

Can’t they just use typescript to compile down to support 14?

quartz kindle
#

djs doesnt use typescript

#

only for typings

crimson vapor
#

yeah but typescript can compile JS, no?

quartz kindle
#

idk

#

but babel can

earnest phoenix
#

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

crimson vapor
#

It’s basically the same as putting any everywhere I would think

quartz kindle
#

well feel free to do it yourself lul

#

i believe someone here actually did

crimson vapor
#

I don’t see why djs won’t if it’s possible

quartz kindle
#

why should they?

#

they are free to support whatever node versions they want

crimson vapor
#

Yeah but when 90% of their users don’t understand the difference between 14 and 16, it just causes problems

quartz kindle
#

skill issue

earnest phoenix
#

tim

#

dont become like everyone else

#

saying skill issue

quartz kindle
#

lmao

crimson vapor
#

Skill issue

quartz kindle
#

most people should be able to upgrade to node 16

crimson vapor
#

I hope so

quartz kindle
#

it was the same thing in v12

earnest phoenix
#

There are still people who use v12

quartz kindle
#

people had to upgrade their node anyway

earnest phoenix
#

million

crimson vapor
#

Yeah but they had to upgrade to LTS I thought

quartz kindle
#

they decided to upgrade to the next LTS

inland quail
crimson vapor
#

And guess what
Every single day we had like 3 people come in asking about Array.flat or something

quartz kindle
#

which will be soon

crimson vapor
#

I hope so

quartz kindle
#

im still on djs v12

#

but using node 16 unofficial builds just for pointer compression

inland quail
#

it's gonna be LTS in 2 months

earnest phoenix
#

less then 2 months

crimson vapor
#

hmmm

earnest phoenix
#

month is almost up

crimson vapor
#

How is that less that 2 months

#

That’s in like 60 days

inland quail
#

it is 2 months

boreal iron
earnest phoenix
#

ah right

#

I misread it

#

Lawl

#

why did they skip v15

#

v14 v16

inland quail
#

only even ones

earnest phoenix
#

Smh

#

that is oddest

#

wait v17 is an odd number

#

wym

inland quail
#

they will remove it when they release v18

earnest phoenix
#

smh

inland quail
#

they only make even ones lts

earnest phoenix
#

so rude

tulip ledge
#

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

lethal trout
earnest phoenix
tulip ledge
#

wdym id?

earnest phoenix
#

when slash commands are registered they are given an ID iirc

tulip ledge
#

So if I kick my bot

#

and reinvite it?

boreal iron
earnest phoenix
#

^

tulip ledge
#

Yeah I didn't touch the code in liek a month

earnest phoenix
#

it re adds the slash command

tulip ledge
#

so idk what happened

boreal iron
#

Nothing you can do about it atm

tulip ledge
#

Bruh moment

earnest phoenix
#

you can delete all commands from the guild can't ya

#

and just re upload

boreal iron
#

Running the command a few moments later will work again, mostly at least for me

tulip ledge
#

how do I do that

earnest phoenix
#

🤷‍♂️

#

I dont use slash commands

gentle sail
#

how i change font at this :/

boreal iron
#

Make sure NOT to register the same slash commands any time your start your bot

earnest phoenix
#

How can i select top panel's and button' color with css?

tulip ledge
boreal iron
#

Register them only/edit them only if you have changed something

lethal trout
tulip ledge
#

reduce only works on an array

#

cmd is most likely an object

boreal iron
earnest phoenix
#

prob not

#

lawl

tulip ledge
#
  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);
  }
boreal iron
#

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

tulip ledge
#

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

boreal iron
#

Well there you go 👍

eternal osprey
#

how do i check if a message.content includes http, .com, .xyz etc etc

calm stone
#
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?

eternal osprey
#

This guy is ghost pinging lmao

#

He straight up pinged community managers and deleted it. What a morron.

calm stone
eternal osprey
calm stone
#

if (message.content.includes("https") || message.content.includes(".com")) return;

pale vessel
#

array.some(balls => message.content.includes(balls))

eternal osprey
#

do you know what an array is?

eternal osprey
earnest phoenix
slender wagon
#

is there a way i could update nodejs from its console

earnest phoenix
slender wagon
#

okay

ocean jolt
#

How do I make my bot send a DM to the user who has voted my bot on top.gg??

rose warren
ocean jolt
rose warren
#

In the docs or in the pins

ocean jolt
#

Okay..

pallid jungle
#
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]});
pale vessel
#

Discord is the default export

#

You can't destructure it like that

gentle sail
pale vessel
#

Isn't that h2

#
h2 {
    font-family: CustomFont;
}```
gentle sail
#

okay

gentle sail
pale vessel
#

That's CSS

#

Use the <style> HTML tag

gentle sail
#

okay

pallid jungle
#

@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]});
shrewd hazel
#

Imagine having something called "bracket)

pallid jungle
#

@shrewd hazel where

shrewd hazel
#

Somewhere.

signal estuary
#

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 '?'
earnest phoenix
#

Discord.js v13 needs at least node 14

near grotto
#

my webhook isn't working....it's not showing any error but it's not working also

pallid jungle
near grotto
shrewd hazel
wheat mesa
earnest phoenix
#

wait what

pallid jungle
signal estuary
earnest phoenix
#

v14 has ?? and ?.

earnest phoenix
#

big brain moment

near grotto
#

it supports v12 or lower

shrewd hazel
pallid jungle
earnest phoenix
#

@signal estuary try transferring your code to a bash or deno repl

#

For some reason those ones have node v14 installed

near grotto
#

that's the different stuff

earnest phoenix
#

yeah it is

near grotto
earnest phoenix
#

but for some reason you can use node v14 in different language repls

#

replit team are 5heads

near grotto
#

my webhook isn't sending any message....how do I fix it?

cinder patio
near grotto
#

this is not recognized

#

the 'message' event

earnest phoenix
#

wtf

cinder patio
#

didn't v13 rename it

near grotto
#

idk

pale vessel
#

messageCreate I guess

near grotto
pale vessel
#

Check your intents

near grotto
#

I did

wheat mesa
near grotto
#

that version is having many problems

earnest phoenix
#

i cant help but say

what the fuck is wrong with you replit

pale vessel
#

??= needs v15

#

15 actually

#

I dunno what needed v16.6

earnest phoenix
#

v16.9

wheat mesa
#

Ah

quartz kindle
#

v69

vocal trellis
#

i am searching people who can install mongodb with authentication on my ubuntu server

wheat mesa
#

Why not do it yourself

summer torrent
#

^

boreal iron
#

_what could go wrong installing a database on a server without any clue especially about networking and firewalls _

#

Default inbound policy: ALLOW

sudden geyser
#

proceeds to drop database in production

earnest phoenix
#

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

vivid fulcrum
boreal iron
#

lmao

sudden geyser
#

Bobby's friends with everyone

boreal iron
#

If it’s up to date it should be: 13.1.0

boreal iron
#

(if I’m up to date)

ocean jolt
#

ok, so I've got the token now...?