#development

1 messages Β· Page 932 of 1

pale vessel
#

smh

earnest phoenix
#

that's..

#

not

pale vessel
#

bye

earnest phoenix
#

unless your js file is named task_queues, which is in a process folder which is in an internal folder, no that's not where the error is coming from

sterile mesa
#

My script

    if(usedCommandRecently.has(message.author.id)){
      message.channel.send('This command is still in cooldown, please be pleasant :D').then(msg => msg.delete({ timeout: 2500 }));
    }

Error:

 (node:4) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'id' of undefined  
at Object.run (/app/commands/info/stats.js:13:47)
pale vessel
#

discord.js being dogshit again

#

try console.log(message)

digital ibex
#

the code: ```js
message.channel.guild.members.filter(member => member.roles.some(role => guild.mod.roles.includes(role)))

#

ahhh, i'm so late

pale vessel
#

mod.roles is an array of ids right?

digital ibex
#

yeah

pale vessel
#

so is it working?

digital ibex
#

just like ```js
['id', 'id2'];

#

nope

pale vessel
#

it returned an empty array?

digital ibex
#

yeah

#

i gtg, i'm gonna work on it tomorrow

#

F

slender wagon
#

How i'm i supposed to connect my bot to a database

queen needle
#

wdym?

earnest phoenix
#

like you would without your bot

#

your bot has nothing to do with how you interact with your db lol

cinder dove
#

you have google.

#

@earnest phoenix remember the link you gave me? regarding the emojis

slender wagon
#

Like store data in a database for example servers list and message points

earnest phoenix
#

the emoji map?

slender wagon
#

Like mee6

earnest phoenix
#

yeah

cinder dove
#

I have trouble getting emojiDefinitions as defined. I see it creates an [] but it returns as undefined every time πŸ€” (using axios to retrieve the data from that link).

queen needle
#

@slender wagon just pick the db you want to use and look up how to use it?

fickle arch
cinder dove
#

So I get response, then response.data returns successfully, but response.data.emojiDefinitions is undefined.

slender wagon
#

Oh okay

pale vessel
#

yes zac

slender wagon
#

Do u have any suggestion?

earnest phoenix
#

you might want to download the file locally so you don't have to make a request to the file on the web all the time

queen needle
#

you could use quick.db thats a pretty good db for starting

cinder dove
#

Quick.db ew.

#

use mysql

slender wagon
#

Are those things free?

pale vessel
#

eww

slender wagon
#

Or should i pay

pale vessel
#

use postgresql

queen needle
#

cries in quick.db

earnest phoenix
#

^

#

if you're already going with an sql server db, go with postgres

pale vessel
#

you should pay

fickle arch
#

bruh time to learn how to use embed i guess.

sterile mesa
#

quick db is paid?

pale vessel
#

it won't be hard

slender wagon
#

Oh okay

sterile mesa
#

nani

cinder dove
#

@earnest phoenix yeah i did like 5mins ago, but I googled if theres a way to retrieve a local file with axios

pale vessel
#

why do you need axios

cinder dove
#

idk i'm stuck with it

pale vessel
#

bruh

slender wagon
#

I'm really new to this database thing and it seems confusing

cinder dove
#

after i tried it on api I just made a whole code for it

earnest phoenix
#

just require the file

cinder dove
#

I don't feel like clearing it out ;c

earnest phoenix
#

or import it

cinder dove
#

yeah ik

earnest phoenix
#

it's already in json

cinder dove
#

but wait, what if the emoji map updates

pale vessel
#

it won't

#

or if it does, just redownload

#

Β―_(ツ)_/Β―

cinder dove
#

might need a handler for that in case of any missed updates i guess.

earnest phoenix
#

discord doesn't update the emojis they use very often, it took them 4 years to update to the latest twemoji lol

#

and even now they're on an outdated ver

cinder dove
#

oh, good then

sterile mesa
#

the latest mod-log
how to make neko but its not nsfw
i want to add it :v

earnest phoenix
#

neko is always nsfw

sterile mesa
#

neko is cat

earnest phoenix
#

and mostly filled with nsfw nekos, make your own api and filter out the nsfw ones

sterile mesa
#

neko is cat and people use cat(neko) as nsfw
what are they doing to neko command ;-;

pale vessel
#

because weebs

earnest phoenix
#

wait is your bot the one that got denied because of the nekos.life api?

#

you shouldn't use the nekos.life api at all

#

nvm your bot wasn't denied yet

#

but still, dont use nekos.life, the best thing to do is to make your own api to have full control of its content

sterile mesa
#

nope

#

my bot is moderation and fun ;-;

#

not nsfw

earnest phoenix
#

still, if you want a nsfw-free neko command, its best to make one yourself

pale vessel
#

maybe he meant cats

#

i mean, how could a cat command be nsfw mmLol

earnest phoenix
sterile mesa
#

neko is cat but because there's so many fantasy animes with nekos character, people made nekos anime nsfw with nekos character and i hate that ;;--;;

earnest phoenix
#

thats how weebs work

sterile mesa
#

^ that's when peverts act

earnest phoenix
#

fr tho, i'm really confident that theres no non-nsfw neko apis GWossuKannaSip

white anvil
#

just don’t look at it 4head

earnest phoenix
fickle arch
earnest phoenix
#

check your code

fickle arch
earnest phoenix
#

check your code

fickle arch
#

oh right my kick code had a little code from ban function.

fast trench
#

"little code" meaning the one would that actually matters?

fickle arch
#

not really i forget how to make kick commands so i copy a little bit of ban function and expand it a little bit and it still banning people xd.

earnest phoenix
#

Anyone here uses or used Lavalink before and knows how to get rid of this issue?

fast trench
#

hmmmm go to the erela.js server and ask...best idea ever

cinder dove
#

i dont understand why I have trouble requiring a json file

#

i even tried fs readfilesync and json.parse

earnest phoenix
#

just import it like a regular module

cinder dove
#

that's what I do.

#

or did.

earnest phoenix
#

check the file path maybe?

cinder dove
#

Console returns MODULE_NOT_FOUND

#

Uh file path should be correct

#

I also tried path-ing directly to it.

earnest phoenix
#

are you trying to read the file?

cinder dove
#

requiring it.

#

also reading doesn't work, it says the file can't be found

#

Even though im 100% sure the path is correct

earnest phoenix
#

then it prob the path

#

const config = require('../../config.json');

cinder dove
#

Oh

#

My

earnest phoenix
#

are you doing it like this?

