#development

1 messages · Page 1888 of 1

quartz kindle
#

setIcon is not guild.icon = a

#

setName exists

ancient nova
#

oh yeah I get it

ancient nova
quartz kindle
#

ofc

ancient nova
#

okay nice, thanks for the help

molten flint
#

Where i am missing }??

#

Somoene?

midnight swallow
#

U sent error only, show the code

#

Anyhow, is there a Open source API for truth or dare questions that we can use ?

split hazel
#

open source api?

molten flint
midnight swallow
midnight swallow
split hazel
#

yeah open source is the wrong word but anyways

#

there's plenty from my days of making wyr commands

midnight swallow
molten flint
#

can you guys help?

midnight swallow
molten flint
#

Damnnnn

#

Ok i can wait

split hazel
#

actually a lot of them suddenly shut down

#

what I'd do is generate a huge list of them from some website and throw them into a text file and randomly pick each one

midnight swallow
#

I thought about that😂 actually

split hazel
#

or reverse engineer one of their websites

midnight swallow
#

Bruh

molten flint
#

Gay?

#

@rose warren

#

delete the mesaage

midnight swallow
#

you gain nothing herelol..

molten flint
#

Who know good discord bot dev? that i can write him in dm?

midnight swallow
#

I don't think that's good either... Best is to wait for em!..

split hazel
#

there are many if you haven't noticed

#

but the mods here say to use a freelance website like fiverr usually

molten flint
#

What i can pay its 1$ who fix ticket system or give me working system

azure ore
#

Hi there, i need some help: I've just found a new error that makes my bot crash, when i play music with it if i move him to another channel he then crashes once i stop it, i was then wondering how to fix this issue, thanks

molten flint
#

Hello, i dont wanna be rude but mayne somoene have ticket system with (reaction, embed) i can pay 1$ soory for small budget :) Dont say i am bad dev i am just tired.

rose warren
#

Wants a "good bot dev" for $1 :^)

molten flint
#

I just need ticket system

livid jackalBOT
#

@molten flint

You seem to be asking for something you don't have experience for or something that hasn't been done yet, but really need for your bot/server.
You can hire developers from Fiverr or Freelancer to code the things you need for your bot/server.

earnest phoenix
tardy hornet
#

then what will be?

boreal iron
tardy hornet
#

true and false

boreal iron
#

If you necessary need a number then use Number(database_value)

low bone
earnest phoenix
#

why is this happening, worked before

const embed = new MessageEmbed()
 .setTitle("bruh")

msg.channel.send(embed)

Error: DiscordAPIError: Cannot send an empty message
boreal iron
#

Use a description or fields, just a title isn't enough anymore

earnest phoenix
#

pft

low bone
#

Try something like send({embeds:[embed]})

azure ore
earnest phoenix
boreal iron
earnest phoenix
azure ore
earnest phoenix
#

But he using v13 but code is v12

boreal iron
#

Well if so he might specify that.

earnest phoenix
#

what does it want more, my soul

boreal iron
#

If you're really using v13, the syntax has changed

#

send({ embeds: [embed] });

azure ore
earnest phoenix
#

song_queue doesnt exist

earnest phoenix
snow urchin
#

Why would I be getting the following error for this code? Error [INTERACTION_ALREADY_REPLIED]: The reply to this interaction has already been sent or deferred. The reply was never deferred and I am not updating the interaction reply at any point, it reaches the point where it sends to database so it seems to be coming from the <Message>.send which makes no sense?

azure ore
earnest phoenix
boreal iron
earnest phoenix
#

Its your solve waitWhat

earnest phoenix
#

check that voice_channel_leave();

boreal iron
azure ore
molten flint
azure ore
earnest phoenix
molten flint
azure ore
tardy hornet
#

its okay i got it fixed with your Number(database_value), ty

#

@boreal iron

earnest phoenix
azure ore
boreal iron
molten flint
earnest phoenix
azure ore
azure ore
earnest phoenix
#

what about your voice_channel.leave

#

show that code

azure ore
#

This make it that when the song_queue is clear the bot automatically leaves

earnest phoenix
#

😬

azure ore
#

wait actually im not quite sure about it

#

might the song_queue not be needed?

earnest phoenix
#

perhaps

azure ore
#

i now wonder why i put it

earnest phoenix
#

it cant leave twice

azure ore
#

it was needed ig

earnest phoenix
#

if it gets moved from a vc, then you dont have to disconnect it

azure ore
#

no but like, after he gets moved, if i force the quit he gives error

#

and doesnt leave the current channel

earnest phoenix
#

maybe show the stop_queue code

azure ore
earnest phoenix
#

ur showing me the constant

azure ore
#

i have no stop_queue

earnest phoenix
#

so, error happens when bot gets moved by command?

azure ore
#

mb ur asking for something else?

azure ore
earnest phoenix
#

because it thinks its connected to the old channel

azure ore
#

excacly

#

so how do i make him understand that he is in a new one? that's what i ment, mb i asked wrongly i apology

earnest phoenix
#

shout at him

#

maybe catch the error in queue command when it first connects

azure ore
earnest phoenix
#

song queue is undefined

azure ore
#

here you go

earnest phoenix
#

doesnt exist

#

look at line 143 in play.js

azure ore
#

that was when i removed song_queue as a test

#

ill now try to define voice.channel with const voice_channel = message.member.voice.channel; at 83

earnest phoenix
#

or check if its undefined 😬😬

#

then get the new one

azure ore
#

mh, i didnt notice that it wasnt

#

now im just confused, i have no idea what i have to put and where

stuck dawn
#

how i can get a slash command id?

slow ibex
#

Noobie Question. but where can i see on which Discord Servers my Bot is running?

#

I tried catching it.. but i think i did something wrong

#
.play(ytdl(song.url))
        .on("finish", () => {
            serverQueue.songs.shift();
            play(guild, serverQueue.songs[0]);
        })
        //.on("error", error => console.error(error));
        .on("error", (error) => {
            console.log(`An error occured!: ${error}`);
            const stupidQueue = serverQueue?.connection?.dispatcher;
            if (stupidQueue) {
                stupidQueue.end();
            } else {
                console.log(`Serverqueue.connection.dispatcher is null urgh`)
            }

            //message.channel.send("There was an Error playing this Song, Skipping to the next one...");

        })
earnest phoenix
#

how do u guys

#

load commands from other files in d.js

solemn latch
#

Djs version?

earnest phoenix
#

the new one

#

