#development

1 messages ยท Page 1711 of 1

quaint wasp
#

bot

quartz kindle
#

where

quaint wasp
#

my computer

crimson vapor
#

hi Tim and Erwin

quaint wasp
#

lol

opal plank
#

your own pc? heroku? repl?

quartz kindle
#

vps? your own pc? phone? glitch? heorku?

cosmic forum
#

Ok, thanks!

opal plank
#

frick, tim had more options

quartz kindle
#

lmao

#

if you're hosting at your own home pc, you can chose whatever port you want, BUT, you have to portforward that port in your router

quaint wasp
#

OOOO

#

portforward

#

dang

#

thanks

opal plank
# cosmic forum Ok, thanks!

basically this ```ts
let count = 0;

express.get('./myFancyEndpoint', (req, res) => {
if(req) count++;
})

That simple, then just fetch that count on another endpoint
crimson vapor
#

vps? phone? pc? glitch? repl? heroku? heorku? dedi? rpi? nas? vm on nas? router?

quartz kindle
#

earth? moon? mars? jupiter?

crimson vapor
#

this tbh

#

alright time to install my video card drivers

opal plank
#

express.get('./usage', (req, res) => res(`Api used ${count} times`))```
quaint wasp
#

universe?

crimson vapor
#

ive had this windows instillation for like 5 months

#

drivers are for pussies

opal plank
#

vps? phone? pc? glitch? repl? heroku? heorku? dedi? rpi? nas? vm on nas? router? linux? windows? wii? fridge? brick phones? blackberry? ios? iphone?

crimson vapor
#

modem

#

fuck amd but their drivers are pretty pog

#

look at this install @opal plank

opal plank
#

intel legit died after that

vernal moth
#
client.channels.cache.get(interaction.channel_id).permissionsFor(interaction.member.user.id)```
crimson vapor
#

doesn't intel still have better clock speeds?

opal plank
umbral zealot
#

Well that's definitely the correct code, so if it says null, it probably means that there's no permission overrides available

crimson vapor
#

do you like my logs Erwin?

opal plank
#

i dont like the spacing, but thats good

umbral zealot
#

though tbf at this point you should probably take the convo to discord.gg/djs

crimson vapor
#

ty

#

lemme change something

#

sec

opal plank
#

let run mine rq

vernal moth
quaint wasp
#

DAMN IT

#

umm

crimson vapor
quaint wasp
#

does anyone know

#

how to recover a thing

#

like

#

the F2F codes

#

or turn it off

#

without the code?

#

I kinda lost my phone

#

and cant sign in anywhere

#

litilary

opal plank
crimson vapor
#

You can get your 2FA backups codes

quaint wasp
#

how

crimson vapor
#

Discord settings

quaint wasp
#

o

#

do I need the 2FA code ?

crimson vapor
#

To disable 2FA yes

placid meadow
opal plank
#

pls spare some code for some homeless person bro

opal plank
crimson vapor
#

one sec I got some code for you

quaint wasp
#

dang

#

thanks

#

๐Ÿ™‚

opal plank
#

that hard

crimson vapor
#

no even better

opal plank
crimson vapor
#

I HATE INSTALLING DRIVERS

sudden geyser
#

write your logs to a printer and print them on paper

quaint wasp
#

lol

opal plank
#

print your logs onto a screen on the street's billboard and then attach a camera hooked onto a CVS camera monitor which is pointed at the billboard.
Then you simply use OCR to read whats on the screen and then print it to your terminal

#

that simple

crimson vapor
#

Yes thatโ€™s what I do

#

Well not quite

quaint wasp
#

defenetly.

sudden geyser
#

step 1: be rich

crimson vapor
#

I use the rotating billboard things

opal plank
#

u havent said what you think bout my logs million

crimson vapor
#

The one with triangle things

opal plank
#

how could you

crimson vapor
opal plank
#

im aware mofo

#

but i updated some shit

crimson vapor
#

Oh?

opal plank
crimson vapor
#

ok I have returned

opal plank
#

MILLION

#

oops caps

#

try clicking on my join server buytton

#

on my status

crimson vapor
#

redirects me to chrome then to discord stable

opal plank
#

but does it actually direct you to the server?

crimson vapor
#

mhm

opal plank
#

okay good

crimson vapor
#

not on development tho

#

on stable

opal plank
#

yesterday someone was saying ti didnt work

crimson vapor
#

shame

opal plank
#

here

#

i wonder if development/canary isnt redicrecting it

crimson vapor
#

likely

opal plank
#

development is just canary with a fancy name

crimson vapor
#

wait no

#

im on development

#

ill try on stable

opal plank
#

development IS canary

crimson vapor
#

worked

opal plank
#

you just look fancy cuz its black icon

crimson vapor
#

it opened a chrome tab

#

and redirected me to stable

opal plank
#

meh as long as it actually redirects somehow it should be fine

crimson vapor
#

don't worry about the 2 different discords

opal plank
#

i have the same, not like i can bitch about it

crimson vapor
#

on 2 different monitors?

opal plank
#

got ptb, canary and development installed

#

yes, and one on chrome too

#

on chrome i have my alt

crimson vapor
#

I don't have ptb

opal plank
#

here i got my pmain on ptb

crimson vapor
#

man

opal plank
#

and i got canary on my spam acc

crimson vapor
#

ive got

#

a different solution

opal plank
#

having branches for testing is good

#

specially playing with the SDK

#

actually

#

i think its recommended to dot hat

#

yup

crimson vapor
#

canary is supposed to be my alt that owns my bot and server

#

but discord logs me out

opal plank
#

smells like tos stuff

crimson vapor
#

idk wym

opal plank
#

why wouldnt you want to link your main acc to your bots?

crimson vapor
#

ah that

opal plank
crimson vapor
#

saferโ„ข๏ธ

opal plank
#

hmmmmm

crimson vapor
#

remember the shit they pulled with nsfw servers a while ago

#

I also know about someone who almost got their acc deleted due to a "virus"

#

like he sent one by accident

tardy lion
#

A

crimson vapor
#

@opal plank teach me detritus

opal plank
crimson vapor
#

ynot

#

I have some time today and tomorrow

opal plank
#

i mean i guess

#

i cant show this repo publically but let me call u

crimson vapor
#

ok

slim umbra
#

just look at nsb

lyric mountain
#

Erwin has never been so happy

cosmic forum
#

Anyone here got a bunch of free time and is willing to help manually input data into a json file for an api? ๐Ÿ˜…

tacit sequoia
#

Detritus looks cool, just need to test it out some more

earnest phoenix
#

i am trying to make an error handler but this says "commands has no attribute to AttributeError"
how can i fix this?

dusky sundial
#

That's because AttributeError is native Python, not part of the commands module

earnest phoenix
#

ohh

#

so what would i use as the error?

dusky sundial
#

just AttributeError

#

remove the commands.

earnest phoenix
#

isinstance(error, AttributeError):
or just
isinstance(AttributeError):

lament rock
#

Couldn't help but notice; checking if something doesn't have a send accessor seems like faulty logic rather than efficient handling. Errors which are in your control shouldn't have to be handled if you can logically make things graceful

dusky sundial
#

Yeah, I'm not sure about that error handler

earnest phoenix
#

i don't have experience with error handlers

dusky sundial
#

Well, why do you have it?

lament rock
#

The errors emitted which are a result of your own logic are there to help you improve your logical abilities

earnest phoenix
dusky sundial
#

Exactly, that error would only happen if you did something wrong in your code

earnest phoenix
#

yea..

dusky sundial
#

Just because you remove the stacktrace doesn't mean the error won't happen :)

#

An error handler should usually be used to help users, like if your command needs a number but a user inputs a character, you should have something that tells the user they did something wrong, rather than just printing an error in the console

earnest phoenix
#

this is my code, i am trying to make this an announcement command that will send to all the servers my bot is in.
is it possible that the bot will choose one channel from each server's channels and send it there?

fierce ether
#

can you edit a description of an embed once built?

earnest phoenix
#

from the code, yes

fierce ether
#

how?

earnest phoenix
#

you just change whatever you had and run it again

fierce ether
#

test = embed.description.slice(mention.length + 1)

#

then send test is only the description value?

earnest phoenix
#

your using python, right?

fierce ether
#

no but go ahead i can translate

earnest phoenix
#

i know basically nothing abt js ๐Ÿ˜…

#

or any others

fierce ether
#

oh ok

earnest phoenix
#

im srry

fierce ether
earnest phoenix
#

oh thx

solid bane
#

Hey urmm probably just an easy solution but how do you react to a message with number emojis ๐Ÿ˜… Whenever I do \1๏ธโƒฃ Literally doesn't do anything

dusky sundial
fierce ether
solid bane
#

Plus yea you can edit a embed description once it is built.

#

You do message.embed[0].description

fierce ether
dusky sundial
#

I don't use js, but I would guess both would work

solid bane
#

No No No you can retrieve the data from the Embed and edit that message.

fierce ether
#

so if the embed is defined as message, it would be message[0].description = 'text'

#

correct?

solid bane
#

First line retrieves the Embed Title.

#

Second Line gets the Embed (and turns it into an array based on each new line)

pale vessel
#

Uh

solid bane
#

Because I only need to edit one specific line in my Embed and then I edit that message.

fierce ether
#

message returns

#

as its a wrapper and message is defined as the embed

pale vessel
#
const sentMessage = await channel.send(embed);
sentMessage.embeds[0].description = newDescription;
sentMessage.edit({ embed: sentMessage.embeds[0] });```That simple
solid bane
#