cinder dove
#

fricking

#

god

#

i think im very very very dumb

earnest phoenix
#

moment of realization emerges

#

lol

cinder dove
#

i lost

#

10 hours

#

of my day

#

to realize

earnest phoenix
cinder dove
#

i dont have my file

#

on vps

earnest phoenix
cinder dove
#

and i only run commands on my vps

#

i think im going to smash my head

earnest phoenix
#

I Am a DeVeLoPeR

#

lmfao

cinder dove
#

pepeHands

earnest phoenix
#

verified developer

cinder dove
#

Ceritified

earnest phoenix
#

discord developer pogey

sterile mesa
#

.

earnest phoenix
#

i just wanna know how you were requiring it

#

thats whats more interesting

cinder dove
#

well i couldnt require it so I tried to read the file instead

#

and parse it to json

knotty steeple
#

@oak cliff

earnest phoenix
#

big 🧠 moment

#

its always these simple things

cinder dove
#

how tf did i waste 10 hours on this

#

in 10h i did so much things to my bot

#

like yesterday

earnest phoenix
#

that you definitely dont think about because they're so obvious

#

yea dont worry i spent 2 hours to find that i was missing a semi colon...

#

i spent my career coding bad shit

cinder dove
#

I'm probably too used to only test things with my vps.

#

so i didnt realize i dont have THE JSON FILE in both locations

#

;c

earnest phoenix
#

local hosting > vps

#

Never.

cinder dove
#

I said i'm too bored to fix the mysql issues on localhost so i decided to use vps for like my whole life

earnest phoenix
#

just use something called a SFTP Network Drive

#

and you could code like you would have these things on your Drive

#

host from a usb

#

host from a samsung smart fridge pogey

#

host from a smart oven

#

even better

#

smart thermostate

quartz kindle
#

toaster

sterile mesa
#

how do i send mp4 using randompuppy

#

;-;-;-;

#

cmon someone help me

queen needle
#

so if use the command and a random person sends any message before the before the person i challenged accepts or declines it doesnt work

fickle arch
#

how to make bot activity as a elapsed time like this :
Watching Discord Bot list
Elapsed time : XX:XX.

#

i mean watching how much server the bot were in.

quartz kindle
queen needle
#

what?

sterile mesa
#

ugh i tried to search cat picture using reddit and this show up :
(node:4) UnhandledPromiseRejectionWarning: RangeError: Maximum call stack size exceeded

queen needle
#

@quartz kindle is there a problem with that

knotty steeple
#

there is

#

ur declaring instead of comparing

queen needle
#

===

knotty steeple
#

yea thats what u use

queen needle
#

thank you

earnest phoenix
#

@fickle arch the elapsed time is from rich presence

queen needle
#

when i swithced to that it doesnt work at a;;

earnest phoenix
#

but the wathing servers can be done with

client.user.setActivity(`text`, {type: WATCHING});
queen needle
#

like no errors and now it doesnt work at all

earnest phoenix
#

@sterile mesa does it even return mp4s?

fickle arch
#

@earnest phoenix where i could get the rich presence for it ?.

earnest phoenix
#

i dont think bots can have rich presence

#

you could try this

fickle arch
#

i mean how do i get timelapse for setactivity.

#

alright i'll try that

earnest phoenix
#

i have some problem with this plz help js if (message.guild.me.voice.channel.id != message.member.voice.channel.id) return message.reply("You must be in the same channel as me").catch(console.error);

#

are you trying to check if the bot and user are in the same voice channel?

#

yep

#
const voiceChannel  = message.member.voice.channel;
if (!voiceChannel || voiceChannel.id !== message.guild.me.voice.ChannelID) {
  return message.channel.send(`You need to be in the same voice channel as ${config.clientName} to use this command.`);
}
#

this should owrk

knotty steeple
#

πŸ€¦β€β™‚οΈ

#

dont spoonfeed

queen needle
#

i still have the same problem

#

if i change it to === the command doesnt work at all

knotty steeple
#

fix ur function

earnest phoenix
#

sigh2 yep u dint have to tell me the exact code but thx TsumikiTail

queen needle
#

which function?

knotty steeple
#

filter

copper cradle
#

now they're gonna say 'bUt fIlTeEr iS nOt A fUnCtIoN, iTs A vArIaBle'

earnest phoenix
fickle arch
#

why when i'm trying to make invite link for bots after i pressed authorize it always end with big X in the middle.

grizzled mango
#

I have this function for checking permissions: ```py
def is_author_authorised(ctx) -> bool:
"""Checks if message author is in an editor role"""

if (
    ctx.message.author.server_permissions.administrator
):  # allow dev or admin
    return True

return False
But it's returningnone
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'Member' object has no attribute 'server_permissions'```

#

Has it been removed in rewrite?

slender thistle
#

anything server -> anything guild

grizzled mango
#

I see

#

Couldn't find any docs on that

midnight blaze
#

I am so bad with lists. This question is so trivial, that u can not find anything good on stackflow and even in a javascript documentation, they didnt show this case.
i have this json file: "list": [{"abc":"zks","bcd":"jdiw", ... }
how should I know store "abc" and "zks" in two different variables?
My first idea:
let a = list.key[0]
let b = list.value[0]
console.log(a+b)
abczks

#

what should I change?

sterile mesa
#

Imma bad about that REEEE

copper cradle
#

@midnight blaze what are you even trying to do?

#

do you want to display them

#

or what

#

if so then you could do

#

abczks is what you get or what you want to get

#

please be more descriptive

#

because I don't get anything from that

knotty steeple
#

list[0].key

midnight blaze
#

thanks

knotty steeple
#

gets the value

midnight blaze
#

and for the other one?

#

list[0].value?

knotty steeple
#

key is whatever u want

#

so abc

midnight blaze
#

yeah, but I need both seperated

knotty steeple
#

to get the value of abc

midnight blaze
#

"abc":"zks"
one time abc and one time zks

#

in 2 different variables

knotty steeple
#

u can check Object.keys

#

idk

#

and Object.values

midnight blaze
#

doesnt that show all the keys/values?

knotty steeple
#

its an array of the keys and values

#

so like

#
const keys = Object.keys(list)
keys[0]
midnight blaze
#

ah

#

thanks

knotty steeple
#

or keys["keyhere"] works

#

replace keyhere with abc or whatever

#

it should

fickle arch
#

how do i update my repository after i'm updating the code that i used while the bot is on hosting.

astral yoke
#

Question I got

#

If I have this

#

bot.on("guildMemberAdd", (member) => { let welcome = bot.db.get(`welcome_${member.guild.id}`) if(welcome === null) { return; } bot.channels.get(welcome).send(`We have a new member arriving! It was ${member}! Have fun!`) })

#

why when someone joins, it sends the message twice

#

fixed!

copper cradle
#

good

fickle arch
#

anyone know how to convert my code into embedded for welcome message ?, or just help me figured out how to do it, here is my code

    
    const channel = member.guild.channels.cache.find(channel => channel.name === "yourchannelhere");
    if(!channel) return;

    channel.send(`your message here ${member}`)```
i'm not really good at embed.
#

i've tried with this

    .setColor('#0099ff')
    .setTitle('Welcome')
    .addField('', member.nickname)
    .setImage(member.user.avatarURL)

    member.guild.channels.get('701391792020389930').send(exampleEmbed);
    });```
earnest phoenix
#

are you on v12?

fickle arch
#

yeh.

earnest phoenix
#
  const exampleEmbed = new Discord.MessageEmbed()
    .setColor('#0099ff')
    .setTitle('Welcome')
    .addField(member.nickname)
    .setImage(member.user.avatarURL)

    member.guild.channels.get('701391792020389930').send(exampleEmbed);
    });
