#development

1 messages · Page 21 of 1

wooden ember
#

there must be somthing that exists like this cuz thats how bots leave vc when the last user leaves the channel

civic scroll
#

@wooden ember this right?

#

the data struct for both parameters is VoiceState
https://discord.js.org/#/docs/discord.js/main/class/VoiceState

wooden ember
proven escarp
#

lmao

civic scroll
#

OH

#

I DIDN'T READ IT

#

wait

#

but his code was correct tho

proven escarp
#

i didn't check the code lol

#

what did i just see lmaooo

ancient nova
#

"The user aborted the request"?

#

what does this mean again?

#

sometimes happen on my onjoin welcome command, even though I have a catch on the send func

winged linden
#

stupid question, this was working fine on my windows. moved my bot to linux (my host) and it aint loading

#

any idea why

wheat mesa
#

You need to update your nodejs version on your VPS

civic scroll
#

what's your node ver

#

on linux

winged linden
civic scroll
#

💀

wheat mesa
#

??= is a fairly recent addition as an operator iirc

winged linden
#

on windows its v16.11.1, on linux v14.19.3 lol thanks @wheat mesa

#

stupid mistake from my side

civic scroll
#

glad it's resolved

ancient nova
#
    if (interaction.member.roles.highest.comparePositionTo(member.roles.highest) <= 0) {
    }