^ There

#

That is all you need.

fierce ether
#

yeh not as simple as that for me but thx

solid bane
#

๐Ÿ‘€

#

What are you looking at doing

#

I can quickly hop into a VC. Maybe I can help

copper cradle
#

don't ping random people

idle horizon
#

Does anyone have experience sending images generated by pillow(PIL) in a discord channel via bot?

pale vessel
#

They could be lurking right now

quaint wasp
#

what does this mean?

#

Error: listen EADDRINUSE: address already in use :::19132

#

I am trying to fix it

#

but cant

idle horizon
#

how do i send images without saving a file to disk? right now i use image.save('filename') w/ PIL.Image class and it works but obv. it would be better to not save to disk every time i send a copy of the game board image

quaint wasp
#

My code for the line is this

#

const dbl = new DBL(apiToken, { webhookPort: 19132, webhookAuth: 'BTSsucks' });

crimson vapor
#

Isnโ€™t 19132 for bedrock servers?

crimson vapor
quaint wasp
#

So I need to make new portforwarding?

quaint wasp
#

answer please....

crimson vapor
#

If you host a minecraft server, yes it matters

#

You could use something like 8008

quaint wasp
#

why that tho

#

I am using 19175 now..

#

alr thanks anyways.

#

Well now its not responding at all when stats are posted...

#

Well its not even posting em..

earnest phoenix
#
| Error: The module '/root/bharat-v3/node_modules/canvas/build/Release/canvas.node'
3|bharat   | was compiled against a different Node.js version using
3|bharat   | NODE_MODULE_VERSION 83. This version of Node.js requires
3|bharat   | NODE_MODULE_VERSION 88. Please try re-compiling or re-installing
3|bharat   | the module (for instance, using `npm rebuild` or `npm install`).
3|bharat   |     at Object.Module._extensions..node (node:internal/modules/cjs/loader:1151:18)
3|bharat   |     at Module.load (node:internal/modules/cjs/loader:972:32)
3|bharat   |     at Function.Module._load (node:internal/modules/cjs/loader:813:14)
3|bharat   |     at Module.require (node:internal/modules/cjs/loader:996:19)
3|bharat   |     at Module.Hook._require.Module.require (/usr/local/lib/node_modules/pm2/node_modules/require-in-the-middle/index.js:80:39)
3|bharat   |     at require (node:internal/modules/cjs/helpers:92:18)
3|bharat   |     at Object.<anonymous> (/root/bharat-v3/node_modules/canvas/lib/bindings.js:3:18)
3|bharat   |     at Module._compile (node:internal/modules/cjs/loader:1092:14)
3|bharat   |     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1121:10)
3|bharat   |     at Module.load (node:internal/modules/cjs/loader:972:32) {
3|bharat   |   code: 'ERR_DLOPEN_FAILED'
3|bharat   | }
#

๐Ÿ™„

pale vessel
#

๐Ÿ™„

earnest phoenix
#

I have node-:15.12.0

pale vessel
#

did you recently update?

earnest phoenix
#

What to do

#

Nah it's my old project ๐Ÿ™„

pale vessel
#

try npm rebuild

earnest phoenix
#

Tried it today after long ago

#

Done

#

Nothing happening

pale vessel
#

