#development

1 messages · Page 50 of 1

royal portal
#

what is the error

manic crane
#

no error

#

i am trying if the 247 is disabled

#

making the bot leave

#

and if it is enable

#

d

#

then it will be in the vc only

sharp saddle
#
        
    
        await player.destroy();
      } else {
        
        await player.stop();
     }```
#

try ^ @manic crane

manic crane
#

oh

#

damn

#

i forgot about !

sharp saddle
manic crane
#

i tried like

#

if (player.twentyFourSeven)

#

when it didnt work

#

i went for it

#

but thx

rigid maple
#

I'm doing something like paint on the web using canvas, but I don't know how to make an eraser
I can erase normally, but I need to keep the background fixed and have things added to it erased.
when i do eraser it erases everything along with the background
I can make a line with the same color as the background, but it would not be good as a picture can be added to the background.
As you can see in Attach-1, it deletes it together with the background (dark gray oval shape) and I don't want it. (The part that I have enclosed in a dark blue line is the image that appears when I delete it.)
I want it to be; just removing the white lines and not the background.

#

I thought about redrawing the background and putting it on the bottom layer after each eraser use, but that's a very bad idea. 💀

quartz kindle
#

put the background in another canvas under the main canvas

#

or just make the background in css

rigid maple
#

No matter what I do, it creates a new line for me. How can I make it disappear when I convert it to canvas?

#

the black part is the part I use eraser

#

i can make it equal to the background color but it will be distorted when a different image is put

quartz kindle
#

what are you using for the eraser?

#

what canvas function?

rigid maple
#

globalCompositeOperation

#

destination-out

quartz kindle
#

how did you make the gray background?

rigid maple
#

css

quartz kindle
#

weird

#

does clearRect work?

rigid maple
#

Before you said it, I made a box like on canvas and had the edges oval.

rigid maple
#

I don't know how to delete the white lines (while sending discord)

#

in node-canvas

quartz kindle
#

afaik destination-out should be working, i dont know why its painting black instead

#

try with clearRect to see if it still paints black

rigid maple
#

it output black on node-canvas because color code is set to rgba(0,0,0,1.0)

#

There is no problem in the website part of what I am doing, only the node-canvas shows the parts I deleted in black because it's color set to rgba(0,0,0,1.0)

#

so when black and white overlap, i have to crop

#

sorry for my bad english

quartz kindle
#

so the problem is only in node, not in browser?

rigid maple
#

yes

quartz kindle
#

then its possibly an issue with node-canvas

#

check if you're on latest version

#

try to make a very simple/minimal test case to confirm its a bug

rigid maple
#

How can I crop when black lines and white lines overlap in node-canvas?

quartz kindle
#

node-canvas should work exactly the same as browser canvas

#

if something is different, then its a bug

#

and should be reported to the devs

#

so try making a very basic test to confirm

rigid maple
#

actually not so wrong

#

When I use an eraser on the web, it creates a line in the places I delete and deletes it that way.

rigid maple
#

I hope I was able to explain

#

each line has points and color

#

this is the line color created when using the eraser

scarlet kiln
#

Can anyone help me with PRESENCE INTENT?

solemn latch
scarlet kiln
#

My bot one of main command needed it

earnest phoenix
#

If you got declined it probably means you do not need it. Why exactly do you think you need it?

scarlet kiln
earnest phoenix
# scarlet kiln

I do not think that is a reasonable use-case for Discord to give you access to the intent

#

What exactly was the decline reason though? It might've been something else than just the command use case

#

What did they tell you when they declined the request?

#

I'm pretty sure such a command does not go in valid use-cases, at least in the past - maybe got changed

#

They do not give access to the intent to let a bot show how many members are online, because of one command needing it

scarlet kiln
earnest phoenix
#

I kinda had a similar use case back then but got approved for it

scarlet kiln
earnest phoenix
#

Yep, the command is not a valid use-case

earnest phoenix
#

Yeah I suppose that use case no longer meets the criteria, it used to

rigid maple
scarlet kiln
rigid maple
#

Any ideas on how I can do it?

earnest phoenix
solemn latch
scarlet kiln
solemn latch
#

You should get intents when you need them, not just to get them.

scarlet kiln
solemn latch
#

In the future many users won't invite bots with some intents.

For example, I won't invite bots with the message intent, unless it's absolutely needed for the feature I want.

#

By just adding features with the goal of getting intents you're limiting your user base.

solemn latch
#

So yeah, your bot I wouldn't invite into a server I own.

scarlet kiln
#

Thanks for clarification and time...

earnest phoenix
#

Other than that

scarlet kiln
solemn latch
boreal iron
earnest phoenix
#

Well it's also very vague that

#

The bot I'm trying to invite has access to the message content intent

#

I don't see how it cannot read my messages

solemn latch
#

Yikes 👀

boreal iron
#

Probably means it cannot read your (private) messages

earnest phoenix
#

You add it to a server, not to your DMs

boreal iron
#

I’m aware yes but still

earnest phoenix
#

Specify that it means your private messages then

rigid maple
#

there are white lines behind the black lines i want to clip where the black lines and white lines overlap do you have any idea how i can do it?

earnest phoenix
#

Because it can read my messages (sent to the server the bot is being added to)

rigid maple
#

unfortunately i can't make it same as background color because background image may change

surreal sage
#

String e.g "5k" (number suffix, k = thousand) to a solved integer

pearl trail
#

.replace("k", "000") KEKW KEKW

wheat mesa
#

I would probably do something like
Make a map of all the suffixes and their multipliers, i.e "k" => 1000
Advance one character in the string at a time until you encounter something that is not a number anymore
Parse the number from the start of the string to the character before the letter
"get" the multiplier from the map with the letter at the end of the string
Multiply the parsed number with the multiplier

wheat mesa
lament rock
pearl trail
lament rock
#

please don't take that seriously

#

the haha funny was the kekws are formatted like <:name:id>

pearl trail
#

aahhhh 💀💀

compact pier
#

what are rss.xml

quasi depot
#
DiscordAPIError[10062]: Unknown interaction
    at SequentialHandler.runRequest (C:\Users\rudei\Assia\node_modules\@discordjs\rest\dist\lib\handlers\SequentialHandler.cjs:293:15)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async SequentialHandler.queueRequest (C:\Users\rudei\Assia\node_modules\@discordjs\rest\dist\lib\handlers\SequentialHandler.cjs:99:14)
    at async REST.request (C:\Users\rudei\Assia\node_modules\@discordjs\rest\dist\lib\REST.cjs:52:22)
    at async ChatInputCommandInteraction.deferReply (C:\Users\rudei\Assia\node_modules\discord.js\src\structures\interfaces\InteractionResponses.js:68:5)
    at async Object.run (C:\Users\rudei\Assia\src\slashCommands\Music\play.js:24:5)
    at async Object.run (C:\Users\rudei\Assia\src\events\Client\interactionCreate.js:88:17) {
  rawError: { message: 'Unknown interaction', code: 10062 },
  code: 10062,
  status: 404,
  method: 'POST',
  url: 'https://discord.com/api/v10/interactions/1023653625580503140/aW50ZXJhY3Rpb246MTAyMzY1MzYyNTU4MDUwMzE0MDpmakhJTHFkb1FRbkdKdDVWN2lLU0R6Q2VsZzNPSGhKVGF0dVluMGZTbHFYRnBBcXpHdUF3c3NleHNjTW1UaVpCZUhGZDhCSzRHYXd0RFB3ZXdZdk1lbzZ0VHpqczFjbDlpcnMyTGRZRmlNTXFKejRzODZqV0Y1NFp4d1ZVQjQ2Sw/callback',
  requestBody: { files: undefined, json: { type: 5, data: [Object] } }
}
``` Don't really know whats causing the error.
#