``` this a thing??? wth
wooden ember
#

ok so ive descovered that the client issues i was having causing my bot to multiply

#

it looks like when i reload my commands (not the client just the requires for the command files) somhow thats when it starts

#

havent had any issues untill now when my cli is getting spammed with memory leak errors

ancient nova
wooden ember
#

thats the memory leak ones

#

but other than that no errors

ancient nova
#

the memory leak seems to be causing this, can you send the restart command?

lyric mountain
#

2 listeners is a lot already

#

use a single, catch-all listener and defer to the proper handlers

ancient nova
#

@lyric mountain how useful would a lockdown command be? and how should it behave?

#

I wanted to add it as a anti raid feature, it would just take away permission from the everyone role

#

is that good or na?

lyric mountain
#

if u have an anti-raid u dont need to lockdown

#

antiraid is supposed to not let raiders in

ancient nova
#

I mean there is also another reason for such command, just plain spam for example

lyric mountain
#

for that make a spam detection instead

ancient nova
#

so that's good enough right?

ancient nova
#

but

lyric mountain
#

punish individual users

ancient nova
#

if the mods for whatever reason would wanna lock the chnanel it should be available

lyric mountain
#

discord even added the timeout feature

ancient nova
lyric mountain
#

don't try to justify a lock command as "antiraid/spam feature"

#

simply say "to allow mods to lock channel"

ancient nova
#

I mean it was one of the reasons

ancient nova
#

now anyway how should I do this?

lyric mountain
sudden geyser
#

Try to reach one definition of your lock command.

#

Rather than a set of use cases.

lyric mountain
#

antispam/raid are by definition self-sufficient

ancient nova
lyric mountain
#

else u get a swiss cheese feature

ancient nova
#

is there a way to get channel mention?
is message.mentions.channels a thing?

#

you guys know I'm waiting for a response right

sick agate
#

uy

ancient nova
sick agate
#

get channel id

lyric mountain
#

you know I'm doing other stuff aside from answering your questions right?

sick agate
#

and do <#id>

ancient nova
sick agate
#

parse it

lyric mountain
#

cant u simply do !lock and lock the current channel?

ancient nova
#

I don't know if that's going to work

ancient nova
lyric mountain
#

if there comes the need to lock an entire channel the mods wont have time to wonder whether they mention or get the id

ancient nova
#

what if the mod wants to lock the channel from a different channel?

lyric mountain
#

that makes no sense

#

lock feature is emergencial

ancient nova
#

okay I still want that to be a feature

lyric mountain
#

then make it

ancient nova
#

I'm asking if what I done will work tho

#

never tried getting a channel mention in d.js

boreal iron
earnest phoenix
#

thats just how i code, too

#

but once the product is finished i remove them

#

it helps me, honestly

ancient nova
boreal iron
#

Imagine using application commands to let people select your channel instead of checking the message mentions, possible arguments you have to validate later and the channel cache…

stuck dawn
#

i am trying to do like a keylistener in react, how can i make one..

#

this is keyeventlistener component

ancient nova
#

I'm not using interactions nor slash

#

I'm using message content commands

boreal iron
boreal iron
ancient nova
#

what's the permission bit name that allows people to do stuff with channels I forgot?

lyric mountain
#

I would take bee using 91248901 comments everytime if it means they wont write inline ifs/returns

ancient nova
#

😐

#

can someone just tell me what the bit is called or no

lyric mountain
#

bit is called a bit

boreal iron
#

aka MANAGE_CHANNELS

#

Docs -> searching -> permissions -> first result

ancient nova
#

yeah I got it, thanks

#

do you guys think lockdowns should be logged?

boreal iron
#

You should at least mention the user (and it’s ID) as channel edit reason when executing the command, so it’s been written down in the audit logs accurately

ancient nova
#

now before I start doing the actual lockdown thing how exactly do you edit channel overwrites in v13?

boreal iron
#

One deleting your bot message showing the log and nobody will ever know again who locked the channel

ancient nova
#

yeah nw

ancient nova
#

update: doesn't work

#

why exactly does channel return promise pending?

#

wtf?

wheat mesa
#

Because you didn’t await the fetch

ancient nova
ancient nova
#

it logs the channel pretty sure, so not sure why it still somehow says that's it's not a text channel

#

also channel name and ID is undefined

#

wth

#

why does channel.type return undefined when the channel property returns the channel??

lament rock
#

What is the logged value of channel

#

also, the only channels that can't be locked are category channels and stage channels since all other channel types are text based

#

even then, you can prevent connect on stage and voice

ancient nova
#

I'm soooo confused

ancient nova
#

idk how it returns whatever I just showed you

#

message.mentions.first() should return the mentioned channel
channels.fetch should return the channel by ID
cache.find should return channel by name

if none of that returned it should return the current channel

#

what am I doing wrong

wheat mesa
#

If you’re still doing the same code, I told you already that when you fetch the channel you’re not awaiting it

#

Also this code format is truly horrific to read so I can’t be bothered

wheat mesa
lament rock
boreal iron
#

Does actually somebody know if the node-mariadb lib internally caches failed queries due to connection outages and send the query once again after the pool connection is back?

#

I mean I guess not but didn't try it out yet

lament rock
#

Would be stupid if it did because you usually don't want to assume what the user wants and just let the user do whatever

boreal iron
#

yeah...

#

guess I need to create my own cache when connection issues are present to resent them later

ancient nova
#

that's why

#

well anyway

#

I made it only work with mention and current channel for now

lament rock
#

Some optimizations can be made to the function like not executing the regexs twice, but you get the idea

#

Try not to read the other code too closely. You will see spaghetti

#

alternatively which you should be doing is using slash commands

#

you can have them piped down the websocket

ancient nova
#

does anyone know how to grab the user from interaction?

#

I forgot

#

uhdoes parse emoji util have a guild name property in it?

sharp geyser
#

@wheat mesa Also I figured out that DI issue

#

Rather someone from the D#+ server did

ancient nova
#

@sharp geyser should I add an anime info command kek

#

WHY DOES APIS NEVER GIVE THEIR FUCKING ENDPOINTS IN THE DOCS

#

IT'S SO ANNOYING

#

LIKE HOW TF AM I SUPPOSE TO GUESS IT

winter pasture
ancient nova
#

how do I actually fetch an anime info from this?

winter pasture
#

Pretty much standard graphql calls

sudden geyser
#

Do you have experience with GraphQL?

ancient nova
sudden geyser
#

Then you should start off with https://graphql.org/learn/

ancient nova
lyric mountain
#

nope

ancient nova
#

wow thanks

#

I knew I could rely on u

lyric mountain
#

graphql isn't as straightforward as a common api

ancient nova
#

not gonna bother

#

that's 🧢

#

just too lazy to learn a whole new api system

lyric mountain
#

I'd be spoonfeeding u the entire time if I helped u with anilist's

sharp geyser
#

If it's a graphql API then you just request what you want

#

And they give you exactly what you request

sharp geyser
#

Yes but that's not okay

sudden geyser
sharp geyser
#

Spoon-feeding doesn't do you any good

ancient nova
#

I'll be making the rest of the commmand myself anyway, only thing you'd be doing is help me get the request json data back

sharp geyser
lyric mountain
sudden geyser
#

that's the issue: they don't know how to request data

#

nor how to use it in general

ancient nova
#

well I've never used that before so I don't know what you guys are expecting from me lol

ancient nova
sharp geyser
#

Oh yeah nah I don't blame you then

ancient nova
sharp geyser
#

Ani list has a fuck ton of fields

ancient nova
#

yea :/

sharp geyser
#

That's probably why they went with a graphql implementation over typical rest

#

The amount of data they'd be sending if it was a rest api

ancient nova
#

I see

sudden geyser
#

nah, they just did it because it was modern

#

the way their pager is implemented is a mess

sharp geyser
#

Either way it was a good choice

lyric mountain
ancient nova
#

what should I start with then?
all I need is to search an anime by name, and get some info back, such as desc, rating etc

sharp geyser
#

Graphql at least cuts on the amount of data being sent as you only get what you request

ancient nova
#

that going to be a possible?

lyric mountain
#

graphql is just a json sql change my mind

ancient nova
#

@lyric mountain if everyone's fine with it can u spoonfeed the req code 😭

#

😩

lyric mountain
#

naaah

#

also it's java

sharp geyser
ancient nova
#

I can convert

#

like I did the pagination

#

👍 KEKW

sharp geyser
#

So if you want it's description you have to tell graphql to return the description

sharp geyser
#

I mean it's not a bad model

ancient nova
#

it seems kind annoying to use

sharp geyser
#

It cuts down on data passage

#

You don't wanna be sending GB (over exaggerating) data

ancient nova
#

okay misty can u tell me how to fetch an anime by name? that's all I ask, rest I'll figure out myself

sharp geyser
#

I haven't used graphql in ages

lyric mountain
#

there's a playground for anilist

sharp geyser
#

Oh that's even better

lyric mountain
#

phi?

sharp geyser
#

Actually I gtg so I can't help you Bae

#

Sorry

ancient nova
lyric mountain
#

read the docs, see if u understand it

#

then ask questions

ancient nova
#

I'm tired asf I probably won't, but ig I can try

boreal iron
ancient nova
#

wait how do I even get the anime by name

#

only doc I see is to get it by ID

lyric mountain
#

I mean u cant expect people to figure out the docs for u all the time

ancient nova
#

and idk how in the hell users are going to get an ID from a website they don't know exists

lyric mountain
#

I'm 100% sure they mention grabbing anime by name

sick agate
#

they also probably need to find it somehow

lyric mountain
#

else I'd not be able to build my wrapper

sudden geyser
#

@ancient nova have you tried reading the guides yet

sharp geyser
#

With a graphql API you definitely should be able to get by any fields really

sick agate
#

so use there way

sharp geyser
#

I have 0 clue how to implement graphql

lyric mountain
#

I mean anilist wrapper

lyric mountain
#

no way I'd make my own gql api

sharp geyser
ancient nova
#

they don't istg

#

I went through the entire doc page

sharp geyser
#

I was just saying I have 0 clue how to make my own

#

Lmao

ancient nova
#

dude wth how the hell does that even work

#

how do I input my own shit into the query

#

I'm so confused

#

I think I'm gonna give up, can't even seem to be able to input a variable lmao..

tulip ledge
#

Dont have a clue about the context but when I use gql I just had to query a string znd u can use templates in a string to pass a variable

ancient nova
sudden geyser
#

replace "name" with whatever the type of name is supposed to be (e.g. String)

ancient nova
#

huh what

sudden geyser
#

$title: "name" becomes $title: String

ancient nova
#

still gives an error

#

besides how do I actually input my own title in there

wheat mesa
#

GraphQL is something I want to learn but haven’t had a use case for yet so I haven’t bothered

ancient nova
#

I don't seen an option to give it a name

sudden geyser
#

You renamed name to title in Media (...).

ancient nova
round cove
ancient nova
round cove
#

Send the playground

sudden geyser
#

it's called search, not name.

ancient nova
#

oh

#

now how do I input my own anime name into this?

sudden geyser
#

there's a box at the bottom on the left where you can input stuff

round cove
#

You can't in the playground

sudden geyser
#

It's just regular json

ancient nova
#

thanks guys

sudden geyser
#

some magic and you have data

wheat mesa
ancient nova
#

how would I actually use that in a fetch func?

wheat mesa
#

2nd day at school they’ve already got us busy

sharp geyser
#

Lmao

#

I have yet to feel that pain yet

#

I don't go back until 30th

wheat mesa
#

Ok I drive now bye

ancient nova
#

I think that's going to work

#

gonna start writing the command

#

gonna send source once I finish for u guys to rate kek

sharp geyser
#

0/10

ancient nova
#

it's gonna be 10/10 trust

#

now that I actually get how it works a little I think I can make it work

boreal iron
#

You really shouldn’t let people rate your code

#

If you wanna prevent depression

sharp geyser
#

Just let fake do it

#

He doesn't know what he's talking about so no depression

boreal iron
#

lol dingus

#

Im totally unaware what I’m doing…
Things just happen!

#

Magically…

sharp geyser
#

If you use notepad that's exactly what happens

#

You're lucky shit even works

boreal iron
#

It’s called experience if you don’t fucking need auto complete etc. doing the job for you

ancient nova
boreal iron
ancient nova
ancient nova
ancient nova
#

is there anything that you want to say, misty?

cinder patio
#

that doesn't make ur code better

boreal iron
#

Or change his weird style

#

misty just being mad because he can’t code using notepad

sharp geyser
#

I definitely could and have

#

I just don't have the brain cells to waste after talking in this channel for so long

ancient nova
#

almost done guys

#

almost

wheat mesa
#

Almost done

#

Blissfully unaware

ancient nova
#

well it doesn't work but it was worth a try

quartz kindle
#

graphql is weird af

#

they could have made a json-based protocol, instead they made a weird ass language that is similar to json but it isnt

ancient nova
#
{"data":{"Media":{"title":{"userPreferred":"Black Clover"},"description":"In a world where magic is everything, Asta and Yuno are both found abandoned at a church on the same day. While Yuno is gifted with exceptional magical powers, Asta is the only one in this world without any. At the age of fifteen, both receive grimoires, magic books that amplify their holder’s magic. Asta’s is a rare Grimoire of Anti-Magic that negates and repels his opponent’s spells. Being opposite but good rivals, Yuno and Asta are ready for the hardest of challenges to achieve their common dream: to be the Wizard King. Giving up is never an option!<br>\n<br>\n(Source: Crunchyroll)","isAdult":false,"coverImage":{"large":"https://s4.anilist.co/file/anilistcdn/media/anime/cover/medium/bx97940-bPydLjny8PUw.png"},"trailer":{"site":"youtube","id":"vUjAxk1qYzQ"},"tags":[{"name":"Magic"},{"name":"Shounen"},{"name":"Male Protagonist"},{"name":"Super Power"},{"name":"Ensemble Cast"},{"name":"Demons"},{"name":"Revenge"},{"name":"Elf"},{"name":"Bullying"},{"name":"Reincarnation"},{"name":"Cute Boys Doing Cute Things"},{"name":"Heterosexual"},{"name":"Conspiracy"},{"name":"Cult"},{"name":"Swordplay"},{"name":"Kuudere"},{"name":"Lost Civilization"},{"name":"Foreign"},{"name":"Cultivation"},{"name":"Nun"},{"name":"Disability"},{"name":"Suicide"},{"name":"Travel"},{"name":"Advertisement"},{"name":"Tsundere"},{"name":"Time Skip"},{"name":"Adoption"},{"name":"Female Harem"},{"name":"Love Triangle"},{"name":"Espionage"},{"name":"Tomboy"},{"name":"Dungeon"},{"name":"LGBTQ+ Themes"},{"name":"Age Regression"}]}}}
#

I think I somehow made it work (?)

quartz kindle
#

dafuqbis that tags format jesuschrist

ancient nova
#

idk I didn't make it kek

#

definitely gonna have to remvoe the br br thing

#

do I use regex? it seems stupid but I think it may change depending on the source

lyric mountain
#

You need to convert it from html to plain text

ancient nova
#

how should I even begin writing a way to list the tags

#

I'll take the first 3 cause there is too many to list

#

any help?

quartz kindle
#

ah yes, lets make our api return html text inside a json response, because that totally makes sense

spark flint
#

you could regex remove html tags

lyric mountain
#

I just list all the tags

spark flint
#

is this nodejs

quartz kindle
lyric mountain
#

If there're too many I add ...and more X

spark flint
#

wouldn't js string.replace(/<\/?[^>]*>/gmi, "") work

#

idk if gmi is right thats just my usual

lyric mountain
#

That'll just remove

#

You probably want to convert to text instead

spark flint
lyric mountain
#

Like br becomes \n

#

b becomes **

spark flint
#

ah ok

lyric mountain
#

There's a lib for that btw

ancient nova
#

do I use filter for that? or slice?

lyric mountain
#

See the docs

#

You're developing a really bad habit

ancient nova
#

what

#

do you mean

lyric mountain
#

You ask before searching urself

ancient nova
#

please 😭

spark flint
#

asking here is a last resort for me ngl

lyric mountain
#

The order is usually ctrl + space -> docs -> search for similar questions -> research -> ask online

proven escarp
proven escarp
#

what's that lmao

lyric mountain
#

Aka intellisense

proven escarp
#

oh

#

lmao

lyric mountain
#

Or "autocomplete"

proven escarp
#

makes sense

#

ye

ancient nova
lyric mountain
#

Basically u type . and let the popup tell u what can be used for that variable

ancient nova
#

coding inside a simple text editor

proven escarp
#

bro ItsOkayBae thinks #development is stackoverflow or documentation fr

ancient nova
#

just tell me how to slice those damn tags

proven escarp
spark flint
lyric mountain
#

Ask google first

#

You need that as a dev

proven escarp
lyric mountain
#

Else u become a PM

spark flint
#

simple regex replacement

ancient nova
#

I don't need that

#

I already wrote my own

proven escarp
#

ok

spark flint
#

ok

proven escarp
#

then use it??

ancient nova
#

I asked for something else

spark flint
ancient nova
lyric mountain
#

They want to limit the amount of printed tags

spark flint
#

google it then

proven escarp
#

did you look at the docs first?

lyric mountain
#

Simple thing, should be the first result on google

proven escarp
#

did you check stackoverflow first?

ancient nova
proven escarp
#

nope

spark flint
#

i know that sounds rude but theres always stuff online to help, we can't spoonfeed ur entire bot kek

lyric mountain
#

js how to get part of array

proven escarp
#

just ask online

#

for god's sake

boreal iron
lyric mountain
boreal iron
#

What’s an array?

lyric mountain
#

There was literally no similar questions for what I was doing

proven escarp
#

sad

lyric mountain
#

Had to take out the big java bible and convert those codes into java

#

My project: "Map a photo as a texture for 3D modeling usage"

#

And had to be realtime

#

On android

proven escarp
#

damn

lyric mountain
#

Many weeks sleeping late learning how to fuckin sobel

#

I think my thesis is still out there somewhere

ancient nova
#

what should I display on the command embed??

lyric mountain
#

Name, description, year, author, studio, tags, episodes, rating, etc

ancient nova
#

how do I convert it

proven escarp
#

this is json

#

not complicated to work with

#

especially if you're using javascript

lyric mountain
#

author and studio will return their names and roles

lyric mountain
ancient nova
#

there is no way to get the name of the studio

ancient nova
ancient nova
lyric mountain
#

because u didn't request them

stark abyss
#
        io.to(data.room).emit("on_room_clients", all_users);

socket io this doesn't trigger to everyone, triggers to everyone but the sender. I am not sure how to send it to everyone, I tried doing broadcast too. According to documentation, I think I am correct so there must be something else that is factoring in but I don't know how to debug it. Any tips on how to debug?

ancient nova
#

there is only 3 options

lyric mountain
#

each of them have their own properties

#

one of those has a name property

stark abyss
#

what is this anilist api ?

lyric mountain
#

yep

lyric mountain
#

since u already have the data at hand

ancient nova
lyric mountain
#

wanna bet?

ancient nova
#

yes

#

do it

#

cause it fucking doesn't

lyric mountain
#

if I win u gonna finish this entire command using only google and docs

#

if u win I'll give u the entire code ready to use

ancient nova
stark abyss
lyric mountain
#

there

#

I won

ancient nova
#

huh

lyric mountain
#

(source: my own graphql structure)

#

it works because it's what my anime command uses

ancient nova
#

whatever

#

it was hidden

#

so annoying

stark abyss
#

check docs

lyric mountain
#

it wasn't hidden, u just didn't search deep enough

#

(proof that it does work -> note the studio name)

ancient nova
#

how the hell do I even list that

#

the json is so badly formatted

sudden geyser
#
studios(isMain: true) {
  nodes {
    name
  }
}

Checkmate. ♟️

lyric mountain
#

I don't think nodes has a name property

ancient nova
#

nevermind don't answer

sudden geyser
#

nodes is just edges -> node

lyric mountain
#

hm, good to know

#

then it CAN be shortened

ancient nova
#
        fetchResult.data.Media.studios.edges.forEach(edge => {
            edge.node.name
        })
#

hope something like this gonna work idk

sudden geyser
#

noop

#

what are you trying to do with that code

ancient nova
#

the source tag is annoying tho

ancient nova
#

too tired to think

lyric mountain
#

always include the source

ancient nova
lyric mountain
#

else ur stealing their work

sudden geyser
#

use .map instead

stark abyss
ancient nova
lyric mountain
#

ever heard of "author attribution"?

sudden geyser
ancient nova
#

cause that looks terrible

stark abyss
ancient nova
#

cause having that in the description makes it look bad

stark abyss
#

¯_(ツ)_/¯

lyric mountain
stark abyss
#

yeah

lyric mountain
#

then just use the data after u broadcast

#

like, pass as a function parameter or whatever

#

u don't really need to "receive" the event

ancient nova
#

I can't get the freaking studios to display

#

I wanna die 😩

stark abyss
#
  useEffect(() => {
    socket.on("on_room_clients", (data)=>{
      changeConnectedUsers(data);
    })

i am not sure how the data is gonna go to the client if i don't do this

stark abyss
ancient nova
#

object object object object object

#

😭

stark abyss
#

console log it to see its properties i guess?

ancient nova
#

no

stark abyss
#

wdym no lol

ancient nova
#

I'm too tired

#

to debug this

dry imp
#

ok

#

hibernate then

ancient nova
#

I shall

#

🤣

stark abyss
#

its not that complicated

ancient nova
#

I know

ancient nova
#

probably would've gotten it already if I didn't have to reboot my entire freaking bot every 1 second cause of small syntax mistakes

eternal osprey
#
const embed6 = new MessageEmbed()
            .setColor(configuration["starter"].embedcolor)
            .setTitle(`⚠️ | We have a winner!`)
            .setDescription(`${user} won this giveaway!\n${configuration["starter"].winmessage}`)
            .addField(`Prize won:`, `${interaction.options.getString('giveaway-prize')}`)
            .setTimestamp()
            .setFooter({text: 'Aster | Giveaway System'})
r1.edit({content: `@everyone`, embeds: [embed6]})```hey guys i am basically editing my sent embed, it has a row component added to it
#