all right delete your node_modules folder and run npm i

#

if that still doesn't work, try downgrading to v14 and repeat

earnest phoenix
#

okay

delicate shore
#

I want to make an AI powered chatbot in javascript
What is the best library to work with for ml

lusty quest
#

and what i can say for Running Tensowflow now for a few Months:
a singlecore VPS with slow Clock speed will not be fast enough for it

delicate shore
#

ok

marble juniper
#

yes

#

I suggest having a vps with high cpu clock speeds @delicate shore

#

lol

#

and at least not single core

#

I run my image ai on a dedicated server

#

has about 4ghz and 8 cores

#

You don't really neeed that much power for a text ai

#

but mine is an image one which is why it takes up more perfomance than a text ai

lusty quest
#

i have mine also running on a 6 Core Dedi with fast speeds, sure its text based but ive tryed to run it on a 10$ DigitalOcean Droplet, took a hot minute to make the Classification with Tensorflow also the CPU Usage spiked to 100%, Causing also the Resource Alerts ive set to trigger all the time

#

also Digital Ocean Droplet for CPU Optimized stuff cost like 40$/Month

marble juniper
#

node.js runs single threaded generally unless you code it like explicitly to make use of multiple threads (such as the worker_threads module)

lusty quest
#

and for 40$/Month its already better to get a Dedi with stuff like a ryzen 3600

marble juniper
#

which is why I suggest having high cpu speed

lusty quest
#

yea i have my AI running with Worker Threads and loadbalancing

marble juniper
#

with 40$ a month you could already get a dedicated server for that

#

lol

lusty quest
#

i know

#

this is why ive got one

#

sure its a bit more than 40$ But i wanted also the ECC RAM upgrade

marble juniper
#

nah just saying in response to what u said with the cpu droplet thing

#

anyways having high clock speed is recommended anyways

#

even tensorflow will print it to the console if the cpu clock speed is low

#

such as 2.4 ghz

#

lol

#

also tensorflow has a seperate package for nodejs just so you know @delicate shore the main one is meant for the browser lol

earnest phoenix
#
6|bharat   | Require stack:
6|bharat   | - /root/bharat-v3/bharat.js
6|bharat   |     at Function.Module._resolveFilename (node:internal/modules/cjs/loader:924:15)
6|bharat   |     at Module.Hook._require.Module.require (/usr/local/lib/node_modules/pm2/node_modules/require-in-the-middle/index.js:61:29)
6|bharat   |     at require (node:internal/modules/cjs/helpers:92:18)
6|bharat   |     at Object.<anonymous> (/root/bharat-v3/bharat.js:1:45)
6|bharat   |     at Module._compile (node:internal/modules/cjs/loader:1092:14)
6|bharat   |     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1121:10)
6|bharat   |     at Module.load (node:internal/modules/cjs/loader:972:32)
6|bharat   |     at Function.Module._load (node:internal/modules/cjs/loader:813:14)
6|bharat   |     at Object.<anonymous> (/usr/local/lib/node_modules/pm2/lib/ProcessContainerFork.js:33:23)
6|bharat   |     at Module._compile (node:internal/modules/cjs/loader:1092:14) {6|bharat   |   code: 'MODULE_NOT_FOUND',
6|bharat   |   requireStack: [ '/root/bharat-v3/bharat.js' ]
6|bharat   | }
#

I have bharat.js file๐Ÿ™„

round cove
#

Hey guys, curious if anyone out here has experience with mongo+docker. I've got a bot in one container and my mongodb in it's own container which is supplied by docker. Whenever I restore the data dumps into the container it dumps fine into the test db but I can never get it to restore to any other db I want. Any ideas? The error above is before of it trying to place the same into test so there's "duplicates"

earnest phoenix
#

Still it

outer niche
#

I know there is a web hook section of top.gg am I able to use a Discord pre-built webhook?

marble juniper
#

discord Webhooks wont work

outer niche
#

๐Ÿ‘€ I see that's a lot of work though

round vault
#

How to see that how much my bot is near to the approval?

#

Ok

lusty quest
round vault
#

Will the Luca bot will dm me automatically?

#

Ok

knotty obsidian
#

How can I get the time of when an user left? (java jda 4.2.1)

marble juniper
knotty zodiac
#

discord.errors.HTTPException: 429 Too Many Requests (error code: 0): You are being blocked from accessing our API temporarily due to exceeding our rate limits frequently. Please read our docs at https://discord.com/developers/docs/topics/rate-limits to prevent this moving forward.
๎บง does anyone know what i have to do or do i just wait

Discord Developer Portal

Integrate your service with Discord โ€” whether it's a bot or a game or whatever your wildest imagination can come up with.

earnest phoenix
#

There's nothing you can do other than waiting

knotty zodiac
#

do u know how long?

#

because my bot is on top.gg and i dont want them to take it off because it is offline

earnest phoenix
#

It depends on what ratelimit you exceeded through the API

#

And they're dynamic, so we don't know

knotty zodiac
#

ok

#

429 responses are avoided by inspecting the rate limit headers documented above and by not making requests on exhausted buckets until after they have reset this was the one

earnest phoenix
#

That doesn't tell which ratelimit you exceeded, it probably gave you a URL pointing towards the endpoint you were trying to make a request to

knotty zodiac
#

could it be because people were using invalid commands

#

?

earnest phoenix
#

If not, the library you're using probably has a ratelimit event which you can listen to

knotty zodiac
earnest phoenix
knotty zodiac
#

oh ok

knotty obsidian
#

a guild

lusty quest
#

you could listen to the memberdeleted event or how its called in jda and check the current time

chilly tree
#

Can someone help me with JavaScript?

marble juniper
long crow
#

provide the code, issue you have, what the intended behaviour and what have you tried. Then maybe someone can help you

earnest phoenix
#

guys

#

okay i found the error

woeful pike
vernal moth
#

Does anyone know why I don't exist in guild.members.cache collection?

opal plank
umbral zealot
#

If you're not cached, just fetch

opal plank
#

or that

umbral zealot
#

await guild.members.fetch("some id")

vernal moth
#

good morning. and yes i haven't solved the yesterday issue

opal plank
#

you can do fetch()
enable intents
or you can also request every chunk_member from discord and cache everything on startup after identify

#

i think d.js does that by default iirc tho

pale vessel
#

Add await guild.members.fetch() on the top of your code if you want to cache all members

vernal moth
#

wait a second

#