astral yoke
earnest phoenix
sterile mesa
#

dont you need cache before get?
--- if its not the k

copper cradle
#

can embed fields have empty spaces now?

#

did they add an auto blank space to it

#

when you don't provide anything

fickle arch
#

bruh why everytime music come end the bot auto disconnected from voice chat.

copper cradle
#

show your code

astral yoke
#

really quick question

#

is the way it works

#

[the name](the website)

#

for embed

#

or the other way around

earnest phoenix
#

yes you can

astral yoke
#

what

earnest phoenix
#

you can hyperlink in embeds

fickle arch
#

i had this trouble on my play function

    ^

TypeError [ERR_INVALID_ARG_TYPE]: The "url" argument must be of type string. Received undefined```
earnest phoenix
#

whatever you passed isnt a string

fast trench
#

Maybe he passed a kidney stone πŸ€·β€β™‚οΈ

earnest phoenix
lofty grove
amber fractal
#

it had no content

lofty grove
#

I don't understand, are you telling me?

earnest phoenix
#

yes he is

fast trench
#

Whatever field you had doesn’t have anything in it

fickle arch
#

bruh it sometimes show error because the string thingies and it sometimes don't.

earnest phoenix
#

how are you passing it?

fickle arch
#

typing video url

earnest phoenix
#

i mean show the code where you pass it

fickle arch
#

wdym on pass ?.

steel drum
#

@lofty grove you could check to see if it was a partial first

lofty grove
#

@lofty grove you could check to see if it was a partial first
@steel drum How is it going to be?

steel drum
earnest phoenix
#

@fickle arch where do you send the link?

lofty grove
fickle arch
#

just like this !play linkhere

lofty grove
#

Do I add this?

steel drum
#

some implementation of this, probably

lofty grove
#

I understood thank you.

steel drum
#

np!

earnest phoenix
#

can i see your code....

fickle arch
#

wow tf it happened again the music sometimes load and being played or sometimes the bot won't played it and shown error.

earnest phoenix
#

are you using ytdl-core?

open oracle
#

how would i make a bot that assigns roles with reactions

fickle arch
#

yeah ytdl-core.

earnest phoenix
#

show me the code where you pass the link

fickle arch
#

what do you mean on pass the link ?.

#

do you mean like this ?.

      .play(ytdl(song.url))
      .on("finish", () => {
        serverQueue.songs.shift();
        this.play(message, serverQueue.songs[0]);
      })```
earnest phoenix
#

where do you tell ytdl to use the link the user provded

fickle arch
#

because i'm not using youtubeapi for word search.

earnest phoenix
fickle arch
#

if using that you could search for example !play despacito without putting the link.

earnest phoenix
#

just use lavalink...

#

but the problem you are having is however you are getting the link

#

its not a string

#

either its undefined

#

or something else

fickle arch
#

yeah it sometimes work and sometimes don't

earnest phoenix
#

i used to use ytdl core

#

but i switched to lavalink

#

and its so much better

fickle arch
#

you replace entire code for lavalink or just replace ytdl core ?.

earnest phoenix
#

the entire code

#

cuz it uses erela.js client

fickle arch
#

oh god.

#

it could use for discord.js to right, cause i'm not used to other than djs.

#

i mean the lavalink.

earnest phoenix
#

yea

#

if you want a good tutorial, go to Anson the Developer or Menu Docs

#

they both have good videos on setting it up

fickle arch
#

oh yeah, i watched Menu Docs to.

earnest phoenix
#

are you on a vps?

fickle arch
#

yeah.

earnest phoenix
#

if you do end up switching to lavalink

#

hit me up

#

you need to do some extra steps if you plan on using it on a vps

green vale
#

How can I get the ping in Discord.js v12?

pale vessel
green vale
#

ocrap thanks

pale vessel
#

read the WHOLE guide

#

it helps

fickle arch
#

vps is the hosting right ?.

green vale
#

I read the v12 changes but I only read the changes that I thought I would need

#

woops

earnest phoenix
#

yea

#

the server you host your bot on

sick cloud
#

tried box-shadow, border and outline

fickle arch
#

is it just me or that pic is moving xd.

sick cloud
#

you

earnest phoenix
#

just you

fickle arch
#

my eyes tired watching screen for alittle bit long.

earnest phoenix
#

@sick cloud you could just crop the image

#

just a tiny bit

sick cloud
#

dbl adds it

#

no matter how much i crop it its gonna exist

fickle arch
#

oof what you used it for.

pale vessel
#

what bot id

sick cloud
#

/bot/youtube

fickle arch
#

oh.

earnest phoenix
#

is it for your bot page?

sick cloud
#

yes