Now i am editing it with r1, but it still has the row component attachted to it

#

how would i remove that

ancient nova
#

@stark abyss don't doubt me

#

my bot literally takes 1 minute to boot

#

and I just made a mistake that cost me 5 minutes of fixing and rebooting

#

anyway I fixed it

stark abyss
#

that doesn't make sense..

ancient nova
#

am I missing anything?

stark abyss
#

just disable auto save

ancient nova
#

wdym auto save

stark abyss
#

idk where exactly you are coding but nodemon can restart server on save

ancient nova
#

I have a reload command, however when there is a syntax error and when I try reloading the command isn't stored in cache anymore because it errors

#

hence I need to reboot my entire bot

stark abyss
#

just make a test bot, and like not host it just have it locally once the command is working upload it to your original bot

ancient nova
#

too much work

proven escarp
#

looking up online for solutions to they're questions is too much work too 🤷‍♂️

wheat mesa
sharp geyser
#

Probably all that regex /s

wheat mesa
#

Not /s might genuinely take some time to compile it but idk

sharp geyser
#

lol

proven escarp
#

like several minutes

sharp geyser
#

That's warranted tbh

#

mimu is a monster

proven escarp
#

😳

ancient nova
#

it did boot quicker, around 10-20 seconds before, but it's slower now that I switched to digital ocean