members.cache.fetch is not a function :/

opal plank
#

show code

vernal moth
#

hang on

umbral zealot
#

members.cache.fetch is indeed not a function

opal plank
#

nono

#

not cache ^^

#

just members.fetch()

umbral zealot
#

But Erwin is wrong. DO NOT cache all members pointlessly

#

You don't need it

#

just fetch one member when you need them

vernal moth
#

yeah

umbral zealot
#

await guild.members.fetch("some id") is fine

opal plank
#

d.js does that by default tho

umbral zealot
#

No, it doesn't

opal plank
#

it does?

umbral zealot
#

d.js does not autofetch missing uncached members.

past dove
#

Hi, can anyone help me please. I dont know what i have to do its working on my own computer but not on cloud vps

umbral zealot
opal plank
#

nvm it is false by default

vernal moth
#
let DaGuild = client.guilds.cache.get(interaction.guild_id)
let DaMember = await DaGuild.members.cache.fetch(interaction.member.user.id)
console.log(DaMember);```
opal plank
#

i could've sworn they did it by default

pale vessel
#

no they don't

opal plank
pale vessel
#

in fact they disabled it

past dove
opal plank
#

now, yes

pale vessel
#

That's removed in master

opal plank
#

but im certain they did cache chunks on startup for members

umbral zealot
#

d.js hasn't auto-fetched all members by default since before my time starting to use it

#

you've always had to fetch members that weren't cached.

umbral zealot
umbral zealot
vernal moth
#

wait

#

WAIT

waxen bough
#

how about guild.member(user)

umbral zealot
#

no

#

their problem is the member isn't fetched

vernal moth
umbral zealot
eternal osprey
#
 const vip = await guild.roles.create({
        data: {
          name: 'MB10',
          color: 'BLUE',
        },
        reason: 'role for the game attenders',
      })```cannot read property roles of undefined??
#

guild is already defined

umbral zealot
#

it might be a variable that's been declared, but its value is undefined

vernal moth
past dove
#

same problem

vernal moth
#

and @opal plank you too :)

umbral zealot
# past dove I updated but nothing changed.

Then it clearly didn't update correctly, that problem was caused by stage channels being added. It 100% broke discord.js v11 which is no longer useable, and requires discord.js 12.5.3 and higher

waxen bough
umbral zealot
eternal osprey
umbral zealot
#

Then yes definitely that ID is not a proper guild ID

eternal osprey
#

huh

#

just right click on a server right > copy id

#

734123033782124575 this is what it returns

umbral zealot
#

ok well, either you're not doing it correctly, or this isn't actually in the message event.

#

show more code

#

and try to use codeblocks not images, it's easier to read and help.

eternal osprey
#

owh no my guild is defined outside the message event

#

outside any event

umbral zealot
#

There ya go.

eternal osprey
#

it's just at the top of my code

umbral zealot
#

won't work, it needs to be inside an event.

eternal osprey
#

aha

earnest phoenix
#

h

#

so if the api doesn't include stats.BedWars.gamemodes.solo.wins, it would just return 0

umbral zealot
#

What code do you have now that we can help you with?

earnest phoenix
opal plank
#

@umbral zealot yeah my bad, its indeed set to false by default . How did it used to cache them then if its not lazily cached?

umbral zealot
earnest phoenix
#
    let solowins = player.stats.BedWars.gamemodes.solo.wins;

          .addField("Wins", `${solowins.toLocaleString()}`, true)
#

main code ^

umbral zealot
earnest phoenix
#

so as an example

#

if a player doesn't have any wins

opal plank
#

ah that explains it

earnest phoenix
#

that part of the api isn't there

#

but if they have one

#

it would return a digit

#

aka 153 wins

#

so i want it to return "0" if player.stats.BedWars.gamemodes.solo.wins doesn't exist

eternal osprey
#

how do i deny read messages of @everyone ?

umbral zealot
earnest phoenix
#

it would return this error if the player doesn't have a win

#

TypeError: Cannot read property 'toLocaleString' of undefined

umbral zealot
#

(solowins || 0).toLocaleString()

earnest phoenix
#

okay let me try

#

thank you

#

<3

past dove
#

@umbral zealot This mean's i have to make the bot one more time ?

umbral zealot
#

That looks like you still had v11 code running

#

and you need to update it all

earnest phoenix
#

How Can I Remove Other Owners Of Bot From Top.gg

umbral zealot
earnest phoenix
#

k

eternal osprey
#

how to i deny @everyone to check a certain channel?

earnest phoenix
#

i have another question, if i had this digit 2342.23154 but i only wanted it to have 2 decimal points, but also have the comma for the thousands, what would i need to use?

#

my current one is ${test.toLocaleString()}

#

(test is the number)

#

but it returns a 3 decimal place

umbral zealot
#

toFloat(2)

#

I Think

umbral zealot
eternal osprey
#

but how do i get the @everyone role then

umbral zealot
#

The everyone role has the same ID as your guild

#

so just use the guild ID

eternal osprey
#

owwh okay

earnest phoenix
#

TypeError: (solofinalkd || 0).toFloat is not a function

#

f

#

i added the (2) at the end

umbral zealot
#

oh sorry not tofloat

#

toFixed

#

gotta learn to use the google, bruh.

earnest phoenix
#

worked but didn't add the comma for the thousands

#

i searched, but it would always just return 2 decimal points but not the comma

#

lmao

umbral zealot
#

Maybe use both these things, chained ๐Ÿ˜‰

earnest phoenix
#

tried

#

${test.toLocaleString().toFixed(2)}

#

or would i have to do it like

#

${((test || 0).toFixed(2)).toLocaleString()}

umbral zealot
#

means you didn't set your local by default

#

so you have to specify it

earnest phoenix
#

that didn't work

#

f

#

whatcha mean?

umbral zealot
#

I mean, you're using toLocaleString, how does javascript know which locale you want

earnest phoenix
#

it works for other values, just this

past dove
#

@umbral zealot Will work this if i dont want to replace it at all ?


let embed = new RichEmbed().setTitle("Works the same");````
umbral zealot
#

You have a lot of work to do, a lot of changes, so you need to take the time to read through and understand all these changes.

earnest phoenix
#

js should know the locale, i already did that, just the part where i'm not sure how to chain those two together

eternal osprey
#