bro

#

obv

#

the latest one

#

why do u even need to ask that

solemn latch
#

You'd be surprised how many people are on v12

earnest phoenix
#

damn

solemn latch
earnest phoenix
#

why are they still on v12

solemn latch
#

Don't want to learn the new features I guess

earnest phoenix
earnest phoenix
solemn latch
#

I dont think I can simplify it more than the guide tbh

earnest phoenix
#

that'd be

#

enough

#

for me

solemn latch
#

The guide has copy paste examples

earnest phoenix
#

im so lazy to read that whole thing written in it

solemn latch
#

(Pulled from that page)

earnest phoenix
#

let me

#

read that

wheat mesa
#

I love c++

#

Thank you for coming to my Ted talk

boreal iron
#

You Sir, recently said you’re using Java for some reason

#

Anything else doesn’t matter anymore after that statement okeh

slow ibex
earnest phoenix
#

guys

#

whats the even for

#

when the bot gets added to a new guild

#

in d.js

#

is it onGuildAdd

#

or

#

onGuildCreate

solemn latch
earnest phoenix
#

thanks man

slow ibex
#

Is there a way to set a "per guild Activity"

boreal iron
#

More details please

slow ibex
#

Well.. you can set the Activity of the Bot with client.user.setActivity(); My Question is.. can you set the Activity on a per guild basis?

boreal iron
#

Oh you mean presence

slow ibex
boreal iron
#

Yeah not possible, presence is global

slow ibex
#

Same as the Avatar?

boreal iron
#

Yes

slow ibex
#

Hmpf

boreal iron
#

But the nickname is variable

#

Weeew

slow ibex
#

And is there a way to see on how many servers the bot is active?

tulip ledge
#

define active

slow ibex
#

uuh.

#

Javascript

#

i guess

boreal iron
#

All active guilds will be send via the ready event

slow ibex
#

That was a joke 😄

boreal iron
#

They are cached

#

clients.guilds.cache.size

slow ibex
#

So on ready i could technically echo them out with name and stuff?

boreal iron
#

*client

#

You can do it at any time

slow ibex
#

😮

boreal iron
#

They keep persist in the cache

#

The whole guild object

#

😮

#

Yes it does

spark flint
#

emoji names are very literal

#

"open_mouth"

tulip ledge
#

or : O

spark flint
#

😮

boreal iron
#

Aye

boreal iron
slow ibex
#

Uuuh Nice

rapid raven
#

hello

slow ibex
#

Sorry to go again after this but..

#

Did i do something wrong with that stuff?

.on("error", (error) => {
  console.log(`GUILD: ${guild.name}(${guild.id}) - An error occured!: ${error}`);
  const stupidQueue = serverQueue?.connection?.dispatcher;
  if (stupidQueue) {
    stupidQueue.end();
    } else {
      console.log(`GUILD: ${guild.name}(${guild.id}) - Serverqueue.connection.dispatcher is null urgh`)
    }
     //message.channel.send("There was an Error playing this Song, Skipping to the next one...");
  })
blissful coral
#

log the dispatcher

wheat mesa
boreal iron
#

No Sir, there’s no excuse for using Java.
Not even if you’re drunk and on crack.

astral lava
#

im so close to being able to release my bot 😢

lyric mountain
#

java is love

#

not everyone likes love

blissful coral
#

java bad

lyric mountain
#

but everyone deserves it

blissful coral
#

stink

lyric mountain
#

extreme is not love

blissful coral
#

Extreme is love

boreal iron
#

Loving Java means loving this douche

#

That’s like dirt under your fingernails

#

dirty dirt

lyric mountain
#

nonono

#

java is innocent

#

oracle is the culprit

wheat mesa
#

Why does he look like a member of the French Aristocracy in the 16th century

boreal iron
#

He looks like he eats children, innocent children

lyric mountain
#

he looks like elon musk's lost brother that turned out to be a mega corp villain

lament rock
#

Java has committed the grave sin of too much memory overhead

#

Take a look at LavaLink

#

that thing fucking monches ram

quartz kindle
#

isnt lavalink supposed to be lightweight?

#

i mean, it advertises itself as such

pale vessel
lament rock
#

It is supposed to be lightweight and it does really good at making the best of its situation, but it still suffers greatly from overhead

#

The CPU footprint is actually very minimal

boreal iron
#

"making the best of its situation"

lament rock
#

That's the lightest way I can put it because I respect LavaLink and the fact that it makes voice systems modular and distributed instead of the traditional fashion of the audio processing being in the shard/cluster process

boreal iron
#

That’s sounds like the ugly kid will never have friends but makes the best out of it living alone in its basement

lament rock
#

I wouldn't recommend rn though because there's a memory leak in prism-media

#

I could hack fix it, but blegh

quartz kindle
#

again?

#

or is it still the same one?

woeful pike
#

isn't that the exact problem lavalink is trying to solve

lament rock
#

and Idk too much rust

#

js is just my go to lang

dreamy kindle
#

hi

delicate shore
#

Can someone guide me a little bit about sharding in discord.js but using the same port because I keep getting error that port is already in use

#

but I need the same port for top.gg

old cliff
#

@lament rock can you add more statistics? Like for 10 players the resource consumption?

tired panther
earnest phoenix
#

hey anyone know how to fix thisZ?

midnight swallow
# earnest phoenix

Ah, this is a bug you get once in a while... Mail the developers on replit ... They'll fix it

earnest phoenix
#

ohk

midnight swallow
#

Did u get ide crashed or something too

earnest phoenix
#

nope

midnight swallow
#

Then maybe check the code! If possible

earnest phoenix
#

ok

flat copper
delicate shore
delicate shore
hexed lichen
#

do I require to make a help command for my slash command bot?

rose warren
#

It depends how many commands you have

#

If you only have a handful then there's not much point

#

If you have a lot it's probably better from a UX point of view

earnest phoenix
rose warren
#

That's not really true when it comes to slash commands

hexed lichen
rose warren
#

If your bot has a handful of commands and the user types slash then they'll see them all with the descriptions in the channel

earnest phoenix
#

this isn't possible