pale vessel
#
#bot-details-page .bot-img {
    box-shadow: none!important;
}```
sick cloud
#

oh you need #bot-details-page

boreal latch
sick cloud
#

cool thanks

earnest phoenix
green vale
#

lol

earnest phoenix
#

haha ik someone named danny that is japanese irl too

green vale
#

1% japanese h aa ahah

#

Nah but seriously I'm Japanese but like 1% lol

earnest phoenix
#

still japanese GWworkshopAkaShrug

copper cradle
#

I'm 1% furry bc of my pfp

#

πŸ˜”

earnest phoenix
#

and i assume 99% communist?

open oracle
#

oops

copper cradle
#

this isn't the support server for any bot

halcyon ember
#

how can I make it so the message.content.startsWith function ignores capitalization?

copper cradle
#

message.content.toLowerCase().startsWith()

sudden geyser
#

you convert the content .toLowerCase()

copper cradle
#

ye

#

It wasn't spoonfeeding I swear

earnest phoenix
uneven monolith
#

Im wondering how to read DMs to my bot and if it is possible, Like if my bot receives a DM then it sends it into a channel i specify. Do you guys know if it is possible? (js)

fast trench
#

you just do a check to see if the channel is a DM

uneven monolith
#

ok, I am unsure how to do that, I will experiment a bit and if i cant figure it out i will ask for assistance again. Thank you

fast trench
#

let me get a link for you

earnest phoenix
#

Check the channel type

fast trench
#

Check the channel type
@earnest phoenix I legit just told him to and he doesn't know how

#

@uneven monolith that link is for you

uneven monolith
#

Ok, Thanks

low wasp
#

if(<message>.channel.type == 'DM')

fast trench
#

no spoonfeeding...they won't learn

low wasp
#

its not

uneven monolith
#

I was not asking for the answer i was asking if it was possible

earnest phoenix
#

Yes it is

#

How can i make a server top members discordjs v11

#

Huh

uneven monolith
#

ok, good sign. I wrote what i think could work and when i typed a message to the bot in a DM it had an error so im on the right path.

earnest phoenix
#

Def

uneven monolith
#

It works, This is what i got

#

Im gonna add some things like who sent it and things like that

#

Thank you guys

magic jackal
#

@uneven monolith pogU

earnest phoenix
lusty quest
#

any idea how to use this timestamp : 2020-05-18 00:00:00 in a mysql query? tryed to set is as a string but for some reason it only gets the time in the string WHERE timestamp = "${date}"

#

tryed to set it as '${date}' but the error persists

sterile mesa
#

Don't we need cache.get in v12?

torn nebula
#

you need

earnest phoenix
#

you are definied date? (var date =)

mossy vine
#

okay so in mongodb i have the following document structure {id: 1234, nodes: [{from: 1, to: 2}, {from: 2, to: 1}]} how could i query the node objects based on only the to or from value?

pale vessel
#

do you expect to get an answer here

#

never used mongo but can't you filter it or something

mossy vine
#

yes i am expecting an answer thats why im posting, and i could filter but that requires grabbing all values and then filtering through them with code, and im wondering if it can be done with just 1 query

earnest phoenix
#

How can I Get my bot verifyed

#

?

#

How can I Get my bot verifyed
||Ping me if you know how||

pale vessel
#

are you sure you can't filter in the query? @mossy vine

mossy vine
#

thats what im asking (β•―Β°β–‘Β°οΌ‰β•―οΈ΅ ┻━┻

pale vessel
#

try reading the docs smh

mossy vine
#

i did that

delicate zephyr
#

@green kestrel can you run -verifybot for @earnest phoenix

earnest phoenix
#

what?

tight plinth
#

brain have a high ping

green kestrel
#

lol sure i'll get right on it

pale vessel
#

1000000000000ms

green kestrel
#

fact of the day, ping times for probes on mars are measured in minutes.

delicate zephyr
#

didnt even run the command

earnest phoenix
#
let target = message.mentions.users.first();

          const kembed = new Discord.MessageEmbed()
          .setAuthor(`${message.author.username} kiss ${target.username}`, message.guild.iconURL)

error

Cannot read property 'username' of undefined

torn nebula
#

no one mentioned

earnest phoenix
#

i mention

#

and same error

slender mountain
#

looks fine to me

#

probably isnt an issue with what you are showing us

#

Β―_(ツ)_/Β―

pale vessel
#

no

#

it's already a user

#

it's not mentions.members.first()

slender wagon
#

is mongodb good for start?

frail ocean
#

I'd say it depends for what you'd wish to have a database for, there are many advantages and disadvantages for many databases.

earnest phoenix
#

I solved that but idk how but now i did a

if(target) return message.channel.send("mention someone");

but this doesn't send anything if i don't mention someone

any idea?

slender wagon
#

oh well actually i just need a good track for the servers that my bot is in

#

cuz the log console is annoying

torn nebula
#

!target

earnest phoenix
#

@torn nebula even with ! is same thing

frail ocean
#

oh well actually i just need a good track for the servers that my bot is in cuz the log console is annoying
@slender wagon I'd just make it so in a channel you can log, using a guild added event, rather than having to use a database, and paying for upkeep depending on what you use.

slender thistle
#

@mossy vine Doesn't findOne accept filter JSON

slender wagon
#

oh yeah i thinked about that

#

but then i might add some other stuff that will for sure need a db

#

like points tracking for a specific game or something similar to that

frail ocean
#

Yeah that'd be a good use for a DB however you don't wanna waste storage to track guilds unless your saving data for the guilds, ie prefix.

mossy vine
#

@slender thistle yes but how do i filter for that

slender wagon
#

oh yeah right

#

thank you!

slender thistle
#

findOne({node: [blah]})

#

unless I am misunderstanding the question

mossy vine
#

but i only know the from or to value

#

and i need to find nodes based on that

slender thistle
#

search for {node: [{from: 1}]}

mossy vine
#

i guess filtering in my code rather than in the query would be better

thorny meteor
#

How to check a given user id is fake or real?

smoky spire
#

you can try to fetch the user from the api

balmy knoll
#
^^^^^^^^
SyntaxError: Unexpected identifier

I got this error in my console. [discord.js] Can someone help me to fix?

torn nebula
#

syntax error

earnest phoenix
#

recheck your syntax

frail ocean
#

function syntax is incorrect.

#

Look up javascript function.

thorny meteor
#

you can try to fetch the user from the api
@smoky spire wdym?

frail ocean
smoky spire
#

@thorny meteor if the user id isn't valid, the api won't return a user if you try to fetch it

pale vessel
thorny meteor
#

so i use a catch?

rugged flare
#

Bonjour, je voudrais savoir comment mettre en status "regarde (...) messages" en fonction du nombre de messages sur les serveurs ou mon bot est ?

pale vessel
#

minimod michael

thorny meteor
#

So
i just d oclient.users.cache.get(id).catch()?

pale vessel
#

yes

#

wait

#

what are you trying to do

smoky spire
#

getting from cache isn't fetching from the api

thorny meteor
#

How to check a given user id is fake or real?

pale vessel
#
let real = false;
if (client.users.cache.get(id)) real = true;```
#