Invalid bitfield flag or number. uhhhm:

 const channel1 =message.guild.channels.create('MINIBOSS MATCH', {
  type: 'text',
  permissionOverwrites: [
    {
      id: vip.id,
      allow: ['READ_MESSAGES']
    }, {
      id: message.guild.roles.everyone, 
      deny: ['READ_MESSAGES']
    }
  ]
});```
#

what am i doing wrong?

umbral zealot
earnest phoenix
#

huh?

#

and how would the triple conversion function?

#

getting the number, doing the toLocaleString, then putting it in the final embed with toFixed?

umbral zealot
earnest phoenix
#

so do i do it the exact same way?

umbral zealot
earnest phoenix
#

${(test.tofixed(2)).toLocaleString()}

#

like this?

umbral zealot
#

yeah try it

earnest phoenix
#

okay

eternal osprey
umbral zealot
#

no I mean instead of id: message.guild.roles.everyone,

#

just use the guild id directly

eternal osprey
#

owh

#

okay sure

earnest phoenix
#

evie

#

${((test || 0).tofixed(2)).toLocaleString()}

#

i'd have to use this?

#

for the or function

umbral zealot
#

it's time to start trying things and figuring things out instead of asking me to handhold you, my friend.

earnest phoenix
#

right

umbral zealot
#

you have all the pieces, you can figure it out.

earnest phoenix
#

ty

umbral zealot
eternal osprey
eternal osprey
earnest phoenix
#

err, sorry for asking again, but after doing what you told me, the whole command just stopped functioning

#

oh, returned an error

#

TypeError: (test || 0).tofixed is not a function

#

;-;

waxen bough
#

toFixed()

#

camelCase

earnest phoenix
#

wait

#

shit

#

really just proves how idiotic i am sometimes lmao

#

still doesn't work aaaa

#

not the camelCase part

#

something else

#
${(test.toFixed(2)).toLocaleString()}
#

lmao

#

still doesn't add commas

#

am i stupid or am i stupid Sadge

waxen bough
#

try putting en_US or en-us im not sure

#

on toLocaleString('en_US')

earnest phoenix
#

changing a number

pale vessel
#

Number(test.toFixed(2)).toLocaleString()?

earnest phoenix
#

not that

#

test is the number

pale vessel
#

toLocaleString() a string doesn't do anything

#

toFixed() returns a string

earnest phoenix
#

so what would we put then?

#

if that returns a string then the .toLocaleString is trying to get test, what would we do?

waxen bough
pale vessel
earnest phoenix
#

what would Number be?

pale vessel
#

...the Number constructor?

earnest phoenix
#

because ${test} is the var with the number

pale vessel
#

๐Ÿ˜ฉ

waxen bough
#

oh yes try putting Number(test.toFixed(2))

pale vessel
#

number.toFixed() returns a string

#

It doesn't matter if number is a number or not

#

string.toLocaleString() will return the same string

eternal osprey
#

is there a certain way to have a reaction collector without a time limit?

pale vessel
#

Yes, but why?

eternal osprey
#

as users can determine whenever they want to close the channel

#

so no time limit wanted

#
const collector = message.createReactionCollector(filter, { time: 15000 });``` like that time indication is not really wanted in my code
pale vessel
#

You'd want to use the messageReactionAdd event since collectors die after restart

earnest phoenix
#

yeah I don't understand what's not working on my code

#

like I don't get it

eternal osprey
#

okay so that's a cool event, but is it possible to put that event within my message event?

pale vessel
#

What do you mean?

waxen bough
eternal osprey
pale vessel
#

Yes

eternal osprey
#

Is it possible to put this event inside of my message event?

pale vessel
#

Why? It's an entirely different event

eternal osprey
#

okay yeah nvm

waxen bough
earnest phoenix
#

okay

waxen bough
#

just replace the random numbers with the test variable don't change *100)/100

earnest phoenix
#

wait

eternal osprey
#

but how do i make the reaction event work on only 1 specific message defined with the variable message1

earnest phoenix
#

oh, thank you for whoever helped

#

i would've never guessed this :P

feral aspen
#

Question.

#
const object = { name: "HamoodiHajjiri" };
#

If I try finding a property in this object called age and there was no property.

#

What does it return?

#

undefined?

pale vessel
#

Answer.

#

Yes.

feral aspen
#

If I want to make an if statement that checks for this, do I simply do if (!object.age) return;

pale vessel
#

Yes, but be careful with numbers

#

If the property's value is 0, it will also return true

#

It's better to use if (!("age" in object)) return;

#

or if (obj.age === undefined) return;

feral aspen
pale vessel
#

You don't need to do that every time, just for properties that potentially have 0 or false as value

feral aspen
#

.. but sometimes that property doesn't exist at all, so?

pale vessel
#

"property" in object returns a boolean

#

Keep in mind that if you put "toString", it will also return true. If you want to purely check for the object's properties, use obj.hasOwnProperty("prop")

feral aspen
pale vessel
#

For instance, "toString" in obj returns true while obj.hasOwnProperty("toString") returns false

eternal osprey
#

okay now i am getting confused. js const channel1 = message.guild.channels.cache.find(c => c.name === 'miniboss-match1') let s = await channel1.send('**The match will begin shortly! Please react with :skullemoji: to accept the battle!**' + "<@"+`${vip.id}`+">")so why is this returning: TypeError: Cannot read property 'send' of undefined

waxen bough
#

channel1: Discord.GuildChannel|undefined

eternal osprey
#

okay let me log it

#

one sec

eternal osprey
waxen bough
#

does your guild have channel named miniboss-match1?

eternal osprey
#

yeah

#

i am creating it

#