/command (doesn't work)
/command subcommand

but is this possible

/command subcommand
/command subcommand (actually a group) subsubcommand
green kestrel
boreal iron
#

What the heck is D++

#

Ah I see...

green kestrel
#

a help command can cover context help that goes beyond 'these are the commands and their arguments'

#

like what happens if i use /command whatever?

#

will the slashcommand syntax help tell me that? you only have a sentence to convey what it does!

#

having a help command or at very least a /help command that gives a button link to a website with help on is still very important to have

#

what about things your bot does that arent commands

#

like antispam etc

#

im definitely keeping my help command... it has stuff in that tells people theres a premium subscription to be had, and that they can vote for the bot, and what these things get you etc, and that you can log into the dashboard to do stuff, where the dashboard is, etc

boreal iron
#

I would agree in fact for more complex commands with multiple arguments.
But most of the component types (which are available right now) won't allow wrong user inputs or will show a list of for example, channels, users, timestamps, predefined values etc.

green kestrel
#

for something like /meme cat or /kick user sure

#

but for a config system... you need to explain in more reason the rationale behind the configuration not just that it can be set and what the values are

boreal iron
#

But most, let's say common commands, and 200 chars of description of each parameter (component) you can predefine should be enough, I guess

green kestrel
#

imagine a ticket bot for example

#

setting it up as an admin

boreal iron
#

200 chars is absolutelly not enough in this case(s)

green kestrel
#

yeah

#

plus.... your 200 char field can only be in one language

#

my /help is localised to 16 languages

boreal iron
#

But they somehow try to trim it to "fit" into mobile clients as well

green kestrel
#

lol trim it.... you mean what you wanted to convey is lost 😄

boreal iron
#

Descriptions now can already have 2 lines or more on mobile clients and require the user to scroll through it hashflushed

green kestrel
#

sometimes i hate slash commands

boreal iron
#

A tooltip while entering any argument would probably be a better choice.

#

But I'm not sure... a tooltip with 1000 chars would be shit, too

#

That just proves once again slash commands are far away from being a development milestone for Discord or generally said, still need a lot of work

earnest phoenix
boreal iron
#

Ah I see...

zinc aspen
#

Discord.c++

runic depot
rare granite
#

hey does anyone knows how to make a cron like thing
what im trying to do is after someone runs a cmnd i store smthng in db and exactly after 1 week ( basically smthng like reminder but time is specified )
im using djs btw

boreal iron
#

Nodejs probably has are more efficient way but save the target timestamp in your database, load it into your bots cache, have an asynchronous timer check if any timestamp in your cache matches the current tick and if so run it, whatever it should run, for example an in the database saved action

rare granite
#

bot could lag/crash if the process is heavy

boreal iron
#

Not sure if there’s a better, you need something checking each process tick if the current timestamp matches your target timestamp

#

Well then use a child process or any other type of software and send an event to your app if the current time matches your timestamp

rare granite
#

ye was thinking to do it that way

#

ty

earnest phoenix
#

can someone explain why sending invalid interaction responses gets the user's discord client stuck on sending command

boreal iron
#

Yeah had that a few times, too

#

Seems to be a bug

#

And will be gone after a few minutes/hours okeh

earnest phoenix
#

it stays forever for me

#

until i restart discord

boreal iron
#

Hmm well I’m only using the browser version

earnest phoenix
#

same

#

anyways can you help me with message components?
the button works fine then i edit the message but after that im not receiving the interaction when the message is edited and the user presses the button
https://sourceb.in/N2w1FBbDgW

#

i pressed the second button and error
nothing in the console too

boreal iron
#

Later that day, gonna take a quick nap

earnest phoenix
#

who needs sleep when you are a programmer

boreal iron
#

Programming isn’t my job okeh

eternal osprey
#

hey, how can i randomly choose an item based on droprate in js?

#
 let sort = ["Quick Hands", "Ninja Cloak", "Armor", "Shiny Armor", "Reflection"]
      var finalietm = sort[Math.floor(Math.random()*sort.length)];
      var nfifl = Math.floor(Math.random() * 101);```. I for example want to set the quick hands to a 15% droprate, and the rest 1 %
quartz kindle
#

and if none of them drop?

eternal osprey
#

I was thinking about using if statement s for each one of them

#

But pretty sure there’s an easier way?

quartz kindle
#

you can make a tier list

#

something like:

#
let n = Math.random();
if(n < 0.81) { // 100 minus 15% minus 4 x 1%
  // won nothing
} else if(n < 0.96) { // 15%
  // won 15%
} else {
  let index = Math.floor((n - 0.96) * 100); // crop the number to index range
  let item = arrayOf1Percents[index];
}
#

although this is highly specific for your particular list, if your list changes, this code will have to change as well

eternal osprey
#

aha i see!

#

I might have to work with cases tho, as all the other listed items also have different drop rates

#

so i think that cases would work better

#

what do you think?

quartz kindle
#

switch cases dont work with bigger/smaller than cases

eternal osprey
#

oowhh fuck

quartz kindle
#

unless you use switch(true)

eternal osprey
#

never knew that

quartz kindle
#

you can use it, but there is no difference against if else

eternal osprey
#

alrighty, awesome tim. Thanks for clarifying this!

quartz kindle
#

ask erwin

#

:^)

earnest phoenix
pale vessel
#

Erwin gave up on this server

quartz kindle
#

go to his server

errant flax
#

djs cool

earnest phoenix
quartz kindle
#

djs not cool

pale vessel
#

Not really inactive

#

He's very active there

quartz kindle
#

^

errant flax
hexed flower
#

give me tags?

earnest phoenix
#

Discord.stinks = true;

hexed flower
#

pale vessel
earnest phoenix
pale vessel
#

wait what kinda tags?

earnest phoenix
#

NFC

errant flax
pale vessel
#

oh not booru tags

earnest phoenix
quartz kindle
#

template tags: (yes this is a valid javascript function)```js
myfunctionsome text ${hello} lol

errant flax
earnest phoenix
earnest phoenix
#

other than String.raw

errant flax
lyric mountain
#

tags ```java
int i = 0;

loop:
print("amog");
i++;
if (i < 100) goto loop;

print("sus");

earnest phoenix
quartz kindle
#

unicodfish

quartz kindle
#

:^)

urban slate
#

just to make sure, there is no way to hyperlink the footer of an embed right?

pale vessel
#

Nope

urban slate
#

any work around?

pale vessel
#

Don't use footer

earnest phoenix
#

put it as a field

#

with a \u200b name

urban slate
#

cause it wouldve looked pretty cool lol

urban slate
#

what that?

earnest phoenix
#

invisible

quartz kindle
#

zero width space

urban slate
#

ohh

earnest phoenix
#
embed.addField("\u200b", "[DO NOT CLICK THIS LINK](https://google.com/search?q=scientific+name+for+pig");
eternal osprey
#

hey!

earnest phoenix
#

hi

eternal osprey
#
 let gp = await message.channel.send(`Opening........`, {files: ["./images/bronzechest.png"] })
      setTimeout(() => {
        
  console.log(gp.attachments)
      gp.edit(gp.content + {files: ["./images/evilchest.png"] })
    }, 2000);```how would i add an attachment to an already sent message?
earnest phoenix
#

unless you edit the message with an image link

eternal osprey
#

that's sad!

pale vessel
#

You can add or delete attachments on an already existing message

earnest phoenix
#

yo wat

#

discord mobile lied to me?

eternal osprey
pale vessel
#

Try adding the previous image inside the edit

lyric mountain
#

you can edit embeds, but files are final

pale vessel
#

also what content + { files: [] }

pale vessel
quartz kindle
#

i believe discord added the ability to edit in new attachments

#

some time ago

#

i never tested it tho

slow terrace
#
                        if (!Embedchannel || Embedchannel.type !== 'GUILD_TEXT' || 'GUILD_NEWS'){
                            message.channel.send(`\\❌.`)
}

How can i allow both ?

earnest phoenix
slow terrace
#

GUILD_TEXT and GUILD_NEWS

lyric mountain
earnest phoenix
#

Embedchannel.type !== "GUILD_TEXT" && Embedchanel.type !== "GUILD_NEWS"

slow terrace
#

oh okay

earnest phoenix
#

this will make your command only work outside of guild text and guild news

lyric mountain
#

|| doesn't work as a "match one of these", it's strictly an OR operator

eternal osprey
#

and add a new one to it.

quartz kindle
#

well, all you did was making some text here[object Object]

earnest phoenix
eternal osprey
lyric mountain
#

you fckin killed the shrug dude

eternal osprey
#

Is there any way to do it right then

pale vessel
#

edit({ content, files })

quartz kindle
#

im pretty sure you dont need to put in the content again

#

unless you changed the content

eternal osprey
#

wouldn't that remove the previously set atttachment

pale vessel
#

It's new content

eternal osprey
#

aha okay!

pale vessel
quartz kindle
#

gp.edit({files: [...gp.attachments.values(), "new/image/here.png"]})

old cliff
#

Wasnt the ability to edit artachments added?

eternal osprey
#

but the edit icon does show up on the message

#
     let gp = await message.channel.send(`**Opening........**`, {files: [ffinaimage] })
      setTimeout(() => {
        
        let ffinaimage1 = zeeze[Math.floor(Math.random()*zeeze.length)];
        console.log(ffinaimage1)
        gp.edit({files: [...gp.attachments.values(), [ffinaimage1]]})
      }, 2000);```
quartz kindle
#

without the array around ffinaimage1

eternal osprey
#
     gp.edit({files: [...gp.attachments.values(), ffinaimage1]})```
#

./images/evilchest.png
./images/vikingchest.png
the images logged.

quartz kindle
#

what about files: [ ffinaimage, ffinaimage1 ]

pale vessel
#

if that doesn't work try npm uninstall discord.js

eternal osprey
#

nope sadly didn't work either

pale vessel
#

noice

quartz kindle
eternal osprey
quartz kindle
#

ye

#

i mean

#

just remove ffinaimage

#

and leave it only ffinaimage1

eternal osprey
#

i've tried that before too tbh, but let me do it again

pale vessel
#

Did they seriously not implement it?

eternal osprey
pale vessel
#

It's probably getMessage().getReactions() or something

quartz kindle
#

let me try with my lib

pale vessel
#

O they deleted their message

languid magnet
eternal osprey
wheat mesa
#

that’s a new one

#

“cornmunity”

quartz kindle
#

but i was able to add a new attachment

#

let me ask in dapi

split hazel
#

tim asking others for help? impossible

earnest phoenix
quartz kindle
quartz kindle
#

figured it out

#

theres a separate attachments field on the PATCH endpoint

#

thats where you remove files from a message

quartz kindle
#

if it doesnt work for you, it could be a djs issue

outer perch
#

how can I introduce variables into json strings?

#

like "iWantBananas": "I want {variableN} bananas"

#

I think it's called a placeholder

earnest phoenix
earnest phoenix
outer perch
#

just that? seems simpler than cutting the strings in half xD

earnest phoenix
#

yes

#

but you do have to put more .replace for more variables

#

tho you could use a recursive function/loop for this

outer perch
#

what about YAML, maybe I should use it for translations

earnest phoenix
#

yaml sucks

#

because it looks like python

outer perch
#

well, having translations in JSON also sucks

earnest phoenix
#

xml weirdsip

outer perch
#

ah

earnest phoenix
#

the language that doesn't have a standard for parsing

outer perch
#

so how would I do it in XML?

#

could you reuse the example?

earnest phoenix
#

it was ajoke

#

dont use xml

#

JSON is way better

outer perch
#

lmao 😭

earnest phoenix
#

because it has the exact same syntax as javascript objects

outer perch
#

hmm

earnest phoenix
#

you're using javascript right?

outer perch
#

yes, TS

#
"error": {
  "cmd": "There was an error when trying to execute that command!",
  [...]
}

for something like this is easy

#
"levelUp": {
  "congrats": "Congratulations",
  "levelTo": "you leveled up to level",
  "received": "and received ¤"
},

but for this you can already see the problem

#

I cut the strings in halfs/thirds so I can put the variable in the middle

earnest phoenix
#

ig you can do smth like this

const placeholders = {
  a: "never",
  b: "gonna",
  c: "give",
  d: "you",
  e: "up" // discord.js moment
};

function replace(string, placeholders) {
  let mutated = string;
  Object.keys(placeholders).forEach(k => mutated = { mutated.replace(new RegExp(`\\{${k}\\}`), "g"), placeholders[k]) });
  return mutated;
}