stark abyss
#

It’s not lotta work

#

It’s a lotta waste of time to wait 5 mins to see your code run…

#

Compared to instant by nodemon

sharp geyser
#

I don't think nodemon will change how fast your code runs

stark abyss
#

No you are misunderstanding me

sharp geyser
#

Well, you said nodemon makes the code run instantly so

#

I am sure I am understanding what you said pretty well

stark abyss
#

It reboots faster

sharp geyser
#

All nodemon is, just a script that keeps your code running and watches for changes

#

It isn't ideal to use outside of a development environment

stark abyss
#

It restarts the server

sharp geyser
#

It isn't meant to be used for a production level application

#

something like pm2 or forever is what you wanna use when you're ready for production

stark abyss
#

I mentioned earlier to create a bot hosted locally

earnest phoenix
#

I have invites If I try to find out someone has joined in through any link I can't find out because it came from the server's custom link and it may cause errors, is there a solution? Because it's the first time I've encountered this problem

sharp geyser
#

Wait what

#

Are you trying to find out the owner of the invites being used?

earnest phoenix
# sharp geyser Wait what

This is completed, but if someone logs in via a custom link, the bot cannot know where it came from

harsh lava
#

Welp! GG

spark flint
#

This change is only on subdomains, like resources.github.com, where GitHub markets products and services to enterprise customers.