that

#

idk

#

that seems correct

smoky spire
#

client.users.fetch(id)

#

returns a promise

thorny meteor
#

ok

pale vessel
#

ah fetch

still merlin
honest perch
earnest phoenix
#

the user is not cached

pale vessel
#

just use fetch

honest perch
earnest phoenix
#

you cant... just copypaste code from the sample and expect it's going to work

#

read the text above shiny colorful code blocks

pale vessel
#

maybe guild is actually undefined

honest perch
#

wait, this only works on v12 right

pale vessel
#

then upgrade

#

you need to soon

#

now's the best time

honest perch
#

what are the embeds in v12

#

what was even the point of changing them wtf

frail ocean
#

MessageEmbed iirc but check the v11 to v12 upgrade guide.

honest perch
#

thanks, found the guide

pale vessel
#

replace feature one by one

earnest phoenix
#

i mean

#

it's a good change

pale vessel
#

yeah because you can specify dimensions and format

tight plinth
#

^

pale vessel
#

managers are good to because they keep things in one place

#

and here i am using eris

tight plinth
#

and i am still not

pale vessel
#

eris is cool tho

tight plinth
#

music sucks but ye

robust moth
delicate zephyr
#

do

#

\:emoji:

#

make sure bot has access to that emoji

#

and bang

robust moth
#

Ok

still merlin
#

ok ty

earnest phoenix
#

Whats wrong with the code ?

#

If there isnt any error

torpid juniper
#

can you just try and manually do it

#

instead of using dblapi.js

earnest phoenix
#

manually?

pale vessel
#

that's how wrong your code is if it has no error and it's still not working

torpid juniper
#

yes

#

use something like node-fetch or axios

earnest phoenix
#

How to do it manually

torpid juniper
#

but before doing that

#

do dbl.on('posted', () => console.log('stats posted'));

#

that'll tell you if its actually posting or not

earnest phoenix
#

Ahhhh

#
const DBL = require("dblapi.js"); const dbl = new DBL('Your top.gg token', client); // Optional events dbl.on('posted', () => { console.log('Server count posted!'); })
#

This is all i need right?

torpid juniper
#

yes

#

also the library automatically posts it

#

so you dont need to do it yourself

tight plinth
#

^

earnest phoenix
#

Ok i'll paste this in ready event and try again

#

but how much time does it take to show the count?

torpid juniper
#

nononononononnonon

earnest phoenix
#

Or no time?

torpid juniper
#

put it at the top of your bot file

#

or wherever you're dealing with it

earnest phoenix
torpid juniper
#

and it's instant

#

the fact it's not showing up means that either:

  • the library is screwed
  • your token is wrong
earnest phoenix
#

My token is absolutely correct

#

i checked it thrice

torpid juniper
#

i'm not even sure how you got the token if you're not owner of the bot

earnest phoenix
#

my frnd is the owner

#

I wrote the whole code for him

#

He gave me the token

tight plinth
#

u sure the token works tho

torpid juniper
#

why doesnt your friend add you to the bot

#

that would literally make everyone's life easier

tight plinth
#

^

earnest phoenix
#

lemme recheck the token

#

But is my code incorrect in any way?

torpid juniper
#

it shouldnt be

earnest phoenix
#

except the log line

torpid juniper
#

dont have the setTimeout though

#

the library does that

tight plinth
#

how do you chekck the token

torpid juniper
#

@tight plinth post to it i guess?

#

idfk

#

with it*

#

anyway why can't you show me the bot page for this bot

#

it's public so i don't see a problem

earnest phoenix
#

The token is correct

#

The package is screwed

torpid juniper
#

then do it manually with a http lib

earnest phoenix
#

Btw dbl.postStats is necessary?

#

Cuz i dont see it on api docs

#

Oh its down

#

But is it necessary?

#

My whole code is correct still it doesnt work

#

Idk why

#

Who made that package

#

Pls recheck it dude

boreal linden
#

guys who can help me to program a bot in js?

turbid bough
#

you don't have to use postStats, but there isnt a reason to not to if you are using the library anyway

earnest phoenix
#

Discord.py
Does someone know how to fix this error? I use praw here

modest maple
#

yeah

#

give it the param lol

slender thistle
#

Why is say a parameter

modest maple
#

btw ur code is fucking old a shit

honest perch
#

currently upgrading to v12 and im getting this error fn.bind is not a function

modest maple
#

its a awful mix of d.py 1.x.x and 0.0.x

earnest phoenix
#

@modest maple can you tell me how to give it the β€œparam”?

turbid bough
#

use snipping tool lol

earnest phoenix
#

And i just started today so i bet it is old as fuck because i have not got much knowledgr

modest maple
#

!command arg1 arg2 arg3

#

etc...

clear wraith
#

I am having this error... v Error: Could not locate the bindings file. Tried:
What is the problem?
I did not have this error before i went to bed last night.

modest maple
#

or just straight up remove say

earnest phoenix
modest maple
#

not like youre using it

rain jacinth
earnest phoenix
#

So i just keep client?

modest maple
#

no

turbid bough
#

there is no ffmpeg module

modest maple
#

fucking get rid of the old shitty code

slender thistle
#

Remove say from function parameters

modest maple
#

and dont copy paste next time

rain jacinth
#

@turbid bough I don't want it..

turbid bough
#

then remove it

rain jacinth
#

how

earnest phoenix
#

No need to be toxic

turbid bough
#

remove it on BasePlayer.js

rain jacinth
#

Bruh what?

turbid bough
#

but you are using it on many other places too

#

??

rain jacinth
#

???

turbid bough
#

you don't want to have ffmpeg you said

rain jacinth
#

yeah I don't

clear wraith
#

Error: Could not locate the bindings file.
???

earnest phoenix
white anvil
#

you are trying to set the activity before the client has logged in

rain jacinth
#

@turbid bough yeah I don't want it at all.

white anvil
#

put that code in the ready event

earnest phoenix
#

nice i go try this thanks

turbid bough
indigo cloud
#

how do i publish my bot

slender thistle
#

-faq 1

gilded plankBOT
rain jacinth
#

@turbid bough i'm very confused...

desert sparrow
slender thistle
#

Your code is trying to load ffmpeg

still merlin
#

I have a discord.js question, How would I display the first argument of a message, Would it be ("my text here") + (args[1])

turbid bough
#

