#development

1 messages · Page 1159 of 1

pure lion
#

i set mine to 6969

solemn latch
#

nice

pure lion
#

do i need to have it on a second server/path?

misty sigil
#

nah?

#

mines just mongodb://connectiondetails/

pure lion
#

passed on your nginx or what

misty sigil
#

i dinnae use nginx

solemn latch
#

is there any reason your doing mongo behind nginx?

pure lion
#

uh

solemn latch
#

just cuz?

pure lion
#

yeah

#

also i host my web shit

#

on the same vps

solemn latch
#

just because you have nginx doesnt mean everything needs to go through it

#

or that theres any benefit to it

pure lion
#

how can i not pass it?

solemn latch
#

just connect directly iirc

#

mongodb://connectiondetails/

pure lion
#

how tho

#

idk how to proxynt it

topaz fjord
#

there's no point to put mongo behind nginx if you're not going to be accessing it from outside the vps

pure lion
#

i want to access it outside

solemn latch
#

for now, i would just try and get mongo working without nginx

pure lion
#

it works but i want to connect through compass

solemn latch
#

and then add your nginx mongo stuff after.

#

compass can connect remotely without nginx i would expect

pure lion
#

hmm

#

but i keep getting timed out

viral lynx
#

Hm

solemn latch
#

honestly, contact your vps provider.
would expect they would have better info/would be able to look at your actual setup

viral lynx
#

I dunno why my script still has 3 issues, can I paste it here soo u can see what’s wrong?

solemn latch
#

i was having issue setting something up, contacted my vps provider and they went through the setup with me

#

i cant really say if i can be helpful without more info @viral lynx

#

giving us the errors/code/language/lib goes a long way

viral lynx
#

const Discord = require('discord.js');

const client = new Discord.Client();

client.once('ready', => {
console.log('PARKUS is online!');
});

client.login('token');

#

Parkus is name of bot btw

ionic dawn
#

So my bot crashes if its opened with the screen at rpi

#

how interesting

solemn latch
#

your replacing token with your bots token in your actual code right?

floral creek
#

isnt it on_ready?

#