#

...

sharp geyser
#

This has no effects either

#

All it does is just personalize ads

#

which boohoo

spark flint
#

its just been blown out of proportion

#

like it means fuck all

sharp geyser
#

a lot of other places do this without even telling you

#

at least github tells ya

spark flint
#

if you don't want to be tracked, shut ur router off and get outside

dry imp
#

omg privacy TE_BatChest i love privacy

sharp geyser
dry imp
#

omg cookies, my privacy 😭

#

god, i love people overreacting about the smallest changes that doesnt impact them

sharp geyser
#

Companies do it all the time without even explicitly telling you

#

Github is doing it WHILE telling you

dry imp
#

if people wanna be private then might aswell not use a social media and be a caveman

floral mist
sharp geyser
#

neither

floral mist
#

wut do u like to use

dry imp
#

py-cord

lyric mountain
#

jda 👌

sharp geyser
#

D#+

lyric mountain
#

Is that a fckin christmas tree sideways?

sharp geyser
#

It is DiscordSharp+

floral mist
#

lmao its a real thing

#

gg

sharp geyser
#

Of course its a real thing?

#

I am literally using it

dry imp
#

ofc misty is using it 🙄

sharp geyser
quartz kindle
#

dpp > *

dry imp
#

stay mad with your ugly indentation 🙄