message.guild.channels.create('MINIBOSS MATCH1', {

#

this translates to miniboss-match1

waxen bough
#

ohh

waxen bough
pale vessel
#

Show your code

eternal osprey
#

yeah under the same command and scope

#

okay let me bin it

#

line 39 is where the channel1 is defined

pale vessel
#

await the method

waxen bough
#

put await

pale vessel
#

You can just use const channel1 = await guild.channels.create();

waxen bough
#

and use the returned value. don't get from guilds.cache

eternal osprey
#

okay i put await there

#

still returns me the same error

#
const channel1 = await message.guild.channels.cache.find(c => c.name === 'miniboss-match1') ```
waxen bough
#

no

eternal osprey
eternal osprey
#

okay

waxen bough
#
const channel1 = await guild.channels.create('minibos-match1')
await channel1.send('...')
eternal osprey
#

But i already have that channel created above it

waxen bough
#

yes

eternal osprey
#

can't i just do this

pale vessel
waxen bough
#

you can do a check

pale vessel
#

cache.find() ?? await channels.create()

plain seal
waxen bough
#
const channel1 = guild.channels.cache.find ((c) => c.name === 'miniboss-match1') || await guild.channels.create('miniboss-match1')
eternal osprey
#

it wokred

#

worked*

#

thanks boys

lusty quest
#

it can convert into both ways, ms to human readable and the other way

#

if you want to make it more fancy you can add a option to it

plain seal
#

ok

feral aspen
#

Bruh, this Dank Memer bot owner says this ...booting the entirety of node 2.

#

What do they mean by node?

umbral zealot
#

nodejs

#

though

#

it could mean other things too

#

like a server node

lusty quest
#

since its a large bot they probably hve the bot running across mutiple servers, and node 2 is probably one of them

umbral zealot
#

yeah could be that, yes

cosmic forum
#

Hello, anyone know the best way to shuffle a json object?

Example:

{
  "Item 1": "Value 1",
  "Item 2": "Value 2",
  "Item 3": {
    "Sub-Item 3": "Sub-Value 3"
  }
}

Should shuffle into something like:

{
  "Item 3": {
    "Sub-Item 3": "Sub-Value 3"
  },
  "Item 1": "Value 1",
  "Item 2": "Value 2"
}
lusty quest
#

why did you need this?

cinder patio
#

Shuffling an object will be a lot harder than shuffling an array

vivid fulcrum
#

theoretically, it's the same

feral aspen
#

Oh, thanks! :)

vivid fulcrum
#

you can just create a new object

near stratus
#

My guildMemberAdd event is not firing
But other events are working fine

#

Do I need intents for that too ?

vivid fulcrum
#

yes

#

it's a privileged intent

near stratus
#

which one ?
guildMember ??

vivid fulcrum
#

GUILD_MEMBERS

near stratus
#

that's the same anyway

#

thanks

vivid fulcrum
true cosmos
#

My bot is on discord.js v12 and just throws messages about joining the server twice. Is there a solution?

vivid fulcrum
#

you probably have two listeners for the same event

true cosmos
#

how so?

vivid fulcrum
#

i don't know, it's your code

true cosmos
#

let me see now

earnest phoenix
#

I'm trying to use a specific API, but part of the api uses digits, how could I use it?

vivid fulcrum
#

??

earnest phoenix
#

player.stats.BedWars.gamemodes.3v3v3v3.items_purchased;

#

that's the api part

#

3v3v3v3

#

uses digits

round vault
#

Why my description is keep changing?

#

It happens when ever I refresh data

pale vessel
earnest phoenix
#

ah okay

#

no dot?

#

between gamemodes and 3v3v3v3

cinder patio
#

no

ember wraith
#

H....hi?

#

Any bot dev here?

sudden geyser
#

Go ahead and ask your question

unreal estuary
#

im making a command that has a cooldown for each server but when i add the server id to a set it doesn't work

#

bot.cooldowns.add(message.guild.id);

tulip ledge
#

show us some more code

unreal estuary
#

bot.cooldowns = new Set();

sudden geyser
#

You need to show us more code: where you're handling and invoking the cooldown

unreal estuary
#

ok

#

im doing it in a command handler and the code is

#

        console.log(bot.cooldowns)
        if(bot.cooldowns.has(message.guild.id)) return message.channel.send('Cooldown active โฑ');
        var bumped = bot.bumps.find(s => s.id == message.guild.id)
        if(bumped) bot.bumps.splice(bot.bumps.indexOf(bumped), 1); //remove already bumped and add it again

        var query = await db.query(`SELECT * FROM servers WHERE id='${message.guild.id}'`);
        if(query.rowCount == 0) return message.channel.send(`${message.guild.name} isn't published!`);

        const server = query.rows[0];
        bot.bumps.push(server);
        bot.cooldowns.add(message.guild.id);

        message.channel.send(`Bumped **${message.guild.name}**`)
        setTimeout(() => bot.cooldowns.delete(message.guild.id, 1800000)); //30 minutes

    }```
sudden geyser
#

You're immediately removing the cooldown because you put the time in the wrong method call.

unreal estuary
#

OHHHH

sudden geyser
#

It's in .delete(A, B) where B is the time.

unreal estuary
#

im so dumb thanks

tulip ledge
unreal estuary
#

yeah i see it now

tulip ledge
#

Just so you know, if your bot crashes or restarts the cooldown will be removed

#

In my opinion you're better of caching or saving it to a database

unreal estuary
#

yeah im aware

#

i have the servers stored in a database i just couldn't be asked doing the cooldowns and bumps too

#

(:

green kestrel
#

44% less ram ๐Ÿ˜„

quartz kindle
#

ayyy awesome

green kestrel
#

and bearly registerable cpu

#

if this proves stable i'll make that live, and then work on porting triviabot

quartz kindle
#

nice

#

im gonna do what you did eventually, idk when but i will

#

i have a few ideas like that

green kestrel
#

its running on test mode atm... runs just like live, except all outbound messages are squelched so i dont get 2x output

quartz kindle
#

but in js

green kestrel
#

what, make your own more efficient js lib?

quartz kindle
#

ye

solemn latch
#

More efficent again?

quartz kindle
#

ye

#

nothing like discord.js

#

discord.js is an abomination

#

djsl only makes it marginally better, but its still a clusterfuck

tacit sequoia
#

Ya

green kestrel
#

i heard that eris is better in efficiency?

earnest phoenix
quartz kindle
#

marginally

#

but its mostly the same thing

earnest phoenix
#

is redis faster or vars on cache?

lament rock
#

depends what you're using it for

earnest phoenix
#

just to cache some objects

green kestrel
#

your problem is javascript

#

๐Ÿ˜‰

lament rock
#

if it's using predictable keys, redis is good for that

distant sail
#

Why can't the bot be used?

tacit sequoia
quartz kindle
quartz kindle
#

because they are inside the program's own memory

#

redis is a separate program, with a separate memory, so accessing the memory of a different program will always be slower

earnest phoenix
#

okay

crimson vapor
#

hi Tim

opal plank
#

hi Million

pale vessel
#

hi Erwin

solemn latch
#

Hi flazepe

earnest phoenix
#

hi Woo

sudden geyser
#

Say no to hi!

stable eagle
#

can I put false in message.guild.members.fetch() to make it not save the cached members?

pale vessel
#

Yes

stable eagle
#

OK

pale vessel
#

200

weak rain
#

my bot has his members intents verified but it shows cached users :/

sudden geyser
sudden geyser
weak rain
#

๐Ÿ‘€

weak rain
#

How do I enable in the code ??

sudden geyser
#

What library are you using?

solemn latch
#

And you need to enable fetch all members(in most libraries now)

weak rain
#

Djs

sudden geyser
#

You should be able to enable intents from your source code like so:

const client = new Discord.Client({
  ws: {
    intents: [...]
  }
});

You can then specify the intents as strings in the array (see https://discord.js.org/#/docs/main/stable/class/Intents?scrollTo=s-FLAGS)

weak rain
#

oh thanks

stable eagle
#

Is it possible to fetch all members of a guild without caching?

compact echo
#

Yes.

stable eagle
#

How?

compact echo
smoky blaze
#

what did i join

#

i rEALLY HAVE NO CLUE WHAT THIS IS

compact echo
#

Look through the docs before asking here because most of the time the docs have the solution. Another option is stackoverflow which I am sure someone has asked the same question.

crimson vapor
unreal estuary
weak rain
#

hey @sudden geyser my bot stopped replying :/

sudden geyser
#

Make sure you're subscribing to the intent for new messages

weak rain
#
  disableEveryone: true,

  ws: {
    intents: [ `GUILD_MEMBERS` ]
  }
});```
#

we have to do this

#

right?

sudden geyser
#

aka GUILD_MESSAGES and DIRECT_MESSAGES

weak rain
#

wow

#

why DIRECT_MESSAGES ?

sudden geyser
#

If you want to receive events for when a message is sent in a DM

#

If you don't want it, you don't need to include it

weak rain
#

yes

#

so i dont want it

#

i tried this but

#

it gives a error

#

wait lemme show u

sudden geyser
#

That's not an error. That's some source code

weak rain
weak rain
#

i m saying when i used that

weak rain
sudden geyser
#

Seems it's coming from the discord.js and discord-logs dependencies.

weak rain
#

i know

#

i tried reinstalling

#

it

#

but no reply

#

and same thing

#

@sudden geyser u gone?

#

hmm

#

Lite is Typing ๐Ÿ‘€

sudden geyser
#

I'm still here. The error is a bit vague up front, but jumping into the library source code brings up this:

return this.guild.roles.cache.filter(role => this.member._roles.includes(role.id)).set(everyone.id, everyone);

Notice the role.id and everyone.id accessors. Maybe everyone is undefined for some reason, but this is internal library code.

weak rain
#

owo

sudden geyser
#

Maybe the error is fueled by a missing intent, such as GUILDS

weak rain
#

as my intents are already verified

sudden geyser
#

GUILDS accounts for a number of intents.

weak rain
#

hmm

#

so what should i do :/

sudden geyser
#

Try adding it to your intents array and see if it solves your problem

weak rain
#

ok

pale vessel
#

GUILDS is needed iirc

weak rain
compact echo
#

common phrase used between developers

weak rain
#

ohk

weak rain
weak rain
#

this is my brother's account

#

thanks for ur info

sudden geyser
#

It's commonly used in general.

weak rain
#

hmm

compact echo
#

Show the code for index.js?

weak rain
#
  disableEveryone: true,

  ws: {
    intents: [ `GUILD_MEMBERS` ] 
  }
});```
sudden geyser
#

pretty sure it's GUILD_MEMBERS

weak rain
#

lemme try

#

still no reply

compact echo
#

Usually I don't enable GUILD_MEMBERS intent via the client and just enable them on the developer portal.

weak rain
#

thats already done

compact echo
#

hmmmm trying to think why.

green kestrel
#

you need to enable it on the portal and in your client and its GUILD_MEMBERS

#

i doubt its got ` around it