you are trying to require(ffmpeg) which you don't have

#

though, you seem to need it though according to your script names

#

soo, pip install ffmpeg

rain jacinth
#

I don't want the ffmpeg tho..

turbid bough
#

oh wait thats python

honest perch
#

what does fn.bind is not a function mean

turbid bough
#

any reason?

rain jacinth
#

I just don't want ffmpeg..

turbid bough
#

your bot seems to depend on it though

rain jacinth
#

So i'm gonna need to re download it...

honest perch
#

you will need ffmeg

rain jacinth
#

Great..

#

This is fantastic..

turbid bough
#

whats wrong with ffmpeg lol

honest perch
#

^

#

if youre going to fork a bot you will need to download the packages

rain jacinth
#

I don't like it and idk the purpose of it...

turbid bough
#

voice

rain jacinth
#

Well i'm just going to re install ffmpeg

honest perch
#

run npm i

turbid bough
#

A complete, cross-platform solution to record, convert and stream audio and video.

rain jacinth
#

@honest perch already did..

#

Before

#

Before i deleted it

honest perch
#

then do npm i ffmpeg

quartz kindle
#

ffmpeg is a media transcoder, it is required for voice functions in discord.js in order to convert audio into something discord understands

still merlin
quartz kindle
#

you slap

still merlin
#

my code is: client.on("message", (message) => {
let args = message.content.substring(prefix.length).split(" ");
switch (args[0]) {
case "slap":
message.channel.send("You slap");
+args[1] + "!";

  break;

}
});

honest perch
#

i dont know, ask your self

turbid bough
#

"i dont want discord.js cause i think it might be bad"
"btw how do i make discord bot"

quartz kindle
honest perch
#

thaun do you use djs?

quartz kindle
#

thats what you're sending

turbid bough
#

no

honest perch
#

fair enough

still merlin
#

i also have

#

+args[1] + "!";

honest perch
#

no

languid dragon
#

is DAPI being slow for anyone?

quartz kindle
#

no you didnt

white anvil
#

api is fine for me

honest perch
#

"you slap" + args[1] + "!"

#

iirc

quartz kindle
#

.send(everything inside here will be sent)
everything here has nothing to do with sending

turbid bough
#

im more talking about when he tried to remove ffmpeg when his scripts has "voice" in his scripts and folders.

still merlin
#

oh thanks

#

I'm so smart sarcastically mumbles

honest perch
#

tim do you use djs by anychance lmao

quartz kindle
#

yes

rain jacinth
#

@turbid bough so i need to re download it now?

turbid bough
#

yes?

rain jacinth
#

Ok

turbid bough
#

idk just npm install ffmpeg

honest perch
#

aha, im upgrading to v12 and im getting this error on my mute cmd fn.bind is not a function

rain jacinth
#

I did that, do i need to do that again...

quartz kindle
#

v12 requires node.js v12 or higher

rain jacinth
#

Don't i need to download it from the website.?

honest perch
turbid bough
#

if you already have done it you don't need to do it again when you already have it

honest perch
#

already has node v12

quartz kindle
#

do console.log(process.version)

rain jacinth
#

Yeah but i just need to download it from the website now..

turbid bough
#

when you install it with npm it already is installed on your workspace

#

uh, idk

#

do you need to install it on the whole os too to make it work when you have the library?

honest perch
#

logs as v12 too

#

it worked before

quartz kindle
#

show the full error

earnest phoenix
#

I use praw to fetch an image from a subreddit but i dont get it. Im beginner python because i was ready for a new challenge so please dont be toxic

honest perch
rain jacinth
#

Idk, i just copied a tutorial on how to download ffmpeg and i had to download it from the website first

quartz kindle
#

whats mute.js line 40?

turbid bough
#

you are missing an argument in say()

honest perch
quartz kindle
#

that way of using .find() was removed

honest perch
#

oh so what is it now lmao

slender thistle
#

@earnest phoenix Show me your command function

#

Why do you have a say argument there if you're not using it

quartz kindle
turbid bough
#

also, please do not take a picture with your phone to show code

earnest phoenix
#

This is a photo before i added the print function @slender thistle sorry for that

turbid bough
#

i barely see how that relates to the error

honest perch
#

can you not just win shift s

earnest phoenix
#

Oof

#

Well i could but i have an older laptop so it takes ages to do that

turbid bough
#

what about the computer you use now?

indigo cloud
#

i get this error message:Please enter at least 300 characters excluding special characters in your detailed description. Add your commands. Spaces or empty spaces are not counted.

#

am i missing something?

obtuse meteor
#

anybody knows of a discord bot that would ping role X when a role Y is manually set to a player?

turbid bough
#

yes, probably the one you are not showing

#

like your detailed subscription

indigo cloud
#

the github?

turbid bough
#

300 characters for github link?

indigo cloud
#

no

turbid bough
#

Please enter at least 300 characters excluding special characters in your detailed description.

indigo cloud
#

i dont want to make the bot script released

quartz kindle
#

the detailed description / long description is the black bar

slender thistle
#

@earnest phoenix Show me the function

quartz kindle
#

write information about your bot in the black text area

slender thistle
#

that has an argument say

indigo cloud
#

ok

earnest phoenix
slender thistle
#

What is that loop there for anyway

turbid bough
#

where is line 500

slender thistle
#

Where's the rest of your code

#

Anyway, you only need ctx

#

for that command you don't need a say argument

turbid bough
#

for loop is probably to loop trough an array of submissions

slender thistle
#

limit=1 could probably just access the first element if it's a list

honest perch
#

if (!message.member.hasPermission("MUTE_MEMBERS")) return message.channel.send("You need the MUTE_MEMBERS permission!"); would this still work in v12?

earnest phoenix
#

oh okay well now it prints the url to the console obv but how do i make the image post to the channel i did the command in

turbid bough
#

i think his issue is on an another side that he thinks it is

topaz fjord
#

I don't know, check Misly.

earnest phoenix
#

just await ctx.send(submission.url)?

topaz fjord
#

the docs exists for a reason

slender thistle
#

that sounds about right

#

if submission will have a url property, yeah

#

But something is telling me you are most likely getting a dictionary, but... catshrug

turbid bough
#

use the debugger to view what the info you are getting

slender thistle
#

or just print it

turbid bough
#

printing is for normies, debugging is for chads

slender thistle
#

Banned for wrong opinion

still merlin
#

My bot powers on perfectly and when I type my <rip command (sends a rip image) my bot goes offline and my terminal says ReferenceError: MessageAttachment is not defined