sharp geyser
floral mist
#

i made first bot discord.py thinking next one ill try js

sharp geyser
#

python is the one that relies on indentation

sharp geyser
#

I regret ever learning JS

floral mist
#

why?

#

no like js?

sharp geyser
#

I find JS really limiting

dry imp
sharp geyser
#

until I make an extra indentation in your code

#

and then your program no longer works

floral mist
dry imp
#

you cant access my beautiful python code misty

sharp geyser
#

I personally see no reason to use js

#

Only benefit I see from it is Angular and React

#

I dislike using it for anything else at this point tbh

#

even than I dont use just js

#

I use a superset

sudden geyser
sharp geyser
sudden geyser
#

also pascal casing for methods

#

crikey!

sudden geyser
sharp geyser
#

No its not

#

the fuck you on about

#

AngularJS died

#

Angular didn't

#

Two different things

#

@round cove just ask panku

#

he uses Angular for RoleBots website iirc

sudden geyser
#

oh that thing

#

like a zombie

sharp geyser
#

AngularJS was the precursor to Angular

ancient nova
#

helo

sharp geyser
#

It was very old

#

Angular brought modern to it

round cove
#

What's up

ancient nova
#

do you need to have perms in a server to fetch roles?

sharp geyser
round cove
#

Lmao

#

Angular be living yo

ancient nova
#

am I gonna get my answer PokerStare

sudden geyser
#

I get all my news about angular from ben awad

#

js community's best critic of everything

ancient nova
#

answer me damn it

sudden geyser
#

try it out and see

sharp geyser
#

there answered

#

whether that answer is correct no idea

#

you never asked for a correct answer

ancient nova
#

well it has to be wrong

civic scroll
ancient nova
#

since I can fetch roles by name and ID in a server my has admin in

#

but I can't do that in a server with no perms

civic scroll
#

what, you can fetch all roles with 0 perms

sudden geyser
#

continue experimenting

ancient nova
civic scroll
#