#

its probably a numeric constant

#

but i dunno, not a js guy

weak rain
sudden geyser
weak rain
#

yes i only need that

#

cauze i just want to see the number of users

pale vessel
#

You need GUILDS too

compact echo
weak rain
#

i m using ${client.users.cache.size}

compact echo
#

I would just advise use <Intents>.ALL

slender thistle
#

Your library most likely handles that for you then

pale vessel
#

That's inaccurate

#

and don't use all intents

#

It would be a waste of memory

#

Use only what you need

weak rain
#

i have to use another code rather than ${client.users.cache.size} ?

#

for fetching the amount of members

pale vessel
#

Yeah since the library won't cache all users

#

You'd have to loop through all the guilds and fetch all members which is not recommended

#

You can use guild.memberCount instead

weak rain
compact echo
pale vessel
#

Yes and WebSocket calls

weak rain
#

Hein

#

im kinda confused

green kestrel
#

ew

weak rain
#

what should i do

green kestrel
#

why not just keep a counter

weak rain
#

thats what i m trying

green kestrel
#

count all the members youre interested in, keep that count and adjust it as people come and go

earnest phoenix
placid meadow
#

also isnt that cached ?

#

ive seen the member count be very different from visual and actual cached

#

in my discord, my bot see's 49 member count, and when i do a the math of what i can see, thats not the correct number, so i have no idea how it does this

#

my bot see's 8 mystery members in there

earnest phoenix
#

if a guy have 5 guilds with only him and the bot, the bot will say that he has 10 users

#

so idk

placid meadow
#

rly confusing