const replaced = replace("{a} {b} {c} {d} up", placeholders);
console.log(replaced);
#

@old cliff when you ask a guy with a ahlook___at___myFancyNaME to give you nitro

outer perch
#

haha

outer perch
#

seems like a good way, ty @earnest phoenix

earnest phoenix
#

@outer perch just a heads up, that code doesn't even work

urban slate
#

guys can someone tell me why my gif in an embed is not loading

#

like the code works

#

cause i console logged the link of the gif

#

and it does open up in the browser

urban slate
#

can .setImage() have a url as input?

earnest phoenix
#

intense syntax errors

urban slate
#

me?

outer perch
urban slate
outer perch
#

check the url itself

urban slate
#

i did

#

it works

earnest phoenix
#
const placeholders = {
  a: "never",
  b: "gonna",
  c: "give",
  d: "you",
  e: "up" // discord.js moment
};

function replace(string, placeholders) {
  let mutated = string;
  Object.keys(placeholders).forEach(k => { mutated = mutated.replace(new RegExp("\\{" + k + "\\}", "g"), placeholders[k]) });
  return mutated;
}

const replaced = replace("{a} {b} {c} {d} up", placeholders);
console.log(replaced);
#

fixed

molten flint
#

if (!message.guild.me
^

TypeError: Cannot read properties of null (reading 'me')
at Client.<anonymous> (/home/container/events/guild/NQN.js:4:23)

#

what is wrong with me?

outer perch
#

@urban slate .setImage('https://i.imgur.com/someID.gif') this is working for me

urban slate
#

hmm

quartz kindle
outer perch
#

haha

quartz kindle
#

but in your code, message has no guild

molten flint
#

dont be rude XD

quartz kindle
#

this can happen when its a DM message

#

you asked lmao

molten flint
#

i mean the code the js cant read me???

quartz kindle
#

it cant read guild.me because guild is null

molten flint
#

so how i can fix it?

quartz kindle
#

check if guild exists

#

if(!message.guild) return

#

or something

molten flint
#

let { Default_Prefix } = require("../../config.js");
module.exports = async client => {
client.on("message", async message => {
if (!message.guild.me
.hasPermission("MANAGE_WEBHOOKS")) return;
if (message.author.bot || !message.guild || message.webhookID) return;
let enambed = await client.data.get(nqn_${message.guild.id});
if (!enambed) return;
let Prefix = await client.data.get(Prefix_${message.guild.id});
if (!Prefix) Prefix = Default_Prefix;
if (message.content.startsWith(Prefix + "react")) return;
let msg = message.content;
let emojis = msg.match(/(?<=:)([^:\s]+)(?=:)/g);
if (!emojis) return;
emojis.forEach(m => {
let emoji = message.guild.emojis.cache.find(x => x.name === m);
if (!emoji) return;
let temp = emoji.toString();
if (new RegExp(temp, "g").test(msg))
msg = msg.replace(new RegExp(temp, "g"), emoji.toString());
else msg = msg.replace(new RegExp(":" + m + ":", "g"), emoji.toString());
});

if (msg === message.content) return;

let webhook = await message.channel.fetchWebhooks();
let number = client.randomNumber(1, 2);
webhook = webhook.find(x => x.name === "NQN" + number);

if (!webhook) {
  webhook = await message.channel.createWebhook(`NQN` + number, {
    avatar: client.user.displayAvatarURL({ dynamic: true })
  });
}

await webhook.edit({
  name: message.member.nickname
    ? message.member.nickname
    : message.author.username,
  avatar: message.author.displayAvatarURL({ dynamic: true })
});

message.delete().catch(err => {});
webhook.send(msg).catch(err => {});

await webhook.edit({
  name: `NQN` + number,
  avatar: client.user.displayAvatarURL({ dynamic: true })
});

});
};

quartz kindle
#

code blocks please

molten flint
#

kk

#
module.exports = async client => {
  client.on("message", async message => {
   if (!message.guild.me
       .hasPermission("MANAGE_WEBHOOKS")) return;
   if (message.author.bot || !message.guild || message.webhookID) return;
    let enambed = await client.data.get(`nqn_${message.guild.id}`);
    if (!enambed) return;
    let Prefix = await client.data.get(`Prefix_${message.guild.id}`);
    if (!Prefix) Prefix = Default_Prefix;
    if (message.content.startsWith(Prefix + "react")) return;
    let msg = message.content;
    let emojis = msg.match(/(?<=:)([^:\s]+)(?=:)/g);
    if (!emojis) return;
    emojis.forEach(m => {
      let emoji = message.guild.emojis.cache.find(x => x.name === m);
      if (!emoji) return;
      let temp = emoji.toString();
      if (new RegExp(temp, "g").test(msg))
        msg = msg.replace(new RegExp(temp, "g"), emoji.toString());
      else msg = msg.replace(new RegExp(":" + m + ":", "g"), emoji.toString());
    });

    if (msg === message.content) return;

    let webhook = await message.channel.fetchWebhooks();
    let number = client.randomNumber(1, 2);
    webhook = webhook.find(x => x.name === "NQN" + number);

    if (!webhook) {
      webhook = await message.channel.createWebhook(`NQN` + number, {
        avatar: client.user.displayAvatarURL({ dynamic: true })
      });
    }

    await webhook.edit({
      name: message.member.nickname
        ? message.member.nickname
        : message.author.username,
      avatar: message.author.displayAvatarURL({ dynamic: true })
    });

    message.delete().catch(err => {});
    webhook.send(msg).catch(err => {});

    await webhook.edit({
      name: `NQN` + number,
      avatar: client.user.displayAvatarURL({ dynamic: true })
    });
  });
};
earnest phoenix
#

are we posting bad code again? here's my take

quartz kindle
#
   if (!message.guild.me.hasPermission("MANAGE_WEBHOOKS")) return;
   if (message.author.bot || !message.guild || message.webhookID) return;
molten flint
earnest phoenix
quartz kindle
#

lel

#

reverse is faster than unshift

earnest phoenix
#

they are two different things tho

quartz kindle
#

i mean push + reverse

molten flint
#

still cant read "me"

#

XD

quartz kindle
#

show what you did

earnest phoenix
#

still don't get why you'll do that

molten flint
#
module.exports = async client => {
  client.on("message", async message => {
  if (!message.guild.me.hasPermission("MANAGE_WEBHOOKS")) return;
   if (message.author.bot || !message.guild || message.webhookID) return;
    let enambed = await client.data.get(`nqn_${message.guild.id}`);
    if (!enambed) return;```
quartz kindle
#

you didnt change anything

#

i told you to invert them

#

put the second one first

earnest phoenix
#
[1,2,3,4].unshift() // [2,3,4]
[1,2,3,4].push(5).reverse() // [5,4,3,2,1]
earnest phoenix
#

did you mean .reverse().push().reverse()

#

hold up lemme do a benchmark

quartz kindle
#
a = [];
b = [];

for(let i = 0; i < 10; i++) {
  a.unshift(i)
}

for(let i = 0; i < 10; i++) {
  b.push(i)
}
b.reverse()
earnest phoenix
#

when there is a var/let/const there is a python

quartz kindle
earnest phoenix
#

@quartz kindle what about [...newValues, ...originalArray]

#

wait what

quartz kindle
#

told ya

earnest phoenix
#

noice

quartz kindle
earnest phoenix
#

what about concat and spread

split hazel
quartz kindle
#

lmao wut

#

works on browser

earnest phoenix
# split hazel

my disappointment is immeasurable and my day is ruined

split hazel
quartz kindle
#

browser > node

#

btw, wanna see just how bad node.js is?

split hazel
#

yes

quartz kindle
#

in terms of js/v8 performance

earnest phoenix
#

@split hazel FUCK YOU
WHY DID YOU HAVE TO LOG ME OUT OF 2FA DISCORD WHEN MY PHONE'S AT THE MOBILE REPAIRING STORE

split hazel
#

don't worry I'll try help you reach a diagnosis

quartz kindle
#

LOL

split hazel
#

based on the current facts your problem appears to be a skill issue which must be resolved by yourself

earnest phoenix
#

damn, if only i could read that joke

quartz kindle
#

i was loling at you actually

#

lmao

#

you did it in discord's dev tools?

split hazel
#

wait but how did it log you out

#

can't you just refresh

earnest phoenix
#

idk

#

browser crashed

split hazel
#

wait how are you talking to us

#

I think im a little confused

earnest phoenix
#

I reloginned

#

using a backup code

split hazel
#

oh lmao

#

never let go of backup codes

#

or you die

earnest phoenix
earnest phoenix
quartz kindle
#

where do you store your backup codes?

earnest phoenix
#

C:\\Downloads

quartz kindle
#

what if your pc dies

split hazel
#

I store mine on gmail

#

a would be attacker will never know

#

because I don't label them so if I lose one I'd have to go through tons of emails

earnest phoenix
#

do someone know py and can help me?

outer perch
#

@quartz kindle Just is for Linux only, and I develop on Windows 😦

simple stump
#

I’m trying to do timed bans by inserting the date/time into the database, then use setTimeout to unban the user after a certain time. But how would I convert the date into a number, then check if the time has passed? (The purpose of this is if the bot goes down, when the bot starts up I get the date from the database, then check if it’s passed a certain point and if it hasn’t setTimeout)

jovial nexus
#

With express, how can i stay in the same page when changing the url but running a javascript function in the html?

grim aspen
#

package.json: invalid character '}' looking for beginning of object key string

#

wait

lament rock
grim aspen
#

nope

grim aspen
#

how did i screw up package.json

lament rock
#

don't manually edit the package.json if you don't understand syntax

grim aspen
#

i understand how it works

#

but obviously something screwed up while working with a vps

lament rock
#

okay

#

So, just fix the syntax of your package.json then

#

no need to ask us why there's a syntax issue if you understand it

grim aspen
#

oh now i see what i did

#

the problem is i didn't see anything wrong since the current package.json i have worked forever

lament rock
#

I still wouldn't manually edit it regardless. npm or yarn or pnpm offers everything you need

split hazel
#

I manually edit it all the time since npm screws up a lot

#

the package lock is the one you shouldn't be really modifying

grim aspen
#

yeah i never even bother with package-lock

#

there we go

#

fixed

lament rock
#

I've never had npm screw up

split hazel
#

then you don't go to the bleeding edge like i do

slim heart
#

package.json is made to be edited change my mind

stiff lynx
#
0|index    | - /root/novabotv13/node_modules/@discordjs/voice/dist/audio/AudioResource.js
0|index    | - /root/novabotv13/node_modules/@discordjs/voice/dist/audio/index.js
0|index    | - /root/novabotv13/node_modules/@discordjs/voice/dist/index.js
0|index    | - /root/novabotv13/node_modules/@koenie06/discord.js-music/src/index.js
0|index    | - /root/novabotv13/index.js
0|index    |     at Object.loader [as require] (/root/novabotv13/node_modules/@discordjs/voice/node_modules/prism-media/src/util/loader.js:12:9)
0|index    |     at loadOpus (/root/novabotv13/node_modules/@discordjs/voice/node_modules/prism-media/src/opus/Opus.js:17:17)
0|index    |     at new OpusStream (/root/novabotv13/node_modules/@discordjs/voice/node_modules/prism-media/src/opus/Opus.js:46:10)
0|index    |     at new Encoder (/root/novabotv13/node_modules/@discordjs/voice/node_modules/prism-media/src/opus/Opus.js:149:5)
0|index    |     at Object.transformer (/root/novabotv13/node_modules/@discordjs/voice/dist/audio/TransformerGraph.js:120:24)
0|index    |     at /root/novabotv13/node_modules/@discordjs/voice/dist/audio/AudioResource.js:156:60
0|index    |     at Array.map (<anonymous>)
0|index    |     at createAudioResource (/root/novabotv13/node_modules/@discordjs/voice/dist/audio/AudioResource.js:156:41)
0|index    |     at playSong (/root/novabotv13/node_modules/@koenie06/discord.js-music/src/index.js:325:26)
0|index    |     at Object.exports.play (/root/novabotv13/node_modules/@koenie06/discord.js-music/src/index.js:95:9)```


How can I fix this error?
split hazel
#

you couldn't've posted a worse error message

lament rock
#

lmao

earnest phoenix
split hazel
#

who is chakra ui

earnest phoenix
#

type (_ => {})() into the editable example

split hazel
#

fine then whatever you say

earnest phoenix
#

the lib is a nice replacement for css

split hazel
#

even though I'm on 15% battery and my whole house has no electricity atm

#

and nice it works

#

I'll also keep an eye on that lib

#

it looks nice

earnest phoenix
#

it is incredible

#

no more centering css pain

#

also 100 accessibility score in devtools

split hazel
#

kinky

spark flint
#

adobe dreamweaver

earnest phoenix
#

lavalink still works with discord.js v13

split hazel
#

glitch

spark flint
#

ah

solemn latch
#

I feel like most web editors require reloading the file, as that's how web editing works

simple stump
#

I’m trying to do timed bans by inserting the date/time into the database, then use setTimeout to unban the user after a certain time. But how would I convert the date into a number, then check if the time has passed? (The purpose of this is if the bot goes down, when the bot starts up I get the date from the database, then check if it’s passed a certain point and if it hasn’t setTimeout)

earnest phoenix
#

how do i make something like, when a thing is completed, the bot will send a message

#

like when you get 100 trophies it'll give you 100 coins so when giving it'll say "You've got 100 trophies so i'm giving 100 coins to you"

#

it's in message event, no?

earnest phoenix
#

but you can emit the event yourself

#
// when 100 trophies
client.emit("100trophies", member);

// somewhere else in code
client.on("100trophies", member => do stuff);
cinder patio
#

Less overhead

old cliff
#

Too bad

spark flint
#

i only use it for editing my site quickly

old cliff
#

Worst autocomplete

#

Too resource intensive like other Adobe apps

earnest phoenix
old cliff
#

🏴‍☠️

earnest phoenix
#

adobe price is worse than my 20 line hardcoded tictactoe winner detector

old cliff
#

Just make a tic-tac-toe ai

quartz kindle
#

tic-tac-toe ai:

play(openspaces[Math.floor(Math.random() * openspaces.length)])
lyric mountain
#

npm -i is optional

ancient nova
#

can you set your bots custom status to invincible? so it'll still be offline when you turned it on

#

I presume it would be something like client.user.setStatus('offline');, right?

lyric mountain
#

bot.hp = Integer.POSITIVE_INFINITY;

#

done, bot is now invincible

ancient nova
#

what does bot.hp stand for?

#

never heard of that endpoint

lyric mountain
old cliff
#

Imagine

lyric mountain
#

but yeah, 'invisible' is a valid status

#

offline isn't afaik

pale vessel
#

It's offline

lyric mountain
#

really?

pale vessel
#

no

#

It's invisible

#

trolldeath Had to double check

#

Don't use d.js

lyric mountain
wheat mesa
#

bot.hp new endpoint

slim heart
pale vessel
#

I said I don't use discord.js anymore so I needed to check

slim heart
#

it’s still invisible though

#

offline doesn’t work

pale vessel
#

didn't ask

slim heart
#

who????

urban slate
#

yo anyone familiar with tenor api?

#

how do i request the media url if u are familiar with it?

ancient nova
#

if you do console.log("word"); how to make the "word" appear centered?

lyric mountain
#

there's no "center" in a terminal

#

you basically need to know how large (in characters) the terminal window is, then offset the text by width / 2 - length / 2

#

right padding is unnecessary tho

ancient nova
#

I can't use that

#

what if somebody resizes the console

lyric mountain
#

you MIGHT be able to get window width with native shit

#

but it'll be...well...native shit

ancient nova
#

so it will look nice

urban slate
proven lantern
#

you can change the text color console.log('%c Oh my heavens! ', 'color:red');

#

but it doesn't support text-align:center or any of those formatting stuff

lyric mountain
#

that's because terminal windows don't have a max width

#

so no actual center

pale vessel
ancient nova
#

just calculate the center

#

I can add spaces and preted it is the center

#

but I want it done automatically

urban slate
ancient nova
#

so code don't look messy

urban slate
#

there is no max width

#

so basically infinte space

#

how will u find center?

ancient nova
#

get the width of the box?

slow ibex
lyric mountain
#

also u shouldn't use oAuth2 code grant

slow ibex
#

Permission error. Someone invited the bot and didnt provide the Perms.

urban slate
slow ibex
#

*A few Servers.

urban slate
lyric mountain
#

...did u just ignore me?

ancient nova
#

just get the width of the screen, cut it in half also minus the text, I'm using node.js it should work, but don't know how to start making something like that as a function

urban slate
#

cause even i had thsi problem

slow ibex
ancient nova
#

yea sso how do I go about doing it?

lyric mountain
#

if u get the SCREEN width you'll always consider a maximized window

urban slate
lyric mountain
#

also, there's a LITTLE issue with centering text

slow ibex
lyric mountain
#

there's a thing called "headless"

#

if u try centering text in a headless system you'll always get 0 width

#

bcuz they don't have interface at all

#

ye

ancient nova
lyric mountain
#

why tf is everyone ignoring my answers

pale vessel
#

They ignored mine too

ancient nova
#

😐 ok I'll make it myself then

lyric mountain
#

I already answered u iirc

#

just reauthorize using the correct invite url

#

nope

boreal iron
lyric mountain
#

it'll add remaining scopes

boreal iron
#

People don't trust you.

lyric mountain
boreal iron
ancient nova
#

done

#

I think

#
const centerAlignText = function(_text, width) {
    width = (process.stdout.getWindowSize()[0] - _text.length) / 2;
    return " ".repeat(width) + _text + " ".repeat(width);
}
#

feel free to use

#

if you want

lyric mountain
#

everyone thug until you get fatal errors due to negative padding

simple stump
#

I’m trying to do timed bans by inserting the date/time into the database, then use setTimeout to unban the user after a certain time. But how would I convert the date into a number, then check if the time has passed? (The purpose of this is if the bot goes down, when the bot starts up I get the date from the database, then check if it’s passed a certain point and if it hasn’t setTimeout)

snow urchin
#

Why does this work locally but not on a linux server? https://i.callumdev.xyz/mkxga.png
it just doesnt play any audio when on the server
no errors or anything, very annoying

lyric mountain
#

I mean, linux usually stays bare minimal

snow urchin
#

Don't think so

lyric mountain
#

that's all I can think abt

snow urchin
#

if you can find any link with more info, would be handy 👀

lyric mountain
#

run the code at DEBUG level

proven lantern
lyric mountain
#

see if there's any error

proven lantern
#

throw early and catch late

snow urchin
#

Found the issue, somehow ffmpeg installed incorrectly 😄

proven lantern
#

i am using an interaction url endpoint for my slash commands. is the best way to see if the bot has permission to just make the call and see if it fails? i dont see any info about the bot's permission in the body of the request.

lyric mountain
proven lantern
#

this is all i see in the body

lyric mountain
#

what is in options?

proven lantern
#

it's the parameters to the slash command

lyric mountain
#

oh, no, I don't mean that

boreal iron
#

Are you using djs?

lyric mountain
#

check during startup

#

actually, check during guild_ready event

proven lantern
boreal iron
#

Ah okay.

#

Ah nvm I remember you tried to get rid of your VPS and any gateway connection, hmm?

proven lantern
lyric mountain
#

can't u just request that info directly?

#

like, isn't there any endpoint for that?

proven lantern
boreal iron
#

is the best way to see if the bot has permission to just make the call and see if it fails?

Which permissions you're speaking about?

#

The permission to send a webhook?

proven lantern
slow ibex
#

Okay.. sanity check pls..
If a Bot doesnt have perms to you know.. Join, Speak or do something.. it shouldnt be able to read chat, processing messages and "Speak" in VC.. right?

proven lantern
#

until april 2022

boreal iron
slow ibex
#

Because.. i tested my bot on a Guild without any perms. it has requested.. and it worked without a problem

boreal iron
#

Discord is like, do something, send something and if you're missing the permissions it's okay for us, but handle your errors.

slow ibex
#

But it didnt throw any error on my test bot.

proven lantern
slow ibex
#

The Prod Bot was flooded with errors like that

boreal iron
proven lantern
boreal iron
#

Guess that's intentional to prevent developers from knowing a bot may have more permissions than needed.
Which doesn't makes sense since he could send any request to do shit and supress the errors.

#

So yeah... actually would be a good idea if Discord would send that information.

#

The less you expect from Discord the better.

proven lantern
slow ibex
#

uuuh btw.. how can i you know.. convert a guildID to a Name?

ancient nova
#

anyone? RangeError: Invalid count value

prime flint
boreal iron
ancient nova
#
const centerAlignText = function(_text, width) {
    width = (process.stdout.getWindowSize()[0] - _text.length) / 2;
    return " ".repeat(width) + _text + " ".repeat(width);
}
``` what's wrong with this?
boreal iron
#

process.stdout omg you're still on that one...

ancient nova
#

._.

#

yes

slow ibex
ancient nova
#

wat

#

just do it all in one console.log

#

why 3 at a time

boreal iron
ancient nova
#

console.log(text+
text+
text)

slow ibex
#

Okay.. i am Stupid xD

boreal iron
ancient nova
#

that also does work

#

why did you include cock in there

ancient nova
boreal iron
#

because cocks are funny

proven lantern
ancient nova
#

as a variable?

#

I could also do it outside the function

proven lantern
#

yeah

#

no

#

make it a const

ancient nova
#

alright let me try then

proven lantern
#

and define it inside

boreal iron
#

woops, pingo

ancient nova
#

I did that, but I'm still getting the RangeError: Invalid count value error @proven lantern

slow ibex
#

Ngl.. i like to get pinged.. as long as its important

boreal iron
#

Good to know.

ancient nova
slow ibex
#

...

ancient nova
#

lol

slow ibex
#

Noice

ancient nova
#

aight so

#

I'm still

#

getting an eror

boreal iron
ancient nova
#

oh I think I know why

boreal iron
#

Easier way to loop through the collection and log it in your console

ancient nova
#

how can I make it support the```
helo helo helo

strings?
slow ibex
#

I almost got it grrr

boreal iron
#

Each guild per line might be better tho?!

slow ibex
#

Correct

#

And a table looks nice c:

earnest phoenix
#

why cant i send emojis, DiscordAPIError: Cannot send an empty message

ancient nova
#

that is not an array

earnest phoenix
#

its an array actually

ancient nova
#

@earnest phoenix

earnest phoenix
#

it is

ancient nova
#

it isn

earnest phoenix
#

its .split('')

proven lantern
#

({content:emojis[3]})

boreal iron
#

If so the syntax has changed.

#

Yeah nvm

ancient nova
#

because if string is too long the thing goes -

earnest phoenix
boreal iron
#

Could you provide an example, please?

ancient nova
#

wut

boreal iron
earnest phoenix
#

Ok.

boreal iron
earnest phoenix
#

401 guy talking

proven lantern
#

and min width is 0

ancient nova
#

it already does that

proven lantern
#

nice

ancient nova
#

const centerAlignText = function(_text) {
const width = (process.stdout.getWindowSize()[0] - _text.length) / 2; //get width and - text length then half by 2 to paste it twice over the text
return ${" ".repeat(width) + _text + " ".repeat(width)};
}

#

but it doesn't support a string that look like this

`
hel
e
e
`
#

for example

proven lantern
#

yeah, that wont work

#

maybe your terminal has a setting that will let you format it

earnest phoenix
ancient nova
#

no I tried looking online for it, I found only 1 npm package that does that too, but you have to type in the value of spaces manually, so that won't work for me :/

slow ibex
#

Okay.. why am i not able to display a simple array in node.. pls.. someone?

solemn latch
#

display as in log it?

proven lantern
slow ibex
#

Or better.. how the f. can i loop through an array

boreal iron
ancient nova
earnest phoenix
boreal iron
#

It's not.

proven lantern
#

chararray

ancient nova
#

man

#

ok nvm

#

I'm deleting this

#

it won't work

earnest phoenix
#

see

solemn latch
slow ibex
#

something like.. foreach(guild in guilds) { name: guild.name, id: guild.id } Is there an equivalent or smth?

proven lantern
proven lantern
#

oh, i see

boreal iron
#

You're splitting by nothing, emoji[3] doenst exist

#

emoji[0] does

proven lantern
#

yeah

boreal iron
#

If you don't include the important part in your screenshot, not my issue, dude

earnest phoenix
#

see

#

square is an emoji

#

[3]

#

even if i did msg.channel.send("😀")

#

it doesnt send it

boreal iron
#

Dude, create an array [emoji, emoji, emoji]

proven lantern
#

{content:"emoji"}

boreal iron
#

OR split by a space

slow ibex
boreal iron
#

and put a space into it

proven lantern
#

just make it an array in the first place

slow ibex
#

Unexpected for..

proven lantern
#

no reason for it to be a string and then split into an array

boreal iron
slow ibex
#

SyntaxError: Unexpected token 'for' 😢

proven lantern
#

you want to use map

#

not a for loop

boreal iron
#

why are you using a for inside an array

#

😆

slow ibex
#

b.. bb... because i wanna put thingy to thing

boreal iron
#

create you array, and push items to it

proven lantern
#

you want to use the map function on the array

earnest phoenix
#

i may have been wrong
javascript 🤢

boreal iron
#
let array = [];
for(... of ...) array.push(item);
proven lantern
#
array.map(thingy => ({...thingy, more:thingys}))
const guildNames = array.map(guild => guild.name)
boreal iron
#

Think he just wanna log the guilds

#

I mean it's not really needed to create another array or object at all, the guilds are already available as collection

slow ibex
proven lantern
#
console.log(client.guilds.cache.map(guild => guild.name))```
slow ibex
#

i did that before with the IDs.

boreal iron
#

omg

slow ibex
#

But i kinda whant it in console.table()