from member perspective you can read roles

#

so for the bot as a member it can do that as well

#

but only for members it sees

#

iirc

quartz kindle
civic scroll
ancient nova
#

🤔

civic scroll
#

i don't take him seriously

sharp geyser
#

I don't wanna hear it

civic scroll
#

professional or not, all are just personal takes

ancient nova
sharp geyser
#

Im sorry tim

civic scroll
quartz kindle
#

ouch

#

negative infinity

sudden geyser
sharp geyser
#

so

#

why would I know

sudden geyser
#

wait you don't?

ancient nova
sudden geyser
#

thought you said you do

sharp geyser
#

thats Daff

#

not me

ancient nova
#

and I will continue to say that

sudden geyser
#

who be daff

ancient nova
sharp geyser
#

I use it occasionally

civic scroll
quartz kindle
#

dafft punk

sharp geyser
#

when I am doing ML

#

but I don't use it like that

civic scroll
#

it's you who write your code

sharp geyser
#

he wants to know who u are

civic scroll
#

we are simply giving suggestions

quartz kindle
#

sugg my gestion

ancient nova
#

wanted tim to read me code cause I'm bored

#

:IDK:

sharp geyser
#

😳

ancient nova
quartz kindle
#

lmao

civic scroll
#

down bad for tim

sudden geyser
dry imp
ancient nova
#

no idea which one is the newer snippet

sharp geyser
#

You always like this

quartz kindle
#

if you dont know, how are we supposed to know

sharp geyser
#

Want people to rate code that is irrelevant

ancient nova
#

why wouldn't I want people to rate my code

#

it's fun

civic scroll
#

it's hosted on toptal so it must be good righy

sharp geyser
#

Cause

ancient nova
sharp geyser
#

you

#

show

dry imp
#

can anyone rate my python indentation

sharp geyser
#

irrelavent

#

code

sudden geyser
sharp geyser
ancient nova
dry imp
sharp geyser
#

so

civic scroll
# ancient nova it's fun

waste of time since it's no serious problem
at this point just hire a code auditor / quality assurance advisor

ancient nova
#

that was the snippets I wrote earlier todsy

civic scroll
#

or even your ide

sudden geyser
quartz kindle
#

yes, hire your ide

civic scroll
sudden geyser
#

8 spaces is way too much imo

quartz kindle
#

8 space indents

sudden geyser
#

discord.js also uses it

ancient nova
#

can u not as a person take a look at another humans code and just say whether it's good or bad

civic scroll
#

8 spaces

#

💀

#

i at most use 4

ancient nova
#

don't understand what ur problem is

sudden geyser
#

I stick with 2

ancient nova
#

:weirdsip:

quartz kindle
#

github displays 8 by default idk why

#

when the code uses tabs

civic scroll
#

2 is a bit clittered for me so i use 4 but github format did it dirty

wheat mesa
sharp geyser
#

who uses spaces

civic scroll
#

4 is usually a tab

sharp geyser
#

I use tabs

quartz kindle
#

i use tabs

#

yeah size 4 should be default

sudden geyser
#

I press tab which inserts spaces

#

as civilized people do

wheat mesa
#

I use tabs, 4 width

sharp geyser
#

I use 4 tabs

wheat mesa
#

But it pads with semicolons instead of spaces

#

😉

quartz kindle
#

i keep tabs on you

ancient nova
sharp geyser
#

be careful

quartz kindle
#

lies

sharp geyser
#

Not lies

quartz kindle
#

i dont see you

sharp geyser
#

Doesn't mean I am not there

#

You got an attic?

quartz kindle
#

nope

sharp geyser
#

See

#

told you

#

I knew that already

quartz kindle
#

if you were really here youd know that

sharp geyser
#

I did know it

quartz kindle
#

you didnt, so you asked

sudden geyser
quartz kindle
#

:^)

sharp geyser
wheat mesa
sharp geyser
#

wym

#

I said you don't

civic scroll
sharp geyser
quartz kindle
civic scroll
#

chaotic

civic scroll
quartz kindle
sharp geyser
#

I just do

channel.send(
{
  embeds: 
    [

      new MessageEmbed()
        .setTitle("Balls")

    ]
}
)
ancient nova
civic scroll
#

what is an attic

sudden geyser
#

please

#

just stop

#

no one does that for a good reason

quartz kindle
sharp geyser
#

or I don't use builders at all

#

and make the data out myself

ancient nova
civic scroll
sudden geyser
#

Your code is usually better understood separated

sharp geyser
#

I think that works

#

I haven't used djs in a while

civic scroll
#

yeah

sudden geyser
#

Reading

embed.addField(...)

embed.addField(...)

embed.addField(...)

embed.addField(...)

return message.channel.send(...)

Is a lot more understandable than

embed.addField(...); embed.addField(...); embed.addField(...); embed.addField(...); return message.channel.send(...);
civic scroll
#

you can use methods of a class instance or use object constructs

ancient nova
sudden geyser
#

yes it does

ancient nova
#

it looks like that