nothing wrong with the code.

earnest phoenix
#

Unknown interaction

#

You are probably deleting the interaction when the command is executed

quaint rampart
#

To use:

commandsToArray(client.commands)

// Ouput
[
  { name: '/slashcommand', description: 'This is a slash command' },
  { name: '/slash command', description: 'This is a sub slash command' },
  { name: '/slash group command', description: 'This is a sub command group slash command' }
]

https://sourceb.in/KlDaVGwHOz

#

here u guys go

#

if you want

#

converts all your commands to that output

quasi depot
quaint rampart
lyric mountain
#

ah, cool

wheat mesa
#

Ah wait seems like djs doesn’t require you to do .reply if you already deferred

quasi depot
#

so

lyric mountain
#

I think it'll even error due to double-ack

wheat mesa
#

What’s line 24 of play.js @quasi depot

#

I’m assuming it’s this:

quasi depot
#
await interaction.deferReply({
wheat mesa
#

First off, delete the extra comma after interaction

#

Second, send line 88 of interactionCreate.js

quasi depot
#
player.play();
          return await interaction.editReply({ embeds: [searchresult] });

Line 88, 89.

wheat mesa
#

Of interactionCreate.js, not play.js

quasi depot
#
                await command.run(client, interaction, prefix);
            } catch (error) {
                if (interaction.replied) {
                    await interaction.editReply({
                        content: `An unexcepted error occured.`
                    }).catch(() => { });
                } else {
                    await interaction.reply({
                        ephemeral: true,
                        content: `An unexcepted error occured.`
                    }).catch(() => { });
                }
                console.error(error);
            };
#

and what comma do you want me to delete?

wheat mesa
#

The one after interaction in the run function

#

Or, put an underscore after it, either one works

#

I would prefer an underscore personally since it would match the amount of function arguments you’re passing it, but I don’t know if js fucks up with that or not

quasi depot
#
run: async (client, interaction_) => {
wheat mesa
#

No

#

(client, interaction, _)

quasi depot
#

oh

#
run: async (client, interaction, _) => {
#

there

wheat mesa
#

Then try running it, you might get the same error but generally speaking javascript gets kinda weird when you don’t pass the right amount of arguments to a function

quasi depot
#
DiscordAPIError[40060]: Interaction has already been acknowledged.
    at SequentialHandler.runRequest (C:\Users\rudei\Assia\node_modules\@discordjs\rest\dist\lib\handlers\SequentialHandler.cjs:293:15)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async SequentialHandler.queueRequest (C:\Users\rudei\Assia\node_modules\@discordjs\rest\dist\lib\handlers\SequentialHandler.cjs:99:14)
    at async REST.request (C:\Users\rudei\Assia\node_modules\@discordjs\rest\dist\lib\REST.cjs:52:22)
    at async ChatInputCommandInteraction.deferReply (C:\Users\rudei\Assia\node_modules\discord.js\src\structures\interfaces\InteractionResponses.js:68:5)
    at async Object.run (C:\Users\rudei\Assia\src\slashCommands\Music\play.js:24:5)
    at async Object.run (C:\Users\rudei\Assia\src\events\Client\interactionCreate.js:88:17) {
  rawError: {
    message: 'Interaction has already been acknowledged.',
    code: 40060
  },
  code: 40060,
  status: 400,
  method: 'POST',
  url: 'https://discord.com/api/v10/interactions/1023662634026942494/aW50ZXJhY3Rpb246MTAyMzY2MjYzNDAyNjk0MjQ5NDpTeFFFMFAzUUY5ejdJT1RhS2x2UTJlRWhWc1JxQ0ZKcXlVZXRHUEdUbVAycEtKeDI4eVJVb1FSV1BabWRURFlGa0FUS2FlWVVrbFlJWDNiaXNkWDl2S1JEZThLOEVWTUdVTTIyaHU2NFVBdVJkQ0xEOFBPdlBCcGdkR2dMRkZRZQ/callback',
  requestBody: { files: undefined, json: { type: 5, data: [Object] } }
}
wheat mesa
#

You’ve already replied to an interaction and you’re trying to reply to it again

#

I’m assuming you’ve done something in your interaction handler that responds to it already and you’re trying to respond again

quasi depot
#
DiscordAPIError[10062]: Unknown interaction
    at SequentialHandler.runRequest (C:\Users\rudei\Assia\node_modules\@discordjs\rest\dist\lib\handlers\SequentialHandler.cjs:293:15)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async SequentialHandler.queueRequest (C:\Users\rudei\Assia\node_modules\@discordjs\rest\dist\lib\handlers\SequentialHandler.cjs:99:14)
    at async REST.request (C:\Users\rudei\Assia\node_modules\@discordjs\rest\dist\lib\REST.cjs:52:22)
    at async ChatInputCommandInteraction.deferReply (C:\Users\rudei\Assia\node_modules\discord.js\src\structures\interfaces\InteractionResponses.js:68:5)
    at async Object.run (C:\Users\rudei\Assia\src\slashCommands\Music\play.js:24:5)
    at async Object.run (C:\Users\rudei\Assia\src\events\Client\interactionCreate.js:88:17) {
  rawError: { message: 'Unknown interaction', code: 10062 },
  code: 10062,
  status: 404,
  method: 'POST',
  url: 'https://discord.com/api/v10/interactions/1023663273402441759/aW50ZXJhY3Rpb246MTAyMzY2MzI3MzQwMjQ0MTc1OTo3YVJBOE1mcVh3SW05RGFwWmFoOTNQU3JSdk5rVGNmalpmUHRIQ1NzMHVJcnVqTVdIT1R3YzJieHFQNjVibmZHMGpBNUZLd3JUOG9SYlV0QzVKdmlQYVhPb0pHNDlVT0MwR0c1cWJ0WnpjMlFyR1hqd3dBWGZpeEwxQTUza01BMQ/callback',
  requestBody: { files: undefined, json: { type: 5, data: [Object] } }
}
wheat mesa
#

I don’t know what to tell you, I can’t help you without more code from your interaction handler

#

It’s odd that you’re getting a 404 here so I’m assuming something is severely wrong

hidden gorge
#

well that was a mistake i messed up the array lol

#

i messed up so bad

boreal iron
#

deferring itself isn't a reply

hidden gorge
proven lantern
#

will JS ever have opportunistic in-place mutation optimization or tail call optimization?

wheat mesa
#

Tail call optimization is a pretty basic optimization for an engine like V8

#

I would assume it already has it

proven lantern
#

Voltrex said it was too tricky awhile back

wheat mesa
#

Really? Damn

#

I guess it’s something to do with the nature of JS then

proven lantern
#

i think it requires removing a lot of current language features

#

there's a new programming language being built called rok that has some of those features

lyric mountain
hidden gorge
proven lantern
wheat mesa
#

If you’re making a system like that I would put like @SoAndSo and 500 others got 50 points for having “certain words” in their status!

hidden gorge
#

It says what they had in their status

wheat mesa
#

It’s just an example

hidden gorge
#

that’s what we use

wheat mesa
#

This seems fantastically redundant

hidden gorge
#

?

wheat mesa
#

You’re checking the same conditions twice

hidden gorge
#

scoopy coded that part

#

not me

wheat mesa
#

I don’t think that’s relevant to what I was saying

lyric mountain
#

ye, the if before reaching the if chain does the check already

hidden gorge
#

i tbh don’t know how it works so yeah

wheat mesa
#

Also my god I hate python with all their native functions 😭

#

isinstance(thing, Type)

lyric mountain
#

wait until u discover they dont have switch

wheat mesa
#

What an awful syntax

hidden gorge
#

we kinda modified parts of it so it can interact with our panel

#

it uses pterodactyl api

wheat mesa
#

Man python is so ugly you cannot change my mind

lyric mountain
#

it's a turing-complete yaml

boreal iron
#

it really is

wheat mesa
#

I understand the appeal to a syntax like that but at the same time it’s done so horrifically

boreal iron
#

elif :O

wheat mesa
#

Hopefully @scenic kelp can design a pythonic language that doesn’t suck

#

(And also isn’t slow đŸ„ș)

hidden gorge
#

i seriously need to pay attention more

wheat mesa
#

Wdym

hidden gorge
#

i have the worst attention span so i really need to pay attention more

wheat mesa
#

Take medicine for it if it’s diagnosable/diagnosed

hidden gorge
#

I do 😂

wheat mesa
#

Although I’ve heard bad things about ADHD medicine and how it just turns you into a zombie

lyric mountain
#

it does

wheat mesa
#

Most of it is adderall so I can see why

hidden gorge
#

i have it and it is a lot different for me but it’s also harder with my tourettes so yeah

lyric mountain
#

issue with adhd is mostly from adrenaline that has nowhere to go

#

so u cant focus on anything for too long

hidden gorge
#

nope

proven lantern
#

adderall is an amphetamine

wheat mesa
#

I don’t have adhd thankfully, that would be a pain in the ass combined with all my other conditions lmao

hidden gorge
proven lantern
#

wait

#

wrong word

wheat mesa
#

No it’s an amphetamine

lyric mountain
#

btw TW, yall use what ide (or editor)

hidden gorge
#

we use our own hosting

proven lantern
#

it's the stuff they gave german soldiers during ww2

lyric mountain
#

editor, not host

hidden gorge
#

idk then

lyric mountain
#

iirc jetbrains ides would've told u pretty quickly that the if clause is redundant

hidden gorge
#

we use what came with pterodactyl

lyric mountain
#

oh integrated editor then

hidden gorge
#

yeah

wheat mesa
#

Ouch

lyric mountain
#

I'd suggest making a repo and doing changes locally

#

it's not only safer but also more reliable

hidden gorge
#

i can’t really make site changes or anything i only have access to the admin/developer panel

wheat mesa
#

Plus you have better tooling

#

And it’s faster

slender wagon
#

mongodb is kind of slowing down my nextjs app

slender wagon
#

would self hosted mongodb make things better

hidden gorge
#

but this is what i have access to

proven lantern
lyric mountain
#

I'm quite confused on your team structure, but ok

proven lantern
#

or buy expensive hosting for mongodb

slender wagon
hidden gorge
slender wagon
#

and would postgress be a good option

wheat mesa
#

Postgres is an excellent choice for self hosting

proven lantern
wheat mesa
#

Super fast and lightweight

slender wagon
#

i always wanted to try postgress but i never did

#

💀

wheat mesa
#

Postgres is great

#

10/10 would recommend

hidden gorge
#

this took forever @lyric mountain

proven lantern
hidden gorge
wheat mesa
#

Mongo has a much lighter learning curve but it’s worth it to learn postgres

lyric mountain
#

is ur screen dying?

#

or is the app yellow?

slender wagon
hidden gorge
slender wagon
#

i always turn on the filter after 7pm

#

well it's automatic

lyric mountain
#

daltonism?

#

or eye strain?

slender wagon
#

eitherway it's good to keep it on

hidden gorge
lyric mountain
#

like, warm colors

slender wagon
#

no

#

warm color

#

it goes more like yellow

wheat mesa
#

Warm is usually yellowish orange

slender wagon
#

important is that it gets rid of blue lights

wheat mesa
#

I never understood the blue light thing

slender wagon
#

basically our eye is very sensitive to blue lights

lyric mountain
#

the opposite actually

wheat mesa
#

Is that scientifically proven or is that just some sketchy internet research

lyric mountain
#

eye has very little photoreceptors for color blue

slender wagon
#

no

lyric mountain
#

yes, the eye has little sensitivity to color blue, that's why it's bad to have blue lights on screen

hidden gorge
#

ima update the status code quickly

lyric mountain
#

because your eye doesn't feel how much light it's actually receiving

#

so it strains the entire organ

hidden gorge
#

ok ima put my filter on

#

that’s better

lyric mountain
#

but that filter is kinda weird since the yellow is way too bright, adding more light to the screen

slender wagon
#

no

#

smh

hidden gorge
#

there we go updated the code

lyric mountain
#

how no? the fact the text has bloom shows that

#

unless the screen brightness is set to maximum

#

filters should subtract, not add

hidden gorge
lyric mountain
#

then it's indeed weird

hidden gorge
#

it helps a lot with my headaches

lyric mountain
#

yeah, it's better than pure white

hidden gorge
#

yep

#

can editing a message once every 60 seconds cause a ratelimit?

lyric mountain
#

is that for a single server or many?

hidden gorge
#

single

lyric mountain
#

then it's fine

hidden gorge
#

ok it just uses the api to check if the servers are online

lyric mountain
#

the issue with periodic actions is mostly quantity, instead of frequency

#

as long as it's only for a single server, you'll be fine

hidden gorge
#

i can tell it delays by 4-5 seconds

wheat mesa
#

Tbh I wouldn’t be editing the message every 60 seconds unless there is a change in the status of the servers

lyric mountain
#

that too

wheat mesa
#

Just check the status every 60 seconds and only edit it if it changes from what it was 60 seconds ago

hidden gorge
wheat mesa
#

My point still stands

lyric mountain
#

check if the current embed is exactly the same as the to-be-sent embed

hidden gorge
#

yeah i can’t argue with that @wheat mesa

lyric mountain
#

if it is, don't continue

wheat mesa
#

Since you’re displaying RAM on there for some reason, it’ll probably update every 60 seconds anyways since I doubt that the ram usage isn’t gonna change each minute

hidden gorge
#

it uses this

#

one sec

#

don’t mind the other tabs lol

lyric mountain
#

I don't think that's readable

proven lantern
#

i am using opensearch/elasticsearch for my bot. it's used when people host a game lobby and other people search for the lobby. i'm trying to think of the cheapest way to replicate this functionality without using opensearch which is costing me $50 a month for the cheapest instance type. My idea is to create a DynamoDB table and store info about the hosted games in there sorted by timestamp. Then when someone searches for a game lobby I'd pull 1MB or less of the latest records from the DynamoDB table into memory and then use something like fusejs.io to fuzzy search that data for a lobby that matches. Then i'd show the 1st page of search results and an option to paginate the search through the next 1MB of records

hidden gorge
#

it just uses application/json and gets the info

lyric mountain
wheat mesa
#

I had a feeling the code was gonna be questionable but this is just
 interesting

proven lantern
proven lantern
#

i will check it out

wheat mesa
#

return nodes = d

lyric mountain
#

it's inside a forEach, so it'll just ignore the next line

#

wont quit the loop at all

wheat mesa
#

Ik, but it’s very questionable as to what it actually does by glancing at it

#

Since nodes = d is a statement and not an expression that evaluates to anything

lyric mountain
#

it'll return the value of nodes post-assignment

boreal iron
#

using python is a questionable decision anyways

#

so you shouldnt wonder that much

wheat mesa
#

Something like nodes = d; return; would be less ambiguous

wheat mesa
boreal iron
#

I SEE

#

but he still is using and sharing py code earlier

hidden gorge
#

i do both

wheat mesa
#

Also you could just avoid that if statement altogether by doing let nodes = list[0] assuming list always has a value

lyric mountain
#

sometimes I do things like that to bypass stupid flutter design choices

#

child: aVariable = Container(...)

wheat mesa
#

I’m also like 88% sure that list isn’t declared anywhere in that code

#

It’s probably cut off though

ancient nova
#

hello

boreal iron
hidden gorge
#

what the hell why is it under maintenance

ancient nova
#

I haven't been here ever since my HDD failed đŸ˜€

#

but

#

I am proud to say

#

my new PC is coming this week

hidden gorge
lyric mountain
#

the hdd didn't fail, it was plain murder

boreal iron
ancient nova
#

hoping to resume work on the game soon too

boreal iron
ancient nova
#

using wrong cables can suck sometimes

boreal iron
#

wut

#

how can I fry it

ancient nova
#

heard a guy fried his motherboard by using a prewired cable with his power supply

boreal iron
#

8 pin connector won't fit into a 12 pin slot

ancient nova
#

thought it would apply to your gc as well

ancient nova
wheat mesa
#

heard of this guy that fried his HDD by fucking around with regedit to play GTA 5 on his unsupported hardware, funniest shit I’ve ever seen

boreal iron
#

those cards are fucking huge

ancient nova
#

you know that wasn't the actual reason đŸ˜€

boreal iron
#

god thanks i decided to buy a big tower many years ago

ancient nova
#

oof that reminded me

rigid maple
#

there are white lines behind the black lines i want to clip where the black lines and white lines overlap do you have any idea how i can do it?

ancient nova
#

I bought the PC with a large glass panel case

#

I got sum stick on rgb lights to make it look cool

lyric mountain
#

u mean where they encounter eachother?

boreal iron
#

rgb nonsense... meh

lyric mountain
#

if so, you'll need to do some pixel-level processing

ancient nova
boreal iron
#

thing is under my desk in a corner but still any fucking components must have rgbs today

#

smh

lyric mountain
#

and edge detection

ancient nova
#

also have to replace the stock fans with some rgb ones 😏

slender wagon
#

no

#

don't

#

just

#

no

boreal iron
#

Look at that beast

slender wagon
#

nice

#

is that your new guitar

ancient nova
boreal iron
#

yeah, replace fans with silent fans not rgb bullshit

slender wagon
#

true

ancient nova
#

😂

slender wagon
#

why add more heat

#

to the fans

#

with rgb lighting

lyric mountain
ancient nova
#

that tiny amount of light won't release enough heat to matter

boreal iron
#

even bigger than a diskette rack

#

:P

earnest phoenix
#

"Did you not know that RGB = more FPS? You pleb!"

boreal iron
#

true

wheat mesa
#

This is going to be a very odd question but: Should I teach my gf javascript because I think it would help her understand mathematical functions better

earnest phoenix
#

Absolutely

ancient nova
#

yes

boreal iron
#

no

lyric mountain
#

teach her LaTeX if u want to grasp math

boreal iron
#

keep her dump

#

WITH P

wheat mesa
#

I think functions from programming languages are very very very helpful with illustrating how actual math functions work

lyric mountain
#

plus u can joke that ur gf uses latex

slender wagon
#

if she doesn't know how to do that

#

then yes

rigid maple
slender wagon
#

it's very obvious he is tryna act like he has a gf

#

(he doesn't)

wheat mesa
#

I think people get confused with function syntax like f(x) = x^2

#

They don’t realize that f(x) is actually taking x as an argument

lyric mountain
wheat mesa
#

Just see it as y = x^2

lyric mountain
#

y ^= 2

wheat mesa
#

Lmao

#

That wouldn’t be right 😠

ancient nova
#

đŸ€š

hidden gorge
#

oh yeah custom emojis work

lyric mountain
#

duck operator is always right

earnest phoenix
#

The cat operator

wheat mesa
boreal iron
#

"cat operator" must be a new thing

earnest phoenix
#

And also giraffe operator

hidden gorge
ancient nova
#

bulking sucks 😔

wheat mesa
#

Then don’t bulk

#

Be a skinny fucker like me

ancient nova
#

I have to

boreal iron
#

just to get back to the topic, why did you order a new pc instead of replacing your hdd?

lyric mountain
wheat mesa
#

I was once required to drink multiple protein shakes a day due to being underweight

#

Granted that stems from other medical problems in the first place

ancient nova
#

my i3 was killing the whole setup

earnest phoenix
#

Meanwhile me with an Intel Pentium

boreal iron
#

lol

ancient nova
lyric mountain
#

I cannot gain mass, it's a mystery why because I eat a lot

boreal iron
sick agate
#

i mean it's great i can't Gain mass

wheat mesa
#

I can’t gain weight and it’s bad

ancient nova
#

creatine, BAAs and BCAAs, whey protein, weight gainers, instant EAAs

#

rn I eat 3,200 calories daily

sick agate
#

HOLY

lyric mountain
#

I mean, I like being slim but...my minimum mass threshold could be like 20% higher

ancient nova
#

but it's starting to work my back got wider

#

my delts are getting bigger

earnest phoenix
#

mass-development

sick agate
#

mini [you know the rest]

boreal iron
#

fitness wut? aren't u all just fat 50yo men sitting in a dark room?

ancient nova
#

😳😳

#

exposed 99% people here

earnest phoenix
#

Nah FakE that's just you

boreal iron
sick agate
#

who said i was in a dark room

earnest phoenix
#

Although you got a special thing, you drive 24/7

boreal iron
#

not yet

ancient nova
#

chatting on top.gg discord while driving 200mph on a highway?

#

😏

boreal iron
#

mph

#

eww

sick agate
#

oh yeah we need to be sane

ancient nova
#

🙄

lyric mountain
#

I used to think mph was meters per hour

boreal iron
ancient nova
#

lmaođŸ˜©

sick agate
#

Meph

boreal iron
#

meth per hour?

earnest phoenix
#

Meth/hr

#

Damn it FakE

boreal iron
#

^^

sick agate
#

m/ps

ancient nova
#

meth per second đŸ˜¶

earnest phoenix
#

Cocainer

sick agate
#

Xbox per hour

#

iph

boreal iron
#

meth is what u need to survive rough days in here

sick agate
#

sugar is better

#

or nah

earnest phoenix
boreal iron
#

actually live not far away of a border to a different country which is known to produce and sell that shit here anywhere

lyric mountain
#

mexico?

boreal iron
#

lol

ancient nova
#

brasil?

lyric mountain
#

nono, brasil is cocaine

ancient nova
#

oh yea

wheat mesa
#

The people here look like they’re named Heisenburger bro

ancient nova
#

then what is italy?

boreal iron
#

italy? mafia

ancient nova
#

đŸ€”

#

how about france

boreal iron
#

le baguette

#

oh wait

sick agate
#

turkey?

boreal iron
#

lĂȘ baguettĂš

#

there we go

sick agate
#

Nein

boreal iron
#

panzerfaust

ancient nova
#

germany 👀

boreal iron
#

yikes

ancient nova
#

đŸ˜©

sick agate
boreal iron
#

nein nein

sick agate
#

ja ja ja

ancient nova
#

ha ha ha

earnest phoenix
sick agate
#

qara yanvar

#

did i just kill the chat

boreal iron
#

you got it

ancient nova
#

perfect date 😳â˜ș

earnest phoenix
#

So true đŸ˜€

wheat mesa
#

He’s 17 volt run

#

Gonna catch a case

boreal iron
#

guess voltrux + bae would be some... idk some ugly version of fake

earnest phoenix
boreal iron
#

tf

#

roles now got a white border

#

why's called dark mode then

lyric mountain
#

dark mode with hints of vanilla

boreal iron
#

looks fucking ugly

#

for no reason

sage bobcat
boreal iron
#

yeah ugly as fuck for real

earnest phoenix
#

Apparently it's either for accessibility of some kind or for the customizable profiles for them to "stand out"

boreal iron
#

probably because there're role names that extend one or multiple lines

sage bobcat
boreal iron
#

selfbot detected

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

lyric mountain
#

if your design:

  • looks like shit
  • feels like shit
  • stinks like shit

that's not your design, that's discord

earnest phoenix
#

Jokingly because you sent the same thing twice I suppose

boreal iron
#

let's try if shes a bot

sage bobcat
#

One message removed from a suspended account.

boreal iron
#

looks fucking ugly

#

hmm

sage bobcat
#

One message removed from a suspended account.

boreal iron
#

quotes don't seem to trigger it

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

boreal iron
#

flying pepowot

rigid maple
#

because this is canvas

lyric mountain
#

things aren't THAT easy

#

clip only cuts the canvas in the shape u defined

#

u still need a shape

lyric mountain
#

0.999... = 1

boreal iron
#

much weirder

boreal iron
#

tf is that quality

sage bobcat
#

One message removed from a suspended account.

hidden gorge
#

i’m trying to make it redirect to the page but it won’t work

sage bobcat
#

One message removed from a suspended account.

spark flint
#

remove the window.

hidden gorge
#

I fixed it

spark flint
#

👍

hidden gorge
#

i forgot to add it to the config

hidden gorge
sudden geyser
#

so many buttons

hidden gorge
#

i like testing chat bots lol

tender wind
#

Hello Can't Help Me? I'm add my bot to top.gg and error application.....

tender wind
#

I need help

karmic ravine
#

đŸ„č

wheat mesa
lament rock
#

I somehow managed to post my bot's stats to all bot listing sites and a special stat service first try just by reading cursed docs and shitty implementation code

#

I've been kinda lacking for almost a year when it comes to providing sites with accurate stats, but it's been a lot of work to significantly reduce memory usage from 200-600+MB avg to 120MB avg
You can kinda see my bot's growth here:
https://amanda.moe/to/stats

key highlights are obvious from when I used discord.js to when I modded discord.js to a raw api + slash commands rewrite.

Nothing too popular, but decent for a no named music bot I guess.

atomic sun
#

Need some help on this, my bot was rejected because it triggers the "no manage_role permission" condition even after the permission was granted. I check through the coding flow and am very sure the workflow is fine and it was a legit trigger. Im confused on why will it still trigger when the bot is already granted permission. The workflow from what i understand from our man Dominik is like this:

  1. /new, trigger condition (expected because bot does not have manage role permission)
  2. reviewer granted bot permission
  3. /new, trigger condition (unexpected)
  4. Luca Bot notify "role created by bot" and then "role assigned to bot) after /new from 3.

My workflow has an attempt to create a role first before checking for the "manage_role permission granted". From Luca Bot's response, it seems like my bot does have the permission and can successfully create a role, but for some reason, it still triggers the "no permission granted". Im using 'discord-bitfield-calculator' to get the string array of permissions granted. The condition to trigger the "no permission" is this: (!myPerms.includes('MANAGE_ROLES'))

#

is there any possibility that for some reason, the permissions granted was not registered b4 the interaction? Like granting a permission to a bot, but it takes a minute or two b4 the permission is registered into the bot officially? I can't seem to replicate the problem locally. Appreciate any inputs, mayb i missed out something?

earnest phoenix
#
 const member = client.users.cache.get(config.members.owner)
        if (member) {
            await member.send(`${client.user.tag} Logged in!!`).catch(err => console.log(err))
        }
#

This returning member as underfined

boreal iron
boreal iron
#

Also your var names are kinda inaccurate

#

Why do you call the var member?
It would make sense to call it user

lyric mountain
earnest phoenix
lyric mountain
#

weird then

quartz kindle
#

googol crom

boreal iron
#

java dingus

sharp geyser
#

yea no

#

that aint safari

atomic sun
quartz kindle
#

is that notepad++ lmao

#

what is bitfieldcalculator? is it a third party lib?

#

djs has its own bitfield calculators but they have a different name

quartz kindle
#

you know that you dont really need that right?

#

djs has its own stuff for that

atomic sun
boreal iron
#

alright im back

#

move on Tim

#

my customer

atomic sun
quartz kindle
#

you dont need to convert them any further

atomic sun
#

I see. But still doesnt explain why it doesnt work during review? With my current method, it works when i try it on multiple servers

boreal iron
#

First of all, you misunderstand interactions at all

#

The bot does not require any permissions at all to respond to interactions

#

As long as you respond correctly

atomic sun
#

The bot may respond back in a few messages though, not just one reply

boreal iron
#

That's not a problem, you can send as many follow up - messages as you want to

atomic sun
#

alright, but to manage roles?

boreal iron
#

This however requires permissions of your app as it's not an interaction response

#

interactions.options.getUser(...) does not need to be in a try/catch clause

#

If the option is required it's guaranteed to return an user, if not your var mentionUser[...] will be null/undefined

#

Oh I see, you handle multiple commands in that event

#

Still doesn't change the fact try/catch is not needed

#

optional chaining is the way to go here

#

let mentionUserName = interaction.options.getUser(...)?.username;

#

In your command which manages the roles make sure to add the required permission check

#

As Tim mentioned above

#

if(!interaction.guild.me.permissionsIn(interaction.channel).has("MANAGE_ROLES")) return interaction.reply({ content: "Missing permission: MANAGE_ROLES" });

#

As example

#

This "stops" your code at this point and responds (correctly) to the interaction

atomic sun
#

I see. somewhere inside guild.Set() I have an action that will create a role in the server. From what the reviewer sent back to me, it seems like the permission was given and the action was succesful. What i dont understand is if there is already permission to manage roles, why would the checking returns a "stop"? It works fine all the while during testing

#

or is discord-bitfield-calculator just not compatible in some servers? Doubt thats the case?

boreal iron
#

I dunno about that calculator but it's absolutelly not needed to use it in any way

#

djs provides methods to deal with bitfields

#

such as search permissions by their name (flag) in a given one

#

as well as adding/removing (calculating) a bitfield

#

It could be possible your calculator is broken/outdated/unmaintained etc.

atomic sun
#

I seee, i guess thats most likely the case. ok imma try using the suggested method. Optional chaining too, i had never heard of that. Still new into nodejs haha! Thanks for the advices! @boreal iron @quartz kindle

boreal iron
atomic sun
#

will do thanks!

boreal iron
#

watch out for the java dudes who wanna steal your soul

atomic sun
#

😂 will need to look into that one day

neon leaf
#

whats the best way to check if a number is a multiple of 10 in js?

quartz kindle
blazing cove
#

where do we report bugs related to the site?

boreal iron
neon leaf
lyric mountain
#

lmao just as I joked abt "who tf would use VS for TS" someone appear using VS for JS

neon leaf
#

ok, ive been trying to get a solution but cant, so I want to generate a random number, put the old value of it on a different url /number_last and the new one on /number, it should update every full minute. Currently im using a Linux Crontab and just read the file in nodejs, how can I do it completely in node?

lyric mountain
neon leaf
#

a crontab that moves the old file to a file with the ending _old, echos the random number in the new file and an express app that reads it

#

it does indeed work but not when I expand my express app on multiple servers, cuz the random numbers need to be the same everywhere somehow

#

I can use mongodb if that helps the case

lyric mountain
#

all prngs can have a seed supplied

#

simply use the same seed for all servers

#

but I don't exactly understand what ur trying to achieve

neon leaf
#

I dont know how to explain it really,

lyric mountain
#

is it for some sort of backup?

neon leaf
#

no, for a stock system in a bot

lyric mountain
#

...why are you using files?

neon leaf
#

and currently it just gets the stock prices from my express app

neon leaf
lyric mountain
#

that doesn't answer the question

#

why are u using files for a stock bot?

neon leaf
#

the express app uses the files, the bot uses the express app
and yes, I dont really want to use files but dont know how to do it better

lyric mountain
#

ok but WHAT is inside those file?

neon leaf
#

just the value of the number

lyric mountain
#

and why aren't u using the database for that?

#

a central api works too, simply have all bot instances call it

neon leaf
lyric mountain
#

cron exists as database plugins and language libraries too

neon leaf
#

🧐 🧐

#

I guess I can make a small service that just writes the numbers to the db and just get it from the bot through the db then, right?

lyric mountain
#

yes

neon leaf
#

nice, btw is 1ms good for the db ping for a bot?

lyric mountain
#

it just means it's a local database

neon leaf
#

not really, my local one is 0.05ms

#

the 1ms is from a different server

lyric mountain
#

are all your servers from the same provider?

neon leaf
#

yes

lyric mountain
#

then yes, they're all local

neon leaf
#

I just wanna make sure cuz the last time I used an external db (from free tier mongo though, not selfhosted), half my db queries werent going through

lyric mountain
#

any database that's not local will inherently have a latency

#

usually around 10ms or so

rustic nova
#

local ones are better likely

#

you can have a backup one just incase

#

that is external, but if you're frequently fetching and storing, get a local one

lyric mountain
#

in cases where u need to use an external db cache becomes a must

rustic nova
#

exactly

lyric mountain
#

I'd highly recommend against mongo for a centralized external database tho, the payload is quite big compared to regular sql ones

#

so it adds on response times

rustic nova
#

bot -> local database -> external database for failsafe

lyric mountain
#

the hardest part is making sure local <-> external are synchronized

neon leaf
#

id rather be able to understand my mongo code than copy sql code and dont know how to edit it, I wouldnt think its that much of a difference anyway, like from 0.05ms to 0.03ms

rustic nova
lyric mountain
#

like any other code, people manage to make gross code sometimes which give a bad reputation to it

#

and yes, it makes that difference, especially once you reach high transaction amount/s

neon leaf
quartz kindle
#

the main advantage of sql is that its its own language

#

so if you learn sql, you automatically know how to use every single database that uses sql, in every single programming language ever

stuck dawn
#

why's the content being resized?

quartz kindle
#

resized how?

stuck dawn
#

like the container is decreasing size

pale vessel
#

they look the same to me

stuck dawn
#

if i had like 3 containers

#

it would be bigger

quartz kindle
#

its probably the flexbox auto-resizing them

#

is that page live?

#

or is it localhost?

stuck dawn
#

localhost

quartz kindle
#

play around with the flexbox settings in dev tools

#

if you have a pc

earnest phoenix
stuck dawn
#

yeah

#

@earnest phoenix

earnest phoenix
#

change this to a static size

stuck dawn
#

still the same..

rustic nova
#

parse the mentions in the message, if none, check if theres a snowflake present, use that

#

if there is a mention in it, use that

#

and if neither apply, fail

lyric mountain
#

regex

#

or try parsing it

#

with the same thing u use to make one

#

yes, try parsing it or use regex

#

all uuid libs work in both directions

#

doesn't matter

#

uuid is universal

#

Universally Unique IDentifier

#

all uuid libs will work for any uuid regardless of where it came from

#

the same for uuid regexes

#

count the amount of characters, put - in-between

#

...look, did u search for libs to begin with?

#

then ur forced to use regex

#

but you wont be able to know if it is a valid uuid, only if it looks like an uuid

#

libs have functions to validate it right away, and cmon, it'll be just a couple KBs

#

there's no reason not to use a lib, especially for such a heavily standardized identifier

wheat mesa
#

If you don’t know how to do something and you want someone to give the code to you, literally just use a library for it

#

Otherwise you’re reinventing the wheel and having room for error

lyric mountain
#

uuid

sullen wraith
#

hi can any change my name to juba please

boreal iron
#

I doubt since you’re hoisting

uneven heath
#

I am setting this to any but anyone knows what is the exact type that I should use for row?

sharp geyser
#

What’s the exact issue

#

Though I can say don’t load components like that

#

You’re essentially making a 2D array

#

Or doing undefined

uneven heath
sharp geyser
#

Well idk if discord even accepts undefined as a value which likely it won’t

uneven heath
#

The api actually does

#

Else I won't be able to return undefined

earnest phoenix
#

discord.js filters out undefined properties so that won't even be sent to the API

uneven heath
#

^

sharp geyser
#

Yea

#

You could just do row normally

#

If it’s empty it’ll be undefined anyway

#

Which djs seems to accept anyway

boreal iron
#

Not much of djs benefit

earnest phoenix
#

It's not converted to JSON, discord.js validates values and filters out undefined properties

uneven heath
earnest phoenix
#

It's REST implementation handles it like that

uneven heath
#

It won't accept an array that contain undefined value. Either you supply an array or you declare undefined so that it won't be send to discord

boreal iron
#

My gosh
 still djs

sharp geyser
#

Wait I’m fucking dumb it’s not making a 2D array it’s making an action row

uneven heath
#

lol

#

I just want to know the return value I should use here. Just for type checking measure

boreal iron
#

It’s an array of your action rows holding the component objects

earnest phoenix
#

You could declare the type as ActionRowBuilder | undefined

boreal iron
#

Or better just throw ts away and use something legitimate

sharp geyser
#

Normal js sucks

uneven heath
sharp geyser
#

Ts is the only way I’d ever use js

uneven heath
#

That is what I would have done

#

Except when component doesn't really want to consider [actionrowbuilder] as legitmate entry

sharp geyser
#

I’d help further but I got work

uneven heath
#

Lol it's alright

quartz kindle
sharp geyser
quartz kindle
#

millenial*

#

hmpf

sharp geyser
#

Close enough

boreal iron
quartz kindle
#

lmao

lyric mountain
sharp geyser
#

You could check if row exists and add the component field

lyric mountain
#

Replace that with : []

sharp geyser
#

If not do nothing

#

Or do what haku said

#

Sending an empty array is better

earnest phoenix
lyric mountain
#

Hm, nvm then

#

Ah, wait, it's expecting the row but it's being passed a builder

earnest phoenix
# uneven heath

Could you show us what's the return type of that function you're in?

lyric mountain
#

From what I understood from that error

uneven heath
#

If it is component then

earnest phoenix
#

You're returning an object to the function you're in, so what did you declare the return type as?

uneven heath
#

ReplyMessageOptions

#

That's the return type

earnest phoenix
#

Hmm that should just work then, I wonder if it's just not accepting the builder or something

uneven heath
#

Basically ActionRowBuilder<AnyComponentBuilder>[] is not assignable to either of those declared at component

earnest phoenix
#

I think you're supposed to call it's toJSON() method

uneven heath
earnest phoenix
uneven heath
#

That work?

earnest phoenix
#

Doing that will give the type of the components property to the row variable

uneven heath
#

Like this instead?

earnest phoenix
#

Yeah, although what does the underlined error say?

uneven heath
earnest phoenix
#

But you're assigning an object to it instead

uneven heath
#

Same either way

#

I don't think grouping the Object in an array works either. Just tried, the complier scream a new error

earnest phoenix
# uneven heath Same either way

Well in this case you could unbox the inner type instead of getting it inside an array, for example:

type Unbox<T> =
  T extends Array<infer U>
    ? U
    : T;

let row: Unbox<ReplyMessageOptions['components']>;
#

The error you just witnessed occurs because of the components type being an array instead of providing it's inner type, this can help you get the inner type by unboxing it

uneven heath
#

I will try it later then, thanks

tribal forge
#

any budget discord bot hosting?

lament rock
#

OVH provides some $2 USD/m VMs, but they're pretty bad at a single V Core and 2GB of ram.

#

You'd be better off hosting your bot at YMH (your mom's house)

#

Jk about the VMs being bad. They're what you pay for and they offer some form of DDoS protection

atomic sun
lament rock
#

How Replit and Heroku containerize their VMs are garbage and are prone to noisy neighbors. You'd be better off renting an actual VPS you have "full control" over

atomic sun
#

Im using @discordjs/builders library to make embeds. Is it the way to go? Or is there some functions in djs? (following djs v13 documentation for some reason alws give me error)

lament rock
#

You can use the raw api structure

#

all of the djs deps are just dependency tree bloat

earnest phoenix
#

Then there is discord.js v14, bundling the builders as well, my God

lament rock
#

makes no sense

#

they split it to simplify the library and reduce size and then re-include it

#

quite possibly the hugest brain moves I've seen from oss maintainers

earnest phoenix
#

So many back and forth stuff with discord.js

uneven heath
#

Is there any way for me to disable all of the button/selectMenu once the bot is on restart?

lament rock
#

You'd have to store channel IDs and message IDs somewhere and on startup, loop through all of them and PATCH the message

#

alternatively, ignore the buttons

#

If the worry is a bad ux, Discord's interactions systems in general are bad ux

#

All of my message components are unique and are on a callback basis rather than having a generic listener. I can ignore the buttons because if the buttons don't exist in memory, then nothing to handle the interaction

radiant kraken
radiant kraken
boreal iron
radiant kraken
#

use detritus serenity 😎

#

blazingly fast!!! 🚀 đŸ’Ș

quartz kindle
#

nah, use dpp

#

insanely fast

radiant kraken
lyric mountain
#

this is part of why they removed the free plan

radiant kraken
#

discord bot uptimes drop to 0% sdTroll

lyric mountain
#

replit kinda jumped on the boat glitch refused to accept, but idk how long they'll be able to withstand it

#

good marketing move nonetheless

radiant kraken
#

wdym

lyric mountain
#

glitch refused to be used to host bots, meanwhile replit made tutorials specifically how to be used for bots

#

so a huge part of glitch userbase gone to replit

radiant kraken
#

oof

#

imagine the amount of noisy neighbors in replit by now

#

your bot would die after you closed the replit tab

#

replit users spamming kill 1 and restarting by now

lyric mountain
#

not only that, it's mostly for on-demand services like apis

#

and it excels at that

radiant kraken
#

even then it's really slow

earnest phoenix
#

Error 429 means Too Many Requests, you're spamming the website with requests @leaden ibex

#

Respect the rate limits of the website

leaden ibex
#

Why i am getting this



/home/runner/Pro-Music/node_modules/miniget/dist/index.js:199
                    let err = new Miniget.MinigetError(`Status code: ${res.statusCode}`, res.statusCode);
                              ^

MinigetError [PlayError]: https://www.youtube.com/watch?v=cZSrWoBMSrg
Status code: 429
    at ClientRequest.<anonymous> (/home/runner/Pro-Music/node_modules/miniget/dist/index.js:199:31)
    at Object.onceWrapper (node:events:642:26)
    at ClientRequest.emit (node:events:527:28)
    at HTTPParser.parserOnIncomingClient [as onIncoming] (node:_http_client:631:27)
    at HTTPParser.parserOnHeadersComplete (node:_http_common:128:17)
    at TLSSocket.socketOnData (node:_http_client:494:22)
    at TLSSocket.emit (node:events:527:28)
    at addChunk (node:internal/streams/readable:315:12)
    at readableAddChunk (node:internal/streams/readable:289:9)
    at TLSSocket.Readable.push (node:internal/streams/readable:228:10) {
  statusCode: 429
}
earnest phoenix
#

Read above??

wheat mesa
#

429 is a ratelimit

wheat mesa
#

Stop spamming requests

#

Yeah

leaden ibex
#

oh

#

How bro

leaden ibex
#

The bot in 35+ Server

#

@earnest phoenix

earnest phoenix
#

There is no workaround other than respecting the rate limits

leaden ibex
earnest phoenix
#

If you add a bot note sating that your bot is offline until a specific date we will take note

#

Otherwise it will get reviewed like every like other bot

leaden ibex
#

i will Just

#

keep bot offline for 10 Hours

earnest phoenix
#

Simply add a reviewer note to your bot page saying that

leaden ibex
#

ok

leaden ibex
#

Distube Package bot making too Easy

lyric mountain
# leaden ibex Distube API is Breaking my Bot

just so you know when it inevitably happens, having a music bot that plays audio from youtube (and spotify) will require multiple IPs (for rotation) and constant code maintenance (so you're forced to use a regularly maintained lib)

#

that aside from the base server requirements to maintain a considerably "usable" bot (high bandwidth, very low latency, high memory, etc)

lyric mountain
#

58% cpu with only 38 servers?

slender wagon
#

can i make multiple partitions bootable on a usb

#

anyone has a clue

earnest phoenix
slender wagon
#

well yes

#

like one partition for windows 10 the other for 11

earnest phoenix
#

Hey, can someone explain me what shards doing?

slender wagon
earnest phoenix
slender wagon
earnest phoenix
#

Oh God that thumbnail is so awful

#

These people barely put any effort into those

leaden ibex
#

Making ISO

#

Even in India Computer Have 6 OS in Bootable USB

lyric mountain
leaden ibex
slender wagon
leaden ibex
slender wagon
#

no i mean

#

what

lyric mountain
#

like, instead of having a single connection tanking 100% of the requests, you get 2 connections tanking 50/50

earnest phoenix
lyric mountain
earnest phoenix
lyric mountain
#

but if you're asking then you probably don't need to shard yet

#

since most discord wrappers have auto-shard turned on by default

earnest phoenix
#

So Shards affect the internet connection the most?

lyric mountain
#

kinda, but not as much as you think

#

it mostly affects cpu and memory usage

earnest phoenix
#

Ohh okay

lyric mountain
#

internet stopped being a bottleneck way back in 2008 or so

earnest phoenix
#

Yeah i know hah

#

I saw article where someone's recommending adding shards to bot at 2600 servers

lyric mountain
#

yes but you can let the lib handle by itself until you reach high shard count and need to buy another server

wheat mesa
#

FUCKKKK

#

SAVE ME @lyric mountain

lyric mountain
#

LMAO

wheat mesa
#

I never thought the day of reckoning would come

wheat mesa
#

I have to learn regex for my CS class in Java now 😭

lyric mountain
#

oh you'll be fine, it ain't much harder than doing it in js

wheat mesa
#

I hate regex though

#

In any language

#

I had no idea that this course was going to include regex

#

But I guess it’s a valuable skill to have

lyric mountain
#

it is indeed, and not really hard once u understand how it works

#

TIL groovy has sql-like querying for collections

#

ayo, IJ also has support for webhooks and graphql now

leaden ibex
lyric mountain
#

forked someone's code, and yes, while it works for now you'll soon find out that you cannot maintain the code (aka solve bugs and implement new features)

#

plus, did you check what license the original code had?

wheat mesa
#

Alright one comp sci lesson later and regex is really easy

#

I still don’t like how bad the syntax looks though

lament rock
#

exactly!

#

regex can produce some monstrosities, but it all makes sense as you write it

wheat mesa
#

Good idea at its core, but seems like something without a whole ton of thought at the beginning that kinda just has features thrown on top of it

lament rock
#

Not really. The syntax seems pretty "consistent" in the sense that there are non capturing groups and things like negative and positive lookahead which are groups, but non-capturing

#

Really I think the only down side of regular expressions are how expensive they are to compile and use, but I guess that's a fundamental flaw of string matching in general if you were to write your own recursive function

lyric mountain
#

that's why you need to cache frequently used regexes

lament rock
#

all regexes really

#

And avoiding use of functions which accept strings as search strings like .includes or startsWith

#

idk 100% about startsWith or endsWith since those can be simple loops, but includes def has to compile a regex from a string

lyric mountain
#

I believe those two simply compare the characters (like, raw chars)

#

instead of using regex

wheat mesa
boreal iron
#

tf waffle on 640x480, too?

lyric mountain
#

funny enough, html can indeed be parsed by regex

quartz kindle
#

he comes

boreal iron
#

santa clause?

quartz kindle
#

zalgo

earnest phoenix
lament rock
#

web scraping be whack