#

when I checked the discordjs docks after that works and it has MessageAttachment in it

lyric mountain
#

two possibilities:

#

either you're defining the messageattachment the wrong way OR the image does not exist/have wrong path

turbid bough
#

i think you are looking for Message.attachments

#

not Message.MessageAttachment

earnest phoenix
#

s

turbid bough
#

-dotpost

earnest phoenix
#

Nah that's -spost

turbid bough
#

--spostpost

nocturne grove
#

Hey. I've got a promise inside a promise. If that inner promise gets rejected, I want the outer promise to complete, so my code can continue. How?

quartz kindle
#

show code

delicate zephyr
#

you should be handling the rejection

#

that or use async/await

earnest phoenix
#

limit=1 could probably just access the first element if it's a list
@slender thistle yeah i noticed that but i cant figure out how to limit it to only send 1 but not only the top from the list if you know what i mean

delicate zephyr
#

for example
non-async

const a = () => {
  return new Promise((resolve, reject) => {
    if(1+1 === 2) resolve(2)
    else reject('Wrong')
  })
}

a().then((n) => { 
  console.log(n) //returns 2
}).catch((e) => {
  console.log(e) //returns 'Wrong' 
})

or async

const a = async () => {
  if(1+1 === 2) return 2
}

const b = await a().catch(console.log) 
nocturne grove
#

wtf is Discord doing

turbid bough
#

nothing

nocturne grove
#

I can't send a message

turbid bough
#

i see it

nocturne grove
#

well I can with this one, but not my code

turbid bough
#

idk your bot is broken i guess

nocturne grove
#

ffs

#

idk your bot is broken i guess
@turbid bough because my bot is broken I can't send a code block here? lol

#
async log(guild, message, logType, messageAddition) {
        return await new Promise((resolve) => {
            con.query(`SELECT * FROM logpreferences WHERE guild_id = ${guild.id}`).then((logPreferences) => {
                con.query(`SELECT * FROM serdverdata WHERE guild_id = ${guild.id}`).then((serverData) => {
                    if (!serverData[0] || serverData[0].logchannel == 'off' || serverData[0].logchannel == 'custom' && [0, undefined].includes(logPreferences[0][logType[0]]) && [0, undefined].includes(logPreferences[0][logType[1]]) && [0, undefined].includes(logPreferences[0][logType[2]])) return resolve();
                    const logChannel = guild.channels.cache.get(serverData[0].logchannel_id);
                    if (!logChannel) {
                        this.adminLoop(guild, messageAddition, 'Log channel deleted', 'My log channel was deleted', 'I deleted it from my database and turned logs off.', message);
                        insertData('serverdata', 'logchannel', guild, 'off', undefined, 'logchannel_id', null);
                        return resolve();
                    }
                    if (!logChannel.permissionsFor(guild.me).has(['SEND_MESSAGES', 'VIEW_CHANNEL', 'EMBED_LINKS'])) {
                        this.adminLoop(guild, '', 'Cannot send message in log channel', `I am not able to send my log in ${logChannel}`, 'I turned logs off for now. Make sure I have \'Send Messages\', \'Read Messages\' and \'Embed Links\' permissions in that channel. Then, reactivate logs.', message);
                        consoleLog('off automatically', guild, 'setlogs', 'not enough perms, updaterolecounter function');
                        insertData('serverdata', 'logchannel', guild, 'off');
                        return resolve();
                    }
                    logChannel.send(message);
                    resolve();
                });
            });
        });
    },```

The con.query is the other promise
turbid bough
#

oh i thought you meant your code in your bot was broken

nocturne grove
#

Tim blocked me πŸ€”
wut

#

oh no

#

I wanted to mention Tim

#

@quartz kindle

#

oh now I can

earnest phoenix
#

does someone know how to limit praw from sending 500 messages but still keeping the messages random

#

what

#

okay so do you know praw?

lyric mountain
#

what's praw?

earnest phoenix
#

python reddit api wrapper

lyric mountain
#

why does it send 500 messages?

earnest phoenix
#

because of the limit

unique nimbus
#

bruh

#

Maybe change the limit

earnest phoenix
#

bruh

#

then it only shows the top post of the list

#

so no randomization

#

have you tried... not for looping to send every single entry

unique nimbus
#

Then randomize urls

#

store it in cache

#

get a random one

#

ez

earnest phoenix
#

okay chill im new to python

#

lol

unique nimbus
#

bruh

earnest phoenix
#

it's a logical flow, it isn't language related lol

turbid bough
#

every submission
send message

unique nimbus
#

I think that was taken from somewhere

earnest phoenix
#

oh,idk

#

i dont know how to set looping to not send every message @earnest phoenix

unique nimbus
#

bruh

#

Is this your first project?

earnest phoenix
#

;-;

#

first python yes

#

have you ever taken a cs class

unique nimbus
#

Do you know how to use if and else

#

Do you know what the error messages means

earnest phoenix
#

sort of

turbid bough
#

you should definetly not make a bot as your very first project

unique nimbus
#

I will say this. Discord Bots are not beginner friendly

earnest phoenix
#

guys i know but i need this for my small server

unique nimbus
#

Then invite an already made one?

#

There is many reddit bots

earnest phoenix
#

do i really need to explain this? i only asked for help for this one small command

unique nimbus
#

and you asking very simple questions

#

which beginners should know

#

I made a reddit command with praw

#

Made it get top 20 hot

#

randomized

earnest phoenix
#

cool now i would like to know how i would do that

unique nimbus
#

Well to do that

#

you need to use random

quartz kindle
#

@nocturne grove it would be much easier to convert your code to async/await syntax

unique nimbus
#

store data in a list

turbid bough
#

i thought he wanted to get the top?

unique nimbus
#

then randomized it

#

@turbid bough Then he done it wrong. it would be .top()

earnest phoenix
#

can anyone tell me what the hell this is?

(node:3343) UnhandledPromiseRejectionWarning: FetchError: request to https://discordapp.com/api/v7/gateway/bot failed, reason: getaddrinfo EAI_AGAIN discordapp.com
    at RequestHandler.execute (/home/dc/chinochan/node_modules/discord.js/src/rest/RequestHandler.js:107:21)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:3343) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:3343) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
unique nimbus
#

which is shown in docs

earnest phoenix
#

isnt that a little bit of a detour?

unique nimbus
#

what is a detour

earnest phoenix
#

to first store everything and then randomize?

turbid bough
#

yeah you need to learn beginner python

unique nimbus
#

Do you want to know how much lines my Reddit Command alone has

earnest phoenix
#

no

quartz kindle
#
async log(...) {
  let result1 = await con.query(...).catch(error => null)
  let result2 = await con.query(...).catch(error => null)
  if(result1 && result2) {
    // do code here
  }
}
``` @nocturne grove
earnest phoenix
#