sudden geyser
#

so it looks like what I displayed

civic scroll
#

at this point just do

embed.addFields([...]);
ancient nova
#

I only inline if ; is short

sudden geyser
#

the ... is just a placeholder

wheat mesa
#

I'm just going to say it

#

your code "style" is terrible and should be looked down upon

#

sorry

quartz kindle
#

ouch

sudden geyser
#

If it's really your kink go with it but just know most people can't tolerate it.

ancient nova
sharp geyser
#

Its alright if it isn't going to be open source

#

whatever you can read is fine

civic scroll
#

just insert a new line
this is not even a bundled code

#

yes that

#

whatever WAH

wheat mesa
#

Not to mention you have a ton of uses of semicolons that are completely unnecessary

sharp geyser
#

but when thinking about open source you can't just think about what is readable to you

ancient nova
wheat mesa
#

no it wont what

dry imp
#

ah yes there we go, the fun part of code review

sharp geyser
wheat mesa
#

that's not how a block works lmfao

ancient nova
civic scroll
#

only the prettier plugin does that post save

wheat mesa
#

js blocks do not end with semicolons, nor does pretty much any c style language in the last 50 years

sharp geyser
#

Voltrex said smth about the v8 engine trying to place them there as best as possible

sudden geyser
#

Like, I can't interpret this as easily.

wheat mesa
#

I'm talking about this shit

civic scroll
#

for block splitting

sharp geyser
#

Idk if he meant in this way though

#

Ah

#

Nvm

ancient nova
sharp geyser
#

Then yea

wheat mesa
#

???????????????????????????????????????

#

no

#

that's not

#

how

#

it work

#

s

sharp geyser
#

I have to trust waffle here

sharp geyser
#

he is making his own language

wheat mesa
#

that's mostly for return statements

proven escarp
#

there is no compiler in js anyway

civic scroll
#

it still works the same way

wheat mesa
#

that's a different story

wheat mesa
#

it's JIT compiled

sharp geyser
proven escarp
#

im fucking dumb

quartz kindle
#

lmao

proven escarp
#

i meant you don't compile the code to machine code

sharp geyser
#

Isn't nearly every language compiled

ancient nova
proven escarp
#

like to a .exe

#

or anything

wheat mesa
#

basically all langs nowadays are either JIT or AOT compiled

civic scroll
#

it compiles to ASM, i have seen it with my own eyes

proven escarp
sharp geyser
#

yea

proven escarp
#

im dum af

wheat mesa
#

There's very few that actually still run on bare interpreters

civic scroll
#

loom

sudden geyser
proven escarp
#

ignore my dumb stuff

#

pls

civic scroll
#

ot DOES compile to assemnly

proven escarp
#

:(

wheat mesa
sudden geyser
#

oh interpreted

civic scroll
#

my hod i can:t type

proven escarp
#

loomi dummi

sharp geyser
#

I will compile all of you to asm

quartz kindle
civic scroll
#

no

proven escarp
sudden geyser
#

nvm

ancient nova
#

I'm going to sleep gn

civic scroll
sudden geyser
#

your code will haunt you in your nightmares

#

and I will suspend your github account

wheat mesa
#

bytecode is sorta an AOT compiled thing but not really because AOT compilation usually refers to asm compilation

quartz kindle
civic scroll
#

what

#

tim please 😭

sharp geyser
wheat mesa
#

cry about it

quartz kindle
sharp geyser
#

I will

#

Also

#

Hows yoyur lang?

#

Any progress?

wheat mesa
#

I haven't worked on it in a bit

sharp geyser
#

or is school stopping it

wheat mesa
#

I have planned it out more though

sharp geyser
#

Thats good

wheat mesa
#

I'm having a HIR phase instead of attempting to go straight from AST -> cranelift JIT

civic scroll
#

i don't even know what it takes to write a language that's fun to write

quartz kindle
#

it takes drugs

wheat mesa
#

esolangs are fun to make because you don't have to care about what other people think of using them

#

you just be as creative as possible

quartz kindle
#

lsd powered lang

sharp geyser
#

BreakfastLib when?

wheat mesa
#

never

sharp geyser
#

damn

#

BreakfastLang never going to have a stdlib

wheat mesa
#

maybe rust FFI but never planning on making an stdlib

quartz kindle
#

tiny breakfast discord

sharp geyser
#

make it a thing

#

please

wheat mesa
#

I mean hey, if I add FFI then you can technically do anything C can

sharp geyser
#

tim using C

quartz kindle
#

add a fifi

sharp geyser
#

I wanna see that

#

tim

#

make a lib in C

#

;)

wheat mesa
#

sounds too complex though

#

for an esolang

quartz kindle
sharp geyser
#

please do

quartz kindle
#

misty.c

sharp geyser
#

I wanna learn C

#

Ima learn Objective-C

wheat mesa
#

Ew

#

Never

quartz kindle
#

learn intercal

#

best lang

sharp geyser
#

Ima learn Fortran

wheat mesa
#

Learn asm for a TI-84 calculator