so client.on('ready'

solemn latch
#

once works aswell

misty sigil
#

once works

viral lynx
#

token is my bot’s token. I cannot share it

solemn latch
#

yeah just making sure

#

and your doing "node ." to run it?

viral lynx
#

Yes

solemn latch
#

try doing "node yourfilename"

pure lion
#

i can connect from local

dire obsidian
#

if i embed a content on a page that should be the content?

viral lynx
#

main.js?

#

That’s where the script is

solemn latch
#

yeah, if thats what you named it

dire obsidian
#

hmmmmmmmmmmm ok

viral lynx
#

Still nothing

solemn latch
viral lynx
#

🤔

pure lion
#
http{}
stream {

upstream stream_mongo_backend {
   server localhost:27017;
   }

server {
   listen 27017;

   location / {
      proxy_pass http://stream_mongo_backend;
     }
   }
}
#

ah

#

im still confused

#

fml

indigo cobalt
#

const Discord = require('discord.js');

const client = new Discord.Client();

client.once('ready', => {
console.log('PARKUS is online!');
});

client.login('token');
@viral lynx Is not on?

solemn latch
#

once works aswell

#

lmao

indigo cobalt
#

on('ready'

solemn latch
#

events can use on or once

indigo cobalt
#

Not once.

solemn latch
#

???

viral lynx
#

VSC says to change ; to , in console.log('PARKUS is online!');

indigo cobalt
#

client.on('ready', => {
console.log('PARKUS is online!');
});

solemn latch
#

ONCE WORKS

indigo cobalt
#

Put on ready not once.

viral lynx
#

Hm

solemn latch
#

STOP GIVING INCORRECT INFO

indigo cobalt
#

Once works?

solemn latch
#

PLEASE

#

yes

#

its an event

indigo cobalt
#

Ok. For me is on.

viral lynx
#

For me no

indigo cobalt
#

Strange.

solemn latch
#

on and once work

pure lion
#

whats the difference between on and once :thenk:

solemn latch
indigo cobalt
#

Alr.

solemn latch
#

once runs once and only ever once per run
on runs on every relevant event

indigo cobalt
#

Ah ok. Thanks.

#

And sorry for the misunderstood.

earnest phoenix
#

how can i show the custom status in the message?
i tried a code like this but it still says 'custom status'

kisi.presence.activities.forEach((activity) => {
        if (activity.type === 'CUSTOM_STATUS') {
            embed.addField('Özel Durum',`\n${activity.name}`)
        }
            })
solemn latch
#

did you name your client kisi?

earnest phoenix
#

kisi

pure lion
#

did you tho

#

:l

solemn latch
#

isnt that so confusing?

earnest phoenix
#
const kisi = message.mentions.users.first() || client.users.cache.get(args.join(' ')) || message.author;
mellow fjord
#

@earnest phoenix Where are u from?

zenith knoll
#

hey i keep getting this error Cannot read property 'send' of undefined
Im tryna make a cmd where my friend and i can chat toeach other through my bot where it sends a dm to my friend
like i can do .send @username hi there

dusky mason
#

i want to register a listener

#

but where would i put

#

the self.bot.lavalink.register_event_listener(self.on_lavalink_event)

earnest phoenix
#

@mellow fjord turkey

#

hey i keep getting this error Cannot read property 'send' of undefined
Im tryna make a cmd where my friend and i can chat toeach other through my bot where it sends a dm to my friend
like i can do .send @username hi there
@zenith knoll show your code

zenith knoll
#

k

earnest phoenix
#

the end

zenith knoll
earnest phoenix
#

user is undefined

#

are you sure it works correctly

#

const

zenith knoll
#

wdym

#

his id is correct

sudden geyser
#

user can be undefined at times

earnest phoenix
#

what's client

#

use ("257062280779268097").tag

#

("257062280779268097").username

#

You can't

zenith knoll
#

??

sudden geyser
#

You should check if user is not equal to undefined

#

aproxthethat that's not a thing

solemn latch
#

you cant send message to tag

#

or username

#

lol

earnest phoenix
#

You need to grab the user class and do .send on it

zenith knoll
#

You should check if user is not equal to undefined
@sudden geyser how

earnest phoenix
#

Bruh

sudden geyser
#

if conditions

zenith knoll
#

ik

earnest phoenix
#

if (user == undefined)
//smth
}

zenith knoll
#

it def is undefined

#

cause it says so

#

but how fix

#

like

#

not to want to be spoon fed

#

but

earnest phoenix
#

the code is correct

zenith knoll
#

its what the docs said

earnest phoenix
#

smh it doesn't work

#

try using await

zenith knoll
#

Sure

earnest phoenix
#

or use .then

solemn latch
#

Get isnt a promise

zenith knoll
#

wait ik y

#

yes await prob works

#

cause its async function

earnest phoenix
#

.then is better than making your whole command handler async which i definetely didn't do for mine

#

cuz

amber fractal
#

well

earnest phoenix
#

you can only run await in an async function

solemn latch
#

🤔 but he is using get

viral lynx
#

Ok, there is only one hope for me to fix that script

solemn latch
#

its not a promise

zenith knoll
#

await isnt work lmao

#

lemme check new error

#

yea

#

user still undefined

#

Hmm

amber fractal
#

Discord.js is made for promises, also yeah .get() isnt a promise

zenith knoll
#

Docs say its .get

#

soooo

viral lynx
#

Imma just give up, scripting isn’t for everyone. Well, thanks to anyone that tried to helped me ;-;

zenith knoll
#

discordjs guide scammed me?

#

lmao

earnest phoenix
#

Tf

amber fractal
#

well .get used to be a promise

earnest phoenix
#

Your code is korrekt

#

Show the stuff around your code

#

Maybe it's an error in that

zenith knoll
#

okay

solemn latch
#

the user might not be in cache

#

since not all users are in cache

amber fractal
#

on v11 .get returned a promise v12 uses a new caching system

earnest phoenix
#

what is the difference between caching and normal promises

zenith knoll
earnest phoenix
#

100% promises
discord.js lied

solemn latch
#

cache is already cached, so theres no need for a promise

amber fractal
#

^

zenith knoll
#

oh wait i accidentally made it send two times :P

solemn latch
#

fetch gets from discord sometimes so it needs a promise

zenith knoll
#

well

#

thats the code

#

im usin fs

earnest phoenix
#

Tf

zenith knoll
#

for cmd handler

#

?

earnest phoenix
#

You understood wrong what i said

cosmic agate
#

how do I make a database for my bot? dependency: discord.js

pure lion
#

woo any idea what i should do?

solemn latch
#

it still doesnt matter what you said code, get isnt a promise

small zenith
#

is the error send of undefined?

earnest phoenix
#

how do I make a database for my bot? dependency: discord.js
@cosmic agate mongodb

zenith knoll
#

ok

#

so

solemn latch
#

im not a mongodb user

earnest phoenix
#

or use mongoose

solemn latch
zenith knoll
#

.has??

#

lmao

pure lion
solemn latch
#

.fetch

earnest phoenix
#

Nope

#

Fetch the user

cosmic agate
#

Thnx

earnest phoenix
#

From Discord not from cacge

zenith knoll
#

i havnt dabbled in the arts of dmming anyone exept for message author

#

ok

#

.fetch()?

solemn latch
#

fetch is a promise, so make sure to await it

zenith knoll
#

wat

#

from discord

#

how tf

solemn latch
#

you dont use fetch on cache

#

use it on the user manager

zenith knoll
#

ok whatever i give up :P

#

thx for help

solemn latch
#

everyones giving up today

earnest phoenix
#

why give up

cosmic agate
#

and how do I set up the database? note: I'm a beginner in db

sharp thicket
#

uh how do i get the number of guilds my bot is in i kinda forgot

solemn latch
#

depends on the db

#

depends on the lib

misty sigil
#

uh how do i get the number of guilds my bot is in i kinda forgot
@sharp thicket what language and library

solemn latch
#

lol

viral iris
honest perch
#

@sharp thicket read your documentation

cosmic agate
#

mongodb discord.js

honest perch
#

Just search guilds

sharp thicket
#

@misty sigil discord.js

viral iris
#

any1 can elp with this ?

sharp thicket
#

node

misty sigil
#

what is client defined as

honest perch
#

Its i docs

sharp thicket
#

client

solemn latch
#

<guildManager>.cache.size() iirc

honest perch
sharp thicket
#

ty

misty sigil
#

client.guilds.cache.size

sharp thicket
#

i could not find that for some reason..

#

oh ty

cosmic agate
#

``

viral iris
#

can any1 help ?

sharp thicket
#

hmm

cosmic agate
#

${client.guilds.cache.size}

honest perch
#

He knows

viral iris
#

i added the the buildpack

earnest phoenix
#

@viral iris no ask to ask

#

Just ask

cosmic agate
#

How to configure my db?

solemn latch
#

the mongodb docs are great

#

covers all that stuff

cosmic agate
#

Tjnx

#

Thnx

viral iris
#

@viral iris no ask to ask
@earnest phoenix how to fix this ?

pure lion
#

i cri

#

idk what to do

#

qwp

solemn latch
#

did you contact your vps provider like i suggested?

delicate shore
#

Hey

#

Hello Fellow developers

honest perch
#

I no dev

delicate shore
#

I was wondering why am i getting this error

#

ok nvm i figured mine out

solemn latch
#

ay

#

lol

viral iris
#

did you contact your vps provider like i suggested?
@solemn latch u mean the repo /

#

?

solemn latch
#

i was talking to dice

#

🤔

delicate shore
solemn latch
#

that looks like a heroku error, which i cant comment on

earnest phoenix
#

Hi, i made the 8ball command and i have this error saying ' Cannot read property '1' of undefined'. Should I show the code

solemn latch
#

yeah

cosmic agate
#

How do I win the position Bot Developer?

earnest phoenix
#

okay

solemn latch
#

have an approved bot @cosmic agate

earnest phoenix
#
const Discord = require('discord.js');
const Client = require('discord.js')
const client = new Discord.Client();

module.exports = {
    name: '8ball',
    description: "Tells you random answers",
    execute(bot, message, args) {
        //const prefix = 'h!';
        let question = args.join(" ")

        if (!question) {
            return message.reply("Please ask a question")
        } else {
            let responses = ["It is certain.", "It is decidedly so.", "Without a doubt.", "Yes - definitely.", "You may rely on it.", "As I see it, yes.",
                "As I see it, yes.", "Most likely.", "Outlook is good.", "Yes.", "Signs point to yes.", "Reply hazy, try again.",
                "Ask again later.", "Better not tell you now.", "Cannot predict now.", "Concentrate and ask again.", "Don't count on it.",
                "My reply is no.", "My sources say no.", "Outlook not so good.", "Very doubtful."
            ]
            let Response = responses[Math.floor(Math.random() * (responses.length))]
            let embed = new Discord.MessageEmbed()
                .setTitle('8ball')
                .addField(`Your question:`, question)
                .addField(`Reply`, responses[Response])
                .setColor('RANDOM')
                //.setDescription('Your question: ' + question + "\nMy reply: " + Response)
            message.channel.send(embed)
        }
    }
}
delicate shore
#

@cosmic agate upload and get ur bot verified on top.gg

#

@earnest phoenix i said u args(1).join(" ")

cosmic agate
#

I uploaded

delicate shore
#

did u try that

earnest phoenix
#

ik i changed it xD

delicate shore
#

Get it verified

earnest phoenix
#

i tried that out

delicate shore
#

Zac

earnest phoenix
#

but didn't work

delicate shore
#

o

cosmic agate
#

Okay

delicate shore
#

@earnest phoenix why 2 clients?

#

i just noticed

earnest phoenix
#

Oh i will remove it

delicate shore
#

Remove both

solemn latch
#

one of the problems of naming your client bot

delicate shore
#

u need to define only in main file

earnest phoenix
#

okay

solemn latch
#

is that

#

which is why clients should be named client

#

:p

earnest phoenix
#
const Discord = require('discord.js');


module.exports = {
    name: '8ball',
    description: "Tells you random answers",
    execute(bot, message, args) {
        //const prefix = 'h!';
        let question = args(1).join(" ")

        if (!question) {
            return message.reply("Please ask a question")
        } else {
            let responses = ["It is certain.", "It is decidedly so.", "Without a doubt.", "Yes - definitely.", "You may rely on it.", "As I see it, yes.",
                "As I see it, yes.", "Most likely.", "Outlook is good.", "Yes.", "Signs point to yes.", "Reply hazy, try again.",
                "Ask again later.", "Better not tell you now.", "Cannot predict now.", "Concentrate and ask again.", "Don't count on it.",
                "My reply is no.", "My sources say no.", "Outlook not so good.", "Very doubtful."
            ]
            let Response = responses[Math.floor(Math.random() * (responses.length))]
            let embed = new Discord.MessageEmbed()
                .setTitle('8ball')
                .addField(`Your question:`, question)
                .addField(`Reply`, responses[Response])
                .setColor('RANDOM')
                //.setDescription('Your question: ' + question + "\nMy reply: " + Response)
            message.channel.send(embed)
        }
    }
}
delicate shore
#

It's like running 3 bots in one

#

O

solemn latch
#

your feeding response into Response into responses

#

is there any reason your doing that?

earnest phoenix
#

I can't have the same name?

delicate shore
#

O one thing i noticied as woo mentionedx

solemn latch
#

your already getting text with Response then feeding that into responses again

delicate shore
#

responses[Response] replace this with response

solemn latch
#

capital R

misty sigil
#

so just Response basically

solemn latch
#

Reponse

delicate shore
#

Yeh

earnest phoenix
#

wait lemme try something

solemn latch
#

which is why good variable names is so important

delicate shore
#

.addField(`Reply`, Response)

#

this

solemn latch
#

the codes practically unreadable because you have
response
responses
Response

delicate shore
#

or to be fancy ${Response}

earnest phoenix
#

and remove this line: .addField(Reply, responses[Response])?

delicate shore
#

no

#
                .addField(`Reply`, responses[Response])
#

change this to

solemn latch
#

just replace responses[Response]
with
Response

delicate shore
#
                .addField(`Reply`, Response)
solemn latch
#

also, is Response sounding weird to anyone else

earnest phoenix
#

okay

solemn latch
delicate shore
#

Maybe ?

earnest phoenix
#

Eee

#

So answer is better?

delicate shore
#

And btw her problem was it cannot read question

solemn latch
#

nah, just have said response so many times that it sounds weird

earnest phoenix
#
const Discord = require('discord.js');


module.exports = {
    name: '8ball',
    description: "Tells you random answers",
    execute(bot, message, args) {
        //const prefix = 'h!';
        let question = args[1].join(" ")

        if (!question) {
            return message.reply("Please ask a question")
        } else {
            let responses = ["It is certain.", "It is decidedly so.", "Without a doubt.", "Yes - definitely.", "You may rely on it.", "As I see it, yes.",
                "As I see it, yes.", "Most likely.", "Outlook is good.", "Yes.", "Signs point to yes.", "Reply hazy, try again.",
                "Ask again later.", "Better not tell you now.", "Cannot predict now.", "Concentrate and ask again.", "Don't count on it.",
                "My reply is no.", "My sources say no.", "Outlook not so good.", "Very doubtful."
            ]
            let Response = responses[Math.floor(Math.random() * (responses.length))]
            let embed = new Discord.MessageEmbed()
                .setTitle('8ball')
                .addField(`Your question:`, question)
                .addField(`Reply`, Response)
                .setColor('RANDOM')
                //.setDescription('Your question: ' + question + "\nMy reply: " + Response)
            message.channel.send(embed)
        }
    }
}
delicate shore
#

also send line where u defined args

#

and i was wrong change [] to () back

solemn latch
#

i think it was because it was trying to read response[Response] as a property

delicate shore
#

o

solemn latch
#

which should be solved now

delicate shore
#

p

earnest phoenix
#
const args = message.content.slice(prefix.length).split(" ");
delicate shore
#

which should be solved now
But tbh question comes before it and response is declared after it
and it cannot read question
But maybe i am wrong

dire obsidian
#

day 3 of html coding, anyone know how make a object to show a embed on discord?

solemn latch
#

[number]
reads as an array
[string]
reads as a property

delicate shore
#

day 3 of html coding, anyone know how make a object to show a embed on discord?
You wanna learn html or discord.js/discord.py

solemn latch
#

which i believe is why arrays are actually objects if you typeof them

delicate shore
#

ok

#

let's see if it works

earnest phoenix
#

Cannot read property '1' of undefined

delicate shore
#

@earnest phoenix worked?

solemn latch
delicate shore
#

o

solemn latch
#

guess not

delicate shore
earnest phoenix
#

No

#

Should i show you my main

solemn latch
#

can you show the part of your main where you execute your commands?

#

command.execute()

earnest phoenix
#
 const command = args.shift().toLowerCase();
    const commandFiles = `./commands/${command}.js`;
    if (fs.existsSync(commandFiles)) {
        require(`./commands/${command}.js`).execute(message, args);
    } else {
        message.channel.send("error, not found");
    }
void shadow
#

hello i need help im new to bot and stuff soo idk how to remove undefind text from embeds

solemn latch
#

.execute(message, args);
execute(bot, message, args)

#

your setting bot as message
message as args
and args as null

#

so you cant read property [1] of null

#

or undefined

slate oyster
#

Me:
if (m.getContent().orElse("").startsWith("test")) {
Eclipse:
Unlikely argument type for equals(): String seems to be unrelated to Optional<String>

I'm not even calling equals(), are you drunk Eclipse?

earnest phoenix
#

But then when i did args[0], i had an error too

void shadow
#

ohhh

#

thx

solemn latch
#

yeah

#

args is undefined

earnest phoenix
#

I have defined it in main tho

solemn latch
#

they need to be the same
.execute(message, args);
execute(bot, message, args)

#

yeah but your not passing it correctly to the function

still merlin
#

Is
if (!message.author.webhook) return; the correct way to ignore webhooks in d.js? I'd try it and see but I don't have a webhook to test

earnest phoenix
#

oh

solemn latch
#

i think its actually just
message.webhookID

quartz kindle
#

if(!message.webhookID)

earnest phoenix
#

args[0].join is not a function

still merlin
#

Thanks

solemn latch
#

can i see your updated execute function and command.execute?

quartz kindle
#

args[0] is not an array, its an item from the array

#

.join() only works on arrays

#

with [0] you're extracting an item from it, so its not an array anymore

solemn latch
#

wasnt even an array in the first place 🤷‍♂️

earnest phoenix
#

So i didn't change anything in that command.execute so it's just like

 const command = args.shift().toLowerCase();
    const commandFiles = `./commands/${command}.js`;
    if (fs.existsSync(commandFiles)) {
        require(`./commands/${command}.js`).execute(message, args);
    } else {
        message.channel.send("error, not found");
    }

i just removed 'bot' in that 8ball file

solemn latch
#

okay, then yeah. what tim said now

quartz kindle
#

thats not a good way to check if the command exists, but oh well

#

the problem is not there

#

the problem is in the command itself

#

or maybe before that code

#

where you define args

#

where do you use args[0] ?

earnest phoenix
#

In main ```js
const args = message.content.slice(prefix.length).split(" ");

quartz kindle
#

where do you put [0] on it

#

where are you using .join()?

earnest phoenix
#

Hmm not anywhere

quartz kindle
#

then its inside the command

earnest phoenix
#

Yeah just that

#

but not anywhere else

quartz kindle
#

well it has to be somewhere

#

otherwise there would be no error about .join not being a function

#

whats the full error?

earnest phoenix
#

Oh wait i have the args [0] in other command

#

But i can remove it

solemn latch
#

most errors tell you the location of the error

earnest phoenix
#

Oh it says in main and 8ball

#

TypeError: args[0].join is not a function
at Object.execute
^ this is in 8ball

#

now it wouldn't make sense to join a string, would it?

#

you would join an array instead

solemn latch
#

change args[0].join
to args.join

earnest phoenix
#

okay

#

damn it force them to think

#

uwu

solemn latch
#

🤷‍♂️ i did that at the begining

earnest phoenix
#

What does Promise { <pending> } mean?

solemn latch
#

promise is pending

earnest phoenix
#

it's a promise that's pending

#

bruh where can i install java 13 because oracle requires me to login and i cba

#

openjdk

#

kl ty

#

Oh yes it works!

#

Thanks guys

#

wait nm openjdk doesn't have j13

#

yeah

#

nm

#

they do in the archive

#

where's that

pure lion
#

wrong chan

timber mirage
#

I use Java 8

#

What library are you using

earnest phoenix
#

where's the installer

#

java 8 released 6 years ago why are you still using it 💀

timber mirage
#

A lot of people still use Java 8

earnest phoenix
#

doesn't justify you using it lol

#

oh nvm found it

#

wait what imagine using java 8

timber mirage
#

Also since Java 9 on, there were a lot of changes that break things

#

Also I've been using it for years

#

I've just been too lazy to update it lol

#

It works fine

earnest phoenix
#

it does not 💀

timber mirage
#

There is no incentive for me right now to switch

earnest phoenix
#

there have been many performance updates including GC improvements

#

and java 10 got var

timber mirage
#

I dislike non typed variables

#

Yes there okay, I've used JavaScript

#

I just don't care for them

#

Well I gtg

#

I'm at work lol, just getting off break oof

earnest phoenix
#

What's typescript

hybrid roost
#

so, how can i get channels's id, created by
GuildChannelManager.create()

rustic nova
earnest phoenix
#

cool

#

is it a good idea to use it

solemn latch
#

if you like types

earnest phoenix
#

if you like typed code, sure

#

will it break my current code

#

typescript does not interpret js files

#

you will have to convert them all to ts files, in which case, yes

#

everything will need to be typed

delicate shore
#

Hey I can't ping tim

earnest phoenix
#

interpret?

#

Hey I can't ping tim
@delicate shore f

#

goto his astro dev server

#

Then ping

#

he probably will reply faster there

delicate shore
#

@quartz kindle where r u from ?

earnest phoenix
#

Lmfao

zenith knoll
#

@earnest phoenix

earnest phoenix
zenith knoll
#

Nice

#

pricing?

earnest phoenix
#

they're technically a testing environment but they don't care if you use them for production stuff

#

pricing?
@zenith knoll free

zenith knoll
#

o

delicate shore
#

Peace out and .......
Buh-bye

misty sigil
#

real vps is better

earnest phoenix
#

but you can upgrade for more stuff

misty sigil
#

real vps much better

delicate shore
#

^

zenith knoll
#

hmm

misty sigil
#

as its 24/7

zenith knoll
#

well im flat broke

#

but

#

hey

misty sigil
#

not just one day

delicate shore
#

Discord is lagging a lot for me

misty sigil
#

then off for 3 mins

#

then a day

#

@delicate shore same, i'm noticing high ping on my bot too

earnest phoenix
#

Doesn't happen to me

#

My bot ping is 200 ms max

delicate shore
#

Oh nice to hear I'm not alone xd

earnest phoenix
#

Only go above that like once a month

honest perch
#

Whats typing

#

In ts

earnest phoenix
#

Lmfao

zenith knoll
#

star this for good luck

earnest phoenix
#

lel

honest perch
#

In being genuine

#

Rude

earnest phoenix
#

lol

delicate shore
earnest phoenix
#

we're joking

#

applying types, what else would it be

honest perch
#

Thanks for the helpfulness

earnest phoenix
#

lol

#

no problem!

delicate shore
#

Also it's 12 am here
I gotta sleep before my mom comes
Good night 🥱

#

12:30 to be exact

earnest phoenix
#

Name a user dumb enough to make two feature rich AF multi purpose bots even tho one is fine
@delicate shore is the guy

honest perch
#

@delicate zephyr I'm being bullied for being stupid in here

delicate shore
#

I utilised my time.and I wanted to see more bots on my top.gg profile

#

So yeh

delicate zephyr
#

@honest perch by who

honest perch
#

All of them

#

Big bullies

delicate zephyr
#

XD

#

if its that code dude

#

just block him

solemn latch
#

a few people have ik

honest perch
#

let color: string = "blue";

#

So like this

earnest phoenix
#

yes

honest perch
#

But what's the point

earnest phoenix
#

but ts is going to know that it's a string so you don't have to implicitly apply the type iirc

#

so you can have typed code

honest perch
#

But whats the difference

#

From just doing let color = "blue"

earnest phoenix
#

they're both the same and valid in ts

#

i don't speak quesadilla

honest perch
#

So whats the point of having types on general

cosmic agate
#

Sorry

honest perch
#

Whats the benefit

#

And difference

cosmic agate
#

Is portuguese

earnest phoenix
#

you can identify runtime issues (with types) without going into runtime, statistics have shown that typescript had reduced amount of bugs caused by results by ~15%, and typescript compiles down to "proper" javascript

#

and ESNext support

cosmic agate
#

my embed doesn't work :(: const Discord = require ('discord.js'); const embed = new Discord.MessageEmbed () .setTitle (" Commands ") .setColor (" # 15f153 ") .setDescripition (" bla " ) message.channel.send (embed);};

solemn latch
#

this is really unreadable, do you mind formatting it?

hybrid roost
#

so, how can i get channel's id, created by
GuildChannelManager.create() ?

zenith knoll
#

Smfh

solemn latch
#

you can await the .create
and then use .id on it

hybrid roost
#

Is it looks like

ch.id```?
solemn latch
#

yeah

#

probably shouldnt use var here, but yeah

earnest phoenix
#

what

#

the fuck?

#

oh

hybrid roost
#

await guild.channels.create().id?

solemn latch
#

no i mean use let, not var

quartz kindle
#

no, the first one was correct

hybrid roost
#

Oh

solemn latch
#

let ch = await guild.channels.create();

hybrid roost
#

ok

#

I'm more used to var

quartz kindle
#

it doesnt matter if you use var or let, but let gives you protection against accidentally replacing an existing value, while var doesnt

low phoenix
earnest phoenix
#

i don't know, try asking it why it not a music

solemn latch
#

generally, use let unless you need var for some reason

hybrid roost
#

@low phoenix, you have to init broadcast and dispatcher after connecting to voice

elder loom
#

voice.js

#

jk

#

i hate javascript for bots tbf

low phoenix
#

@hybrid roost also connection.play(broadcast); to connection.play(dispatcher);

elder loom
#

@buoyant orchid's bot @rocky zealoteer cat got declined for nsfw content

#

oof i pinged some random guy

#

ehm

#

sorry

#

😂

hybrid roost
sudden geyser
#

are you in an async function

sinful belfry
#

you need to use the async keyword to make the function that you're trying to use await in asynchronous

hybrid roost
#

good question

#

no

#

um

#

sorry

earnest phoenix
#

@pure saddle

topaz fjord
#

e.g

async function test() {
    await eee.eee()
}
sinful belfry
#

@earnest phoenix check the channel description please

earnest phoenix
#

Hi

sinful belfry
#

do not ping people randomly

pure saddle
#

?

earnest phoenix
#

How do I make my bot leave a specific server using eval?

sinful belfry
#

lib?

earnest phoenix
#

Djs

#

All I have is message.guild.leave()

#

Which leaves the current guild

sinful belfry
#

yeah so you need to search for the guild first so you can run the .leave() function on it

earnest phoenix
#

Wdym search for it

sinful belfry
#

all guilds are cached, so you need to search through the guild cache

#

so how are you identifying it by? id?

earnest phoenix
#

Ye

#

Last time I tried to produce a list of server's it provided an error, I don't remember the error tho. It was a couple weeks ago

sinful belfry
#

so you would do client.guilds.cache.get(GUILD_ID) to search for it

#

and then store that value, or just do .leave(); on it, to make it leave that guild

earnest phoenix
#

Okeh

#

Thank

solemn latch
#

nice ip

#

🤔

low phoenix
#

and now?

solemn latch
#

@slender thistle

#

think we got an ip leak

#

thanks

low phoenix
#

why delete?

solemn latch
#

your ip is private

solemn latch
#

dont share it randomly

low phoenix
#

is not my ip is ip from my server

#

is ovh

solemn latch
#

still private unless you have a website

low phoenix
#

okay?

solemn latch
#

so dont share it

low phoenix
#

kann i write without ip?

#

https://hasteb.in/iqebifid.cs why say no such file or directory 'C:\Users\Administrator\Desktop\BaseRadio-DC\http:\mybestprivateipwhyidontknow/baseradio_128kb'

#

better xd?

solemn latch
#

is there a file there?

low phoenix
#

is a icecast stream

#

but why will open a file?

solemn latch
#

did you ask it to open a file?

low phoenix
#

i write fs.createReadStream('And here the stream url')

solemn latch
#

fs is for reading files

low phoenix
#

ohhh

#

and what is for playing streams?

solemn latch
#

playing? probably a dispatcher?
getting? lavalink or ffmpeg or something

glossy elk
#

how can i get custom status

faint prism
#

for a bot? I've seen setting a game or a watching status

fierce stag
#

could someone help me figure out how to upload random memes from /r/dankmemes?

low phoenix
#

What ist type type for a broadcast.play mp3?

solemn latch
#

@fierce stag using the reddit api?

earnest phoenix
#

i need help making a blackjack command

solemn latch
#

whatcha need storm?

earnest phoenix
#

I need some help with a blackjack command

solemn latch
#

okay

fierce stag
#
client.on("message", async (message) => {
        if (message.content.startsWith(config.prefix + "badmeme")) {
        const api = require('imageapi.js');
 
        let subreddit = "dankmemes"
        let redditImage = await api(subreddit)
        let dankEmbed = new discord.MessageEmbed()
        .setTitle(`Random meme from r/${subreddit}`)
        .setURL(`https://reddit.com/r/${subreddit}`)
        .setImage(redditImage)
        .setColor("#0099ff")
        message.channel.send(dankEmbed)
}}); ```
#

I was using this, I found it in this server and modified it a bit, it sends images just fine but half the embeds are blank due to videos from the subreddit

earnest phoenix
#

I am making a major bot that has currency, moderation, music, much more

solemn latch
#

okay, but what specifically about blackjack do you need help with

earnest phoenix
#

anyone know why the remote ssh keeps asking me to put in my password although i have already

#

I need some code

#

Sorry

solemn latch
#

we dont give code here

opal plank
#

no spoonfeeding

earnest phoenix
#

Ok

opal plank
#

@earnest phoenix

earnest phoenix
#

thanks though

opal plank
solemn latch
#

@fierce stag so, whats
api()

#

🤔

earnest phoenix
#

Can you give me a site/vid where it teaches you how to do that?

solemn latch
#

i mean most of a blackjack command is just implementing rules

opal plank
#

i think commando or d.js guide has something along those lines

fierce stag
#

@solemn latch defined it above as imageapi.js

earnest phoenix
#

I use got for images, it is pretty simple

#

got module

#

Can someone say How long i need wait to get my bot approved?

#

3-4 weeks

solemn latch
#

4+ weeks from submission

earnest phoenix
#

Long

#

Oh

opal plank
#

this is mainly to learn what you should do, not something you should copy, which is likely outdates

earnest phoenix
#

I dont copy

opal plank
#

youtube videos are horrible for learning

earnest phoenix
#

bruh

opal plank
#

'give code'

worthy glacier
#

how do i send a custom emoji inside of a text message

solemn latch
#

honestly, just pulling up a page about blackjack rules and implementing each rule one by one is pretty straight forward

earnest phoenix
#

"give code"

solemn latch
#

<:name:id>

earnest phoenix
#

I need some code
bruh

opal plank
#

^^

#

just keep that in mind, dont copy that as its likely outdated

#

just learn from the framework

worthy glacier
#

const threehead = message.guild.emojis.find(emoji => emoji.name === "3head");

earnest phoenix
#

Only YouTube videos you should be watching about programming are ones from trusted sources like freecodecamp, CSDojo, TravesyMedia, etc.

#

And even then, you should only really watch the ones that actually teach you a language

opal plank
#

i'd always recommend docs instead

worthy glacier
#

why doesnr message.guild.emojis.find() work

opal plank
#

docs are updated constantly, youtube videos are hard to make a new on on every update

earnest phoenix
#

Yeah, that's why I'd only suggest it for actually learning a language, especially if you are more of a visual learner who needs someone to execute examples, etc.

solemn latch
#

djs 12 requires you to use cache to find @worthy glacier

opal plank
#

its kinda hard to find a good framework on github,so i sent him that video to show a basic idea of what framework he should be using

solemn latch
#

blackjack is so straightforward tho

#

each rule can just be implemented in order

worthy glacier
#

when i use cache it says cant read property find of undef

solemn latch
#

on djs 11?

#

when i go back to the djs 11 docs, its amazing how much cleaner having managers actually is(djs 11 is messy)

#

if your on v11
find doesnt take a function i dont think

opal plank
#

still wondering wtf is going on with the api webhook

solemn latch
opal plank
#

cant think of a reason manual requests work but not top.gg ones

solemn latch
#

have you done remote manual requests?

opal plank
#

yes, shivaco told me to use reqbin

#

though i did test it with postman before

solemn latch
#

inb4 your ip banned

#

for some reason

slender thistle
#

No reports of webhooks not working so 🤔

opal plank
slender thistle
#

Last blind guess. DId you make sure to press "Save"? KEKW

opal plank
#

100% did lmao

slender thistle
#

aye

solemn latch
#

have you tried using someone elses code?

opal plank
#

a wot now?

#

i just used the snippet provided in the docs, nothing that should not work

slender thistle
#

inb4 webhook auth issues

solemn latch
#

i remember him showing leviBeta as his auth

opal plank
#

should work with blank, no?

#

def upperCase

#

i might switch the auth code to just a

#

just to make sure its not lowerCase'ing it

slender thistle
#

Send me the full URL in DMs

opal plank
#

aight

earnest phoenix
#

help ?

#

SyntaxError: Identifier 'user' has already been declared
at wrapSafe (internal/modules/cjs/loader.js:1053:16)
at Module._compile (internal/modules/cjs/loader.js:1101:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
at Module.load (internal/modules/cjs/loader.js:985:32)
at Function.Module._load (internal/modules/cjs/loader.js:878:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47

summer torrent
#

read the error

solemn latch
#

you cant redeclare things

#

happy birthday

earnest phoenix
#

We can't read minds, where's the code?

Also read the error next time

#

ik

summer torrent
#

thx

earnest phoenix
#

i saw that but what do i do then

#

if im aning a user i have to use user

#

baning

#

We literally cannot help if you don't post ur code, so I'm going to go & work on my project

#

Perhaps someone else can help

#

k

#

done

#

case 'kick':

        const user = message.mentions.users.first();

        if (user) {
            const member = message.guild.member(user);

            if (member) {
                member.kick('You have been kicked!').then(() => {
                    message.reply('The has been successfuly kicked!');
                }).catch(err => {
                    message.reply('I was unable to kick the user. (Are they a higher rank? Do I have kick permssions?');
                    console.log(err);
                });
            } else {
                message.reply("That user isn\'t in this server")
            }
        } else {
            message.reply("You need to mention a user!")
        }

        break;
    case 'ban':

        const user = message.mentions.users.first();

        if (user) {
            const member = message.guild.member(user);

            if (member) {
                member.ban('You have been Banned!').then(() => {
                    message.reply('The has been successfuly Banned!');
                }).catch(err => {
                    message.reply('I was unable to Ban the user. (Are they a higher rank? Do I have ban permssions?');
                    console.log(err);
                });
            } else {
                message.reply("That user isn\'t in this server")
            }
        } else {
            message.reply("You need to mention a user!")
        }

        break;
#

see

solemn latch
#

use hastebin plox

earnest phoenix
#

^

#

wdym

#

Few things you should know if you want to ask for help btw: @earnest phoenix

  1. Post ur code into something like https://hastebin.com/about.md so its formatted & doesn't spam chat
  2. Give us traceback, & tell us the EXPECTED outcome, not just "dis don't work"
  3. Don't ask to ask

I don't want to sound rude, but you'll get much more help if you follow these 3 things

#

oh

#

cant even put there

#

it says something gone wrong

solemn latch
#

it looks like your just doing const user;
in every case.
why dont you just do const user once before the switch case?

dense patio
#

hey everyone

earnest phoenix
#

oh

dense patio
#

every time i run my bot half of the index file gets deleted

worthy glacier
#

whats the v12 replacement for message.client.users.get

solemn latch
#

also, why not just get the member
const member = message.mentions.members.first();

dense patio
#

since when is message.client a thing

solemn latch
#

always

#

users.cache.get

earnest phoenix
#

ok

dense patio
#

never used it

solemn latch
#

its really nice, no need to pass your client everywhere

dense patio
#

anyway i have a seriously bad problem

solemn latch
#

f

dense patio
#

everytime i run the bot half of the index file gets removed

#

i haven't the slightest clue why

solemn latch
#

oh man that sounds super annoying

#

psa, use git just for these kinds of weird things pandasad

dense patio
#

all i've done recently was:
separated all of my commands into subdirectories for easy organizing
change the way it gets the command files because of this (i reverted this but it still doesn't work)

#

i know i know but this is just a small bot so i didn't bother

dreamy cedar
#

how can i fix thix problem please
it always give the same result

solemn latch
#

can we see your main file?
preferably in hastebin or something.
maybe only the sections that could lead to it?
@dense patio

dense patio
#

index.js?

solemn latch
#

are you using message.mentions.x.first() @dreamy cedar ?

#

yeah

dreamy cedar
#

yes

#
let first =  message.mentions.roles.first();
let second =   message.mentions.roles.map(r=>r)[1]
message.channel.send(`  (first mention:${first})
sencond mention${second} `)
solemn latch
#

its not in order

dense patio
#

all i've changed was the way the files are read, i'll put both methods i've tried into a hastebin

solemn latch
#

which is why you shouldnt use message.mentions.x.first() unless your only expecting one mention

dreamy cedar
#

wdym

solemn latch
#

if you go to the page i linked

#

they are not ordered by the message

dreamy cedar
#

ik

#

but idk how to fix it

solemn latch
#

typically, regex

dreamy cedar
#

i tried to use it but the same problem

solemn latch
#

whatcha mean?

#

or, wanna give that example too?

dreamy cedar
#

it return the same result just with id

solemn latch
#

*te mention mention
let first = regex the first arg
let second = regex the second arg

then get the users from there

earnest phoenix
#

another error now

#

it boots

#

then

dense patio
#

i changed a couple things for readability so something might be broken but both work for their intended purpose

earnest phoenix
#

hellp

dense patio
#

the newer one worked too for my first few runs, i was trying to fix another problem when it suddenly said "unexpected end of input", and i was like what? so i reopened the file and saw that half of it was gone

earnest phoenix
#

Waiting for the debugger to disconnect...
c:\Users\jdkdbdkdb\Downloads\index.js:53
if (user) {
^

ReferenceError: Cannot access 'user' before initialization
at Client.<anonymous> (c:\Users\hfkdbsdkd\Downloads\index.js:53:13)
at Client.emit (events.js:315:20)
at MessageCreateAction.handle (c:\Users\jdjdbdh\node_modules\discord.js\src\client\actions\MessageCreate.js:31:14)
at Object.module.exports [as MESSAGE_CREATE] (c:\Users\djfbfjdbfn\node_modules\discord.js\src\client\websocket\handlers\MESSAGE_CREATE.js:4:32)
at WebSocketManager.handlePacket (c:\Users\jfbfjdbsdjf\node_modules\discord.js\src\client\websocket\WebSocketManager.js:386:31)
at WebSocketShard.onPacket (c:\Users\jfkfbdfjed\node_modules\discord.js\src\client\websocket\WebSocketShard.js:436:22)
at WebSocketShard.onMessage (c:\Users\jdjdfbgkf\node_modules\discord.js\src\client\websocket\WebSocketShard.js:293:10)
at WebSocket.onMessage (c:\Users\jdkdbfjf\node_modules\ws\lib\event-target.js:125:16)
at WebSocket.emit (events.js:315:20)
at Receiver.receiverOnMessage (c:\Users\jfdfkdbd\node_modules\ws\lib\websocket.js:797:20)

solemn latch
#

cant use user before you define it

dense patio
#

only the first part of the error messages are important btw

earnest phoenix
#

ok

solemn latch
#

if(user)
const user
will error

earnest phoenix
#

but even with member its the same thing

#

i just tested user and left it

solemn latch
#

same with member

earnest phoenix
#

yup

worthy glacier
#

const user = message.mentions.users.first() || message.author;

#

how to i update this to v12

dense patio
#

that works in v12

dreamy cedar
#

@solemn latch should i declare regx or what ?

worthy glacier
#

then why doesnt .setImage(user.avatarURL) work?

dense patio
#

replace avatarURL with avatarURL()

solemn latch
#

avatarURL is a function

#

regex probably should be declared before using it yeah

#

🤔

earnest phoenix
#

do you know anything woo

dense patio
#

send the code in question

dreamy cedar
#
 let regex = /[^<>@]/g;
    let first =  regex.args[0];
    let second =   regex.args[1];

like this ?

misty sigil
#

Woo knows quite a lot

worthy glacier
#

thanks @dense patio

dense patio
#

np

earnest phoenix
#

send the code in question
@dense patio i alredy did

dense patio
#

oh ok

earnest phoenix
#

thats y im asking woo

#

if he can help

solemn latch
#

im trying to become tim @misty sigil KEKW

earnest phoenix
#

woo do you know anything?

#

atleast 1%

solemn latch
#

i got like 3 people asking me questions 🤔

amber fractal
#

Doesnt d.js have statics for regex?

earnest phoenix
#

please help

solemn latch
#

yeah

dreamy cedar
#

@solemn latch so ._.

misty sigil
#

@earnest phoenix what do you need

earnest phoenix
#

Waiting for the debugger to disconnect...
c:\Users\jdkdbdkdb\Downloads\index.js:53
if (user) {
^

ReferenceError: Cannot access 'user' before initialization
at Client.<anonymous> (c:\Users\hfkdbsdkd\Downloads\index.js:53:13)
at Client.emit (events.js:315:20)
at MessageCreateAction.handle (c:\Users\jdjdbdh\node_modules\discord.js\src\client\actions\MessageCreate.js:31:14)
at Object.module.exports [as MESSAGE_CREATE] (c:\Users\djfbfjdbfn\node_modules\discord.js\src\client\websocket\handlers\MESSAGE_CREATE.js:4:32)
at WebSocketManager.handlePacket (c:\Users\jfbfjdbsdjf\node_modules\discord.js\src\client\websocket\WebSocketManager.js:386:31)
at WebSocketShard.onPacket (c:\Users\jfkfbdfjed\node_modules\discord.js\src\client\websocket\WebSocketShard.js:436:22)
at WebSocketShard.onMessage (c:\Users\jdjdfbgkf\node_modules\discord.js\src\client\websocket\WebSocketShard.js:293:10)
at WebSocket.onMessage (c:\Users\jdkdbfjf\node_modules\ws\lib\event-target.js:125:16)
at WebSocket.emit (events.js:315:20)
at Receiver.receiverOnMessage (c:\Users\jfdfkdbd\node_modules\ws\lib\websocket.js:797:20)

#

this

misty sigil
#

code?

dense patio
#

you don't need to send the whole thing !

misty sigil
#

the error here is quite obvious

earnest phoenix
#

then say please

dense patio
#

in the code they send, user was defined before the statement

solemn latch
#

honestly, i dont see how this code could be deleing anything. i think someone else will have to take a look @dense patio

amber fractal
#

you're trying to use user before it was defined

dense patio
#

yeah exactly

#

i'm at a loss

earnest phoenix
#

still member doesnt work

#

do you read what i say

amber fractal
#

if you just showed some code we could tell you how to fix it easier, but you're using user before it's defined

earnest phoenix
#

mg i altredy showed

dense patio
#

send it again on another website

earnest phoenix
#

case 'ban':

        const member = message.mentions.members.first();

        if (user) {
            const member = message.guild.member(user);

            if (member) {
                member.ban('You have been Banned!').then(() => {
                    message.reply('The has been successfuly Banned!');
                }).catch(err => {
                    message.reply('I was unable to Ban the user. (Are they a higher rank? Do I have ban permssions?');
                    console.log(err);
                });
            } else {
                message.reply("That user isn\'t in this server")
            }
        } else {
            message.reply("You need to mention a user!")
        }

        break;
amber fractal
earnest phoenix
#

there

amber fractal
#

you never defined user...

earnest phoenix
#

dude

#

i

#

you

misty sigil
#

also 2 const statements

earnest phoenix
#

read my messages

sonic lodge
#

@dreamy cedar that last regex you sent will match any character that is a ^, <, > or @

gentle karma
#

:(

amber fractal
#

Also that, you have const member being defined twice

sonic lodge
#

mentions are sent in the form <@userid>

earnest phoenix
#

dude

#

i

#

alredy

#

said

#

i

#

tryed

#

with

#

member

amber fractal
#

Nice spam

sonic lodge
#

please just send one message

earnest phoenix
#

no its me being mad

amber fractal
#

Yeah, we can tell you're having a tantrum

earnest phoenix
#

please just send one message
@sonic lodge ok

solemn latch
#

you are misunderstanding what your being told

slender thistle
#

keep it civil

earnest phoenix
#

ok

karmic compass
#

what your error is saying is that you are using user BEFORE you have defined it.
to solve it, move your variable definition (let user = ...) above the if statement.

earnest phoenix
#

just someone help just dont say

#

uh idk but im still here speaking

#

answer me

misty sigil
#

there’s a fix like

#

right above

fierce stag
#

people like culpas dont deserve help

earnest phoenix
#

dude

karmic compass
#

what your error is saying is that you are using user BEFORE you have defined it.
to solve it, move your variable definition (let user = ...) above the if statement.
@karmic compass @earnest phoenix

dense patio
#

lol

solemn latch
#
const user
if(user)

^ works

if(user)
const user

^^^ doesnt work

earnest phoenix
#

my head is with a big headchik thats y im mad

slender thistle
#

Multiple people helping at once doesn't help

sonic lodge
#

the program evaluates your code from tip to bottom

dense patio
#

@earnest phoenix you have "user" defined multiple times, don't you?

#

wild guess

earnest phoenix
#

no

dense patio
#

you sure?

earnest phoenix
#

yes

dense patio
#

i saw that you defined user within a command case

amber fractal
#

@slender thistle the issue is that he cant accept that the solution we tell him is the solution...

dense patio
#

you should define user at the top of your message event

#

as well as member

solemn latch
#

ill come back when things are calmed down

amber fractal
#

It shouldnt need to be repeated more than once that "cannot access before initialization" means you're using it before it's defined.

earnest phoenix
#

yeah true

#

dude ima just go away and search beter helpº

#

you'll get the same answers

slender thistle
#

The side issue is that there's too many people here trying to explain it

earnest phoenix
#

you'll get the same answers
@earnest phoenix no they are teling me the same 1000

#

times

#

yeah exactly

#

maybe that's the solution??

slender thistle
#

Just because you refuse to accept help doesn't mean it's bad

earnest phoenix
#

i alredy said i dint define user multiple times

slender thistle
#

You never defined it

earnest phoenix
#

bruh im out

#

me too

dense patio
#

alright

earnest phoenix
#

good to know

dense patio
#

let's start from the beginning

slender thistle
#

Why are you still trying if they clearly refuse to listen

dense patio
#

i'm procrastinating fixing my own problems

solemn latch
#

^^^^ me

dense patio
slender thistle
#

....

earnest phoenix
#

na leave him be

#

Some people can't even help themselves, just gotta learn when to leave it at that

#

I don't mean to be rude but just ignore him, & he'll go waste someone elses time since he refuses to listen

#

dude

#

i alredy told you i didnt define user multiple times

#

wassup :))

#

ima post the whole code and youl see

worthy glacier
dense patio
#

that's what i just said

amber fractal
#

> I didn't define user
> Tries to use it in code
> doesn't work
> surprised_pikachu.png

dense patio
#

@worthy glacier what do you mean by not register

solemn latch
#

use ids

misty sigil
#

@worthy glacier it’s a member vs a user

dense patio
#

or that

fierce stag
earnest phoenix
#

@worthy glacier cuz it is a object

misty sigil
#

and that

earnest phoenix
#

@worthy glacier console.log and u will see ur error

dense patio
#

i thought you couldn't put videos on embeds?

earnest phoenix
#

^ Same

fierce stag
#

exactly, how do I prevent my code from pulling videos? and just images

earnest phoenix
#

here

#
console.log(message.mentions.members.first())
#

meme boy

worthy glacier
#

oooh so .members is different from .users

earnest phoenix
#

Is it actually scraping the pages? Or is it using an API? @fierce stag

dense patio
#

filter for posts that are video

worthy glacier
#

thank you

#

i just had to replace with .users

misty sigil
#

oooh so .members is different from .users
@worthy glacier yea

fierce stag
misty sigil
#

Member has role data

#

more than that

#

boost data and stuff

dense patio
#

may i ask how long you've been coding for @earnest phoenix ?

earnest phoenix
#

1 month

dense patio
#

😬

solemn latch
#

@earnest phoenix you could use
message.mentions.members.first();
rather than
message.mentions.users.first();
and skip the
if(user) and const member = message.guild.member(user); lines

earnest phoenix
#

ok

#

see that the define was good

#

@fierce stag

dense patio
#
Error: Shard 0's process exited before its Client became ready.
#

this is so vague

#

it literally tells me nothing

solemn latch
#

worlds best error

dense patio
#

i reverted all of the changes i made to the command folders

#

so it's just like it was an hour ago

#

but now i'm getting this

#

oh

#

the entire index.js is empty

#

well that explains it

solemn latch
#

lmao

misty sigil
#

bruh

earnest phoenix
#

bruh

dense patio
#

oh my god

#

everytime it runs it just clears it

solemn latch
#

someones trolling you

dense patio
#

what could possibly be causing this

misty sigil
#

bruh how is that happening

dense patio
#

i haven't done anything that would even remotely touch the index file

fierce stag
#

was anyone able to look at my code and think of anything?

dense patio
#

what did you need help with?

solemn latch
#

that lib doesnt really explain whats returned completely

fierce stag
solemn latch
#

if it returns the format(mp4 gif png etc)
you should check if its an unallowed format and re-search if it is