i only asked for help not to be roasted

unique nimbus
#

70

#

Not trying to roast you

nocturne grove
#

@quartz kindle I did that but it didn't wait for it to fully complete

unique nimbus
#

I am telling you to learn

nocturne grove
#

will try again tho. Thanks @quartz kindle

turbid bough
#

whoa, you saying that you need to learn python is a roast?

unique nimbus
#

We all start from somewhere

earnest phoenix
#

exactly

unique nimbus
#

My first python script was a calculator

#

I learnt how to use if else inputs print math

#

and other nonsense

#

including errors

earnest phoenix
#

okay okay

unique nimbus
#

I am not trying to roast you

#

I am trying to guide you to the right direction

turbid bough
#

im saying if you don't know how to store a variable, then obviously you are trying to do something you clearly dont understand.

unique nimbus
#

^

earnest phoenix
#

bro i only need this for my server and then i wont bother to do python ever again. i do not have the time to take a long course and make calculators to practice

lyric mountain
#

we could give you the fish

turbid bough
#

yeah, you kinda shouldve gone to fiverr instead

lyric mountain
#

but it's better if we show you how to fish

unique nimbus
#

or invite an already made reddit bot

#

and that would mean you won't ever need to host it

earnest phoenix
#

like i said and i will say once again, i need this for my server and will never bother to use python again. please stop telling me i need to learn because i only asked for help. i got every other basic in this bot already done

#

just this small command

turbid bough
#

yeah i don't wanna spoonfeed much

unique nimbus
#

We won't spoonfeed

#

Coding takes time to learn

earnest phoenix
#

holy shit

unique nimbus
#

Its learning, learning and learning

earnest phoenix
#

do you even understand what i told you

nocturne grove
#

@quartz kindle wait lol now it does work to use await instead of a whole promise. Thanks!

unique nimbus
#

Why

#

are you making a REDDIT COMMAND when you cant DO VARIABLES

vivid crescent
turbid bough
#

obviously he don't appreciate our help

unique nimbus
#

Are you understand US

earnest phoenix
#

i do

#

i know variables just not how to implement them in this reddit command

unique nimbus
#

I told you how to do it already

#

I told you that

turbid bough
#

yeah then you don't know lol

unique nimbus
#

We ain't giving you code

vivid crescent
#

you are looping through 500 reddit posts and sending them all

unique nimbus
#

@vivid crescent Don't spoonfeed

vivid crescent
#

why are you surprised its sending 500 messages

unique nimbus
#

Tell them how to do it

#

and fix it

vivid crescent
#

I didn't tell them how to fix it or send any code

unique nimbus
#

ye

earnest phoenix
#

i am not surprised it is sending 500 posts im just asking how to limit that but still keeping it randomized

unique nimbus
#

you choose limit=500

vivid crescent
#

google how to exit a loop or something

unique nimbus
#

limit=10

#

makes it only 10

turbid bough
#

store the result in a variable.

unique nimbus
#

yes

turbid bough
#

then get a random integer

#

from the length of that result

#

then send that result from that index

lyric mountain
#

what about Math.random()?

turbid bough
#

that would work

vivid crescent
lyric mountain
#

limit=random(1, 500)

#

something liek that

vivid crescent
#

no

turbid bough
#

??

#

why do you want a random amount?

vivid crescent
#

it would be ..limit(...)[a random number between the first index and the final index]

earnest phoenix
#

i dont want a random amount

turbid bough
#

isnt it you want to choose a random post within that 500?

earnest phoenix
#

yes

lyric mountain
#

so you gotta store the 500 subreddits in an array and get a random index for that

#

not inside a for

turbid bough
#

yeah thats what i already said

vivid crescent
#

Yes

unique nimbus
#

I done mine in a for loop to get a range to then get the url

#

ez

#

well I can't describe well

turbid bough
#

uuh, for loop just to get range?

#

not just .length?

unique nimbus
#

meh

#

I made this ages ago

#

and I also forced to get comments

#

all the comments

#

which takes more loops

turbid bough
#

πŸ‘€

lyric mountain
#

omfg

unique nimbus
#

Its a mess I need to fix

earnest phoenix
#

i do not want to store subreddits just want it to send a random image from a subreddit @lyric mountain

vivid crescent
#

Yeah so why waste more time looping unnecessarily πŸ‘€

turbid bough
#

@earnest phoenix omg store it in a variable lol

vivid crescent
#

@earnest phoenix we have told you how

unique nimbus
#

bruh

#

We ain't giving you the code

turbid bough
#

MAKE A VARIABLE

lyric mountain
#

i do not want to store subreddits just want it to send a random image from a subreddit @lyric mountain
store πŸ‘ in πŸ‘ a πŸ‘ variable (array)

earnest phoenix
#

idfk how to do that because if i would i wouldnt be here anymore

turbid bough
#

okok

unique nimbus
#

bruh

turbid bough
#

can you tell me how to make a variable?

unique nimbus
#

Yes tell us

vivid crescent
#

imagine googling

earnest phoenix
#

<name> = <something>

turbid bough
#

okok

vivid crescent
#

yes

turbid bough
#

where do you put the result in

#

in name?

#

or in something?

earnest phoenix
#

no

#

something

turbid bough
#

ok good

#

now that you did that, you managed to store a variable

earnest phoenix
#

hmm if you explain it like that

unique nimbus
#

πŸ˜”

#

Google is amazing isn't it

vivid crescent
#

Gotta be fast to get those SO links πŸ‘€

#

This one fast link giveaway

earnest phoenix
#

peter please stop being toxic because it really doesnt help me learn anything

#

please help me ```js
(node:3654) UnhandledPromiseRejectionWarning: FetchError: request to https://discordapp.com/api/v7/gateway/bot failed, reason: getaddrinfo EAI_AGAIN discordapp.com
at RequestHandler.execute (/home/dc/chinochan/node_modules/discord.js/src/rest/RequestHandler.js:107:21)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:3654) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:3654) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

lyric mountain
#

so put that reddit.subreddit("dankmemes+memes").hot(limit=500) in a var