prime glacier
#
const levelInfo = score.level;
 const card = new canvacord.Rank()
    .setUsername(user.username)
    .setDiscriminator(user.discriminator)
    .setRank(rank)
    .setLevel(levelInfo)
    .setCurrentXP(xpInfo)
    .setRequiredXP(nextXP)
    .setStatus(user.presence.status)
    .setAvatar(user.displayAvatarURL({ format: "png", size: 1024 }));```
```js
(node:16864) UnhandledPromiseRejectionWarning: Error: Level data must be a number, received object!
    at Rank.setRank (C:\Users\gamin\Downloads\leveling-bot-main\leveling-bot-main\node_modules\canvacord\src\Rank.js:322:45)
    at Object.execute (C:\Users\gamin\Downloads\leveling-bot-main\leveling-bot-main\commands\rank.js:58:6)
    at Client.<anonymous> (C:\Users\gamin\Downloads\leveling-bot-main\leveling-bot-main\index.js:117:13)
    at Client.emit (events.js:323:22)
    at MessageCreateAction.handle (C:\Users\gamin\Downloads\leveling-bot-main\leveling-bot-main\node_modules\discord.js\src\client\actions\MessageCreate.js:31:14)```
sudden geyser
#

Level data must be a number, received object

#

at Rank.setRank

weak rain
#

i tried this but ```const client = new Discord.Client({
disableEveryone: true,
intents: [ GUILDS_MEMBERS ]

});```

#

users are still cached

#

i m using client.users.cache.size

earnest phoenix
#

Hown to downupgrade node

pale vessel
#

Use node version manager

crimson vapor
#

downupgrade downgrade

long crow
weak rain
pale vessel
#

Guessing that's a no

weak rain
long crow
#

the in development branch

weak rain
#

not guilds

pale vessel
#

You still need GUILDS

long crow
#

then intent is under ws child

#

master branch intent is not under ws anymore

pale vessel
#

Instead of fetching all members, create a counter like Brain said for unique users

#

You can use message event so add GUILD_MESSAGES intent too

#

How many servers is your bot in?

weak rain
#

100 something

pale vessel
#

Yeah you shouldn't fetch all members

#

They even removed that option in ClientOptions on master

weak rain
pale vessel
#

Because it's a heavy task + you can get rate limited easily

weak rain
#

i want to see how many users are in total number of servers

pale vessel
#

Is it really worth all the hassle?

weak rain
pale vessel
#

The bot isn't going to fetch all members on startup

long crow
#

from the PR of new in development guide `ClientOptions#fetchAllMembers
The ClientOptions#fetchAllMembers option has been removed.

With the introduction of gateway intents, the fetchAllMembers Client option would often fail and causes significant delays in ready states or even cause timeout errors. As its purpose is contradictory to Discord's intentions to reduce scraping of user and presence data, it has been removed.
`

pale vessel
#

If you don't care, then just add this to your ready event: js for (const guild of client.guilds.cache.values()) await guild.members.fetch();and use client.users.cache.size

#

That'll fetch ALL members throughout your guilds and cache them

weak rain
#

ok

pale vessel
#

and I don't recommend you doing that

#

But if you don't care, then fuck it

#

Do it, I don't care lmao

#

You need these intents: GUILDS, GUILD_MEMBERS

weak rain
#

hm

#

thanks bud @pale vessel

weak rain
weak rain
#

and after that it loads

proven palm
#

hi is there anyone who can help make a welcome message for my bot

civic grove
#

if your using discord.py. Read the docs on how to use the on_member_join event

proven palm
#

i use discord.js

compact echo
#

then guildMemberAdd

earnest phoenix
#

yea

#

it will be like this

#
client.on('guildMemberAdd', member => {
  console.log('test')
})
#

and btw

proven palm
#

thx

cosmic forum
#

If I had an array like so:

[
  {
    "name": "hello bob",
  },
  {
    "name": "hello rob",
  },
  {
    "name": "bye rob",
  },
  {
    "name": "bye bob",
  },
  {
    "name": "rob bob",
  }
]

How would I use js to remove all the items that don't contain the word bob in the name property?

earnest phoenix
#

u need to activate Privileged Gateway Intents from discord developer portal

tardy hornet
#

it always gives me that error and i cant find the problem

lament ruin
#

I don't know if anyone has touched 3D rendering libraries for node, but if for some miracle anyone knows about it, let me know. Please, I'm desperate

earnest phoenix
#

?

tardy hornet
#

wdym

#

where do i need to check, what line?

earnest phoenix
#

nvm

#

wait a sec

tardy hornet
#

k

cinder patio
#

<Array>.filter(item => item.name.includes("bob"))

earnest phoenix
earnest phoenix
tardy hornet
lament ruin
#

anyone knows how to use the three.js library for node?

fierce ether
#

is there a way of me turning google.com into a url?

pale vessel
#

You can use the url class from node?

fierce ether
#

does it turn the string into a valid url?

pale vessel
#

Yeah

fierce ether
#

ight bet thx

earnest phoenix
#

what to do when the lighbot is offline?

pale vessel
#

Actually nah

#

You need to specify the protocol

#

But define "string into valid URL"

fierce ether
#

any example?

pale vessel
earnest phoenix
#

from index

#

nvm

#

oops

fierce ether
tardy hornet
pale vessel
#

That was just an example

earnest phoenix
#

yea ik

#

my bad

pale vessel
#

I'm not sure what you mean by "a string to valid URL"

fierce ether
#

so the command is

#

?blacklist www.google.com

earnest phoenix
#

are you trying to show bot guilds to top.gg?

#

or what

fierce ether
#

trying to turn whatever the argument is into a valid url

tardy hornet
#

or i missed something?

pale vessel
#

Can't you do const url = new URL(string.startsWith("http") ? string : `http://${string}`);It'll error if the URL is invalid

fierce ether
#

bet thx

eternal osprey
#

hey so i have a text file that contains multiple usernames like the picture above. The variable is called haha: let haha = filtered.map((x) => x[0]); and i am searching the id using: let z = haha.map(name => client.users.cache.find(({ username }) => username === name)). Would that give me all the ids of everyone in the text file?

pale vessel
#

Example of URL objectURL { href: 'https://google.com/', origin: 'https://google.com', protocol: 'https:', username: '', password: '', host: 'google.com', hostname: 'google.com', port: '', pathname: '/', search: '', searchParams: [Object], hash: '', cannotBeBase: false, special: true, [Symbol(context)]: [URLContext] }

prime glacier
sudden geyser
#

I'm stating the source of your error.

earnest phoenix
#

where you used dblapi

sudden geyser
#

It's coming from the .setRank method call.

tardy hornet
prime glacier
pale vessel
#

if (!await fetch(url).catch(() => null)) return "invalid";

fierce ether
earnest phoenix
sudden geyser
#

That's still going to be some kind of collection. It expects a number, but you're giving it an object (most likely an array)

pale vessel
#

@fierce ether Actually, you don't even need URL for that, just use fetch

tardy hornet
pale vessel
#
const url = string.startsWith("http") ? string : `http://${string}`;
if (!await fetch(url).catch(() => null)) return "invalid";```
fierce ether
pale vessel
#

Yeah

sudden geyser
#

Node.js has a module for handling URLs appropriately.

earnest phoenix
tardy hornet
pale vessel
#

They also want to check if the URL is accessible, which can only be done by fetching the URL (if it's invalid/inaccessible URL, it will error anyway)