#development

1 messages ยท Page 350 of 1

earnest phoenix
#

beutiful

languid dragon
#

it used to show my servers etc

#

ty i designed it myself LOL

long moon
#

considers using an emoticon as the prefix

languid dragon
#

it would help a lot of it was easy to execute commands EYES

earnest phoenix
#

just started a web design / desktop app project yesterday

long moon
#

x,-Ddostuff

earnest phoenix
#

i just noticed today the similarities @languid dragon to discord

languid dragon
#

what simularities

earnest phoenix
#

layour mostly

#

when i began drafting the layout

#

lol

languid dragon
#

oh gg

earnest phoenix
#

i was like

#

wait a second....

languid dragon
#

i made my own console for @tawdry relic

#

wanna see?

earnest phoenix
#

you should see the css for it

#

its disgusting

languid dragon
earnest phoenix
#

like

#

i mean

#

litterally

#

disgusting

#

hol up

languid dragon
earnest phoenix
#

sexy

long moon
#

Hey, I am confused about client IDs. What do I put there?

earnest phoenix
#

omg and should see the load screen how i make that

#

all i do is halt up the program more

languid dragon
#

your client ID can be found on the discord developers page

earnest phoenix
#

so it can show

languid dragon
#

you create your application here

earnest phoenix
#

litterally deadass look at this

#
const {
    app,
    BrowserWindow
} = require('electron')
const path = require('path')
const url = require('url')

let win


function createWindow() {
    /* main window stuff */
    let win = new BrowserWindow({
        frame: false,
        backgroundColor: '#272727',
        icon: '',
        width: 1000,
        height: 600,
        show: false
    })

    win.setMenu(null)

    win.setResizable(false)

    win.loadURL(url.format({
        pathname: path.join(__dirname, 'index.html'),
        protocol: 'file:',
        slashes: true
    }))

    win.on('closed', () => {
        win = null
    })

    /* splash screen stuff */
    let splash = new BrowserWindow({
        frame: false,
        backgroundColor: '#272727',
        icon: '',
        width: 300,
        height: 300
    })

    splash.loadURL(url.format({
        pathname: path.join(__dirname, 'splash.html'),
        protocol: 'file:',
        slashes: true
    }))

    splash.on('closed', () => {
        splash = null
    })

    splash.setMenu(null)

    splash.setResizable(false)

    /* once main window is fully loaded close splashscreen and load main window */
    win.once('ready-to-show', () => {
        splash.close()
        win.show()
        //win.webContents.openDevTools();
    })

}


app.on('ready', createWindow)

app.on('window-all-closed', () => {
    if (process.platform !== 'darwin') {
        app.quit()
    }
})

app.on('activate', () => {
    if (win === null) {
        createWindow()
    }
})
#

im disgusted with myself

#

i littterally

#

halt the whole program

#

to load a window

#

that says loading with a gif

#

then load the other window

#

lol

languid dragon
#

wew

earnest phoenix
#

wew lad

#

what does yalls site use mainly

languid dragon
#

i made a windows 98 themed list of some sort

earnest phoenix
#

i assumed the meany beeny stack

languid dragon
#

also made a windows98 replica in HTML5 & CSS lel

earnest phoenix
#

why even

vital lark
#

pls banne

earnest phoenix
#

rem is bad

languid dragon
#

cos i can EYES

earnest phoenix
#

i mean let your dreems be memes

#

i guess

languid dragon
#

wasn't even a meme

#

i was gonna make an entire website like this

#

LOL

earnest phoenix
#

that amazing

#

now make all the css and html embedded into one file

#

:^)

languid dragon
#

inb4 i turn it into an electron app

earnest phoenix
#

YES

#

DO IT

languid dragon
#

actually thats a great idea EYES

earnest phoenix
#

THATS ACTUALLY A GREAT IDEA

languid dragon
#

im gonna make it a console for @tawdry relic

#

heh

earnest phoenix
#

no distribute win95 emulator

#

and since electron ALL PLATFORMS :I

#

u would be best person ever

languid dragon
#

yeah but

#

it already has a fuck load of code

earnest phoenix
#

converting to electron litterally takes 5 secs

languid dragon
#

ill think about it HMMM

#

i know

#

but i would need to re-code a lot

#

i could actually make the mini windows appear outside of it

earnest phoenix
#

lol

#

i have 8 gigs of unused ram on my server ;/

#

i should probably downgrade

#

considering i use 300 megs

languid dragon
#

gg

#

rent out space

#

offer to host bots

#

for like 2 dollars

earnest phoenix
#

i do

#

but i do for free

languid dragon
earnest phoenix
#

:/

#

lol

#

i only do it with friends for obv security reasons

#

and thats why its free

languid dragon
#

ye

earnest phoenix
#

make a game using electron ๐Ÿค”

fiery quail
#

Can anyone help me with this?

earnest phoenix
#

ok

fiery quail
#
npm ERR! file C:\Windows\system32\cmd.exe;C:\ffmpeg\bin
npm ERR! path C:\Windows\system32\cmd.exe;C:\ffmpeg\bin
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn C:\Windows\system32\cmd.exe;C:\ffmpeg\bin
npm ERR! shoppinglist@1.0.0 start: `electron .`
npm ERR! spawn C:\Windows\system32\cmd.exe;C:\ffmpeg\bin ENOENT
npm ERR!
npm ERR! Failed at the shoppinglist@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Nathaniel\AppData\Roaming\npm-cache\_logs\2017-12-12T01_45_34_343Z-debug.log
#

I have FFMPEG Downloaded.

#

It's in my path.

earnest phoenix
#

hm

#

its in c?

fiery quail
#

c?

#

Whats c?

#

Oh

earnest phoenix
fiery quail
#

Yep

earnest phoenix
#

is that the complete log? or can u open that log it output

fiery quail
#

1 second

#

let me find the complete log.

#
\bin;C:\Program Files\Java\jdk1.8.0_111\bin;C:\Program Files\CMake\bin;C:\ffmpeg\bin;C:\Program Files (x86)\Microsoft VS Code\bin;C:\Windows\system32\cmd.exe;C:\ffmpeg\bin;C:\Users\Nathaniel\AppData\Roaming\npm;C:\Program Files\Git\usr\bin\vendor_perl;C:\Program Files\Git\usr\bin\core_perl
9 verbose lifecycle shoppinglist@1.0.0~start: CWD: C:\Users\Nathaniel\Documents\electronProjects\shoppinglist
10 silly lifecycle shoppinglist@1.0.0~start: Args: [ '/d /s /c', 'electron .' ]
11 info lifecycle shoppinglist@1.0.0~start: Failed to exec start script
12 silly lifecycle shoppinglist@1.0.0~start: Returned: code: -4058  signal: null
13 info lifecycle shoppinglist@1.0.0~start: Failed to exec start script
14 verbose stack Error: shoppinglist@1.0.0 start: `electron .`
14 verbose stack spawn C:\Windows\system32\cmd.exe;C:\ffmpeg\bin ENOENT
14 verbose stack     at _errnoException (util.js:1024:11)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:192:19)
14 verbose stack     at onErrorNT (internal/child_process.js:374:16)
14 verbose stack     at _combinedTickCallback (internal/process/next_tick.js:138:11)
14 verbose stack     at process._tickCallback (internal/process/next_tick.js:180:9)
15 verbose pkgid shoppinglist@1.0.0
16 verbose cwd C:\Users\Nathaniel\Documents\electronProjects\shoppinglist
17 verbose Windows_NT 6.3.9600
18 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Nathaniel\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "start"
19 verbose node v8.8.1
20 verbose npm  v5.6.0
#
21 error file C:\Windows\system32\cmd.exe;C:\ffmpeg\bin
22 error path C:\Windows\system32\cmd.exe;C:\ffmpeg\bin
23 error code ELIFECYCLE
24 error errno ENOENT
25 error syscall spawn C:\Windows\system32\cmd.exe;C:\ffmpeg\bin
26 error shoppinglist@1.0.0 start: `electron .`
26 error spawn C:\Windows\system32\cmd.exe;C:\ffmpeg\bin ENOENT
27 error Failed at the shoppinglist@1.0.0 start script.
27 error This is probably not a problem with npm. There is likely additional logging output above.
28 verbose exit [ 1, true ]
vital lark
#

did u add it to the Env Variables?

fiery quail
#

Env Variables.

#

Please explain

#

Wait

#

Enviromental Variables?

#

What var do I need to add it too?

abstract mango
#

path

fiery quail
#

C:\Windows\system32\cmd.exe;C:\ffmpeg\bin;C:\Program Files\Java\jdk1.8.0_111\bin;C:\Program Files\CMake\bin;C:\ffmpeg\bin;C:\Program Files (x86)\Microsoft VS Code\bin;C:\Windows\system32\cmd.exe;C:\ffmpeg\bin;C:\Users\Nathaniel\AppData\Roaming\npm

#

thats the path value.

vital lark
fiery quail
#

So

#

yam

#

Oh

#

so...

#

1 second.

fiery quail
#

Pls

#

help I just wanna code electron

earnest phoenix
#

i have a dev question
suppose i need the bot to escalte perms
like adding perms to add reactions
is there a clean way of doing that?

#

im thinking the only clean clean way is to do a broadcast

icy lynx
#

Just wondering

#

For a Python bot, how do you guys update it while keeping the downtime minimal?

#

What I do is uplpad new script, stop python script and start the updated script

weak parrot
#

You make a beta bot

#

At least what's what I did

#

Another version of the same bot running on a different account on which you can test out the new code and stuff

stone kiln
#

^

icy lynx
#

I already test it on a different account

#

The issue is that updating the code on the main bot gives the bot downtime

#

As I said, the process I do is uploadong the files to the server, stop current python script and start updated python script

stone kiln
#

that is expected downtime

weak parrot
#

Well in that case down time should be minimal no? Like it'd only take a couple of minutes to update the code I don't see how that would be an issue

icy lynx
#

I would have to check every single user if they are still on the same server or left

#

While I plan to use lazyload for that, I prefer a diff solution to keep downtime as minimal as possible

north fog
#

save the current status in a json file and read it afterwards again ยฟยฟยฟ

#

or sql, i dont care

#

somewhere where you can save it

icy lynx
#

It's already using sqlite, as I said, the issue is if someone leaves while the bot is down

north fog
#

save the current status to somewhere

stone kiln
#

just check the servers on startup

north fog
#

read it when it is back up

stone kiln
#

^

icy lynx
#

Do you know what sqlite is?

stone kiln
#

yes

#

that is a db

icy lynx
#

It's a db, that is already stored.

#

It already reads that

north fog
#

no, i dont, is it food ยฟยฟ

icy lynx
#

The issue is if someone leaves, it won't knoe when it's down

north fog
#

oke, easy

stone kiln
#

why not just after startup check if user count is still the same

#

and read accordingly

north fog
#

when it starts up, compare it again with your database and what is online(or memory)

stone kiln
#

^

#

exactly

icy lynx
#

@stone kiln that's what it does currently, which takes time

#

Using lazyload, it takes longer

#

So having less downtime is the best solution for an accurate amount

stone kiln
#

why not make a timeout while it's doing that and say
bot is in startup mode please be patient

#

you are using py right?

icy lynx
#

Yes, but it checks on every server every single user

stone kiln
#

why not just do it on event

#

like make it when you do x amount it checks again

icy lynx
#

Thay's a bad way of doing

#

Discord already tells when they leave

#

But, as I said, I wont get that information when the bot is down

stone kiln
#

why not load the db first and then the commands

#

so while it's loading in the commands at the sametime it's reading all user count

#

for me i can easily do that with what i'm used to
first it loads the db then it loads the commands

#

and easier way

#

set it to invis while it's doing that

#

so people won't execute commands while it's reading the db

north fog
#

its simple
when your bot starts up there is a variable that tells the cmd handler (if you have any) to block any command and tells the user that is it starting up
while it is starting up, let it loop thou your db and check if the user exsist in the guild yes or no: (yes, do nothing | no, log it) if there guild user doesn't excist in db log it and add it in db
when the bot is done with that, toggle the variable that tells the cmd handler (if you have any) to allow every commands

stone kiln
#

yeah

#

exactly what i was thinking

north fog
#

if you don't get it, tell me what you don't understand

icy lynx
#

@north fog what you don't understand is that it already loops using lazyload

#

Using lazyload, it uses less server ressources, but is slower

#

For accurate information, less server time is the best method

stone kiln
#
import sqlite3
connection = sqlite3.connect("company.db")

cursor = connection.cursor()

cursor.execute("SELECT * FROM employee") 
print("fetchall:")
result = cursor.fetchall() 
for r in result:
    print(r)
cursor.execute("SELECT * FROM employee") 
print("\nfetch one:")
res = cursor.fetchone() 
print(res)```
straight up sql XD
icy lynx
#

I already have a code that checks every user ๐Ÿ˜“ as I said multiple times

#

The question is how to update it with minimal downtime as possible

north fog
#

sorry, im not a py genius, so dont know much about lazyload

icy lynx
#

Lazyload is used in jS too

#

Instead of loading as fast as possible, it takes its time

north fog
#

not using js either

#

then I can't help you, I gave a simple solution but if you can't agree with it, then I can't help

fervent goblet
#

H E Y

earnest phoenix
#

but i cant get this to tag the user

stone kiln
#

do this <@Yourid>

earnest phoenix
#

${msg.author.tag}

#

right now its that

stone kiln
#

instead of that use <@${msg.author.id}>

north fog
#

tag is like #xxxx

stone kiln
#

@earnest phoenix do that

#

what i just typed

#

into your boat

earnest phoenix
#

why <>

stone kiln
#

discord

#

ยฏ_(ใƒ„)_/ยฏ

earnest phoenix
#

or

stone kiln
#

@stone kiln

#

like that

#

that is what they use in the bg for tags

earnest phoenix
#

Thanks

#

i got it to work

stone kiln
#

np

#

@earnest phoenix oh one thing

earnest phoenix
#

Oh my nick

#

im sorry

#

Ok im back to normal

stone kiln
#

if you have a nick use <@!id>

#

instead of <@>

earnest phoenix
#

what works with both

stone kiln
#

<@!>

#

works with both

earnest phoenix
#

ok

drowsy yarrow
#

there is literally an example written in there for you

unreal tusk
#

Hello guys! Can you explain me how to play PLS stream with LavaPlayer (JDA)?

drowsy yarrow
#

and a link to help you set it up

mighty barn
#

google

icy lynx
#

@north fog battery died, as I said, your simple solution doesn't help at all because something similar is already done, which works fine. My question is how to keep it up with minimal downtime, not how to code

north fog
#

fast computer/server

icy lynx
#

Can the same token be used twice?

north fog
#

so far I know, yes

icy lynx
#

Perfect, might do a load balancer

unreal tusk
#

Do you know why lavaplayer throws exception if I try to play music by youtube url?
It happens only if I use URL links
com.sedmelluq.discord.lavaplayer.tools.FriendlyException: This video is unavailable.

icy lynx
#

I don't know lavaplayer, but could it be because you don't link directly to the video file?

#

@unreal tusk

unreal tusk
#

I open video in youtube, copy link from browser to this video and use it

icy lynx
#

What language are you using?

unreal tusk
#

java

icy lynx
#

Couldn't find a lib in Java

#

But I assume you need to get the .mp4/etc file directly

glossy sand
#

you should be able to do it by invoking ytdl

earnest phoenix
#

@icy lynx you could run two shards

#

Well

#

Not two shards

#

More like the bot runs parallel

icy lynx
#

Ye, that's another option

#

Will test that later, added to my todo list

inner jewel
#

@icy lynx you can start a new instance (let's call it B) of the bot, wait for it to load, kill the bot (instance A), start new version, kill B

icy lynx
#

@inner jewel Do you know any app/lib for that?

inner jewel
#

just run it again

earnest phoenix
#

Hello

#

:D

inner jewel
#

maybe add a flag so that it doesn't read from DB

#

starting it should be the same as before

#

you just start a temporary process with the old code while you update it

icy lynx
#

Yes, might do that

elfin depot
#

does my bot have to be online to be added in this server?

thorny hinge
#

How are the web mods gonna check an offline bot?

elfin depot
#

idk

fervent goblet
#

omfg

#

why the fuck would you add an offline bot to the list

#

people invite it, it doesn't work

icy lynx
#

genius

#

btw

#

Is there a reason why this has many downvotes? ```import requests

dbltoken = "token"
url = "https://discordbots.org/api/bots/" + bot.user.id + "/stats"
headers = {"Authorization" : dbltoken}

async def on_ready():
payload = {"server_count" : len(bot.servers)}
requests.post(url, data=payload, headers=headers)

async def on_server_join(server):
payload = {"server_count" : len(bot.servers)}
requests.post(url, data=payload, headers=headers)

async def on_server_remove(server):
payload = {"server_count" : len(bot.servers)}
requests.post(url, data=payload, headers=headers)```

#

There's another one that uses requests and got a downvote

icy lynx
#

EDIT: Found out myself

#

Looks like aiohttp supports async, and is 2-5x faster

quasi marsh
#

I used to use requests and since I moved to aiohttp I found huge decreases in CPU usage

#

And moving over is not that hard

icy lynx
#

Wish I knew it sooner ๐Ÿ˜›

earnest phoenix
#

windows.navigator.vibrate() if you know what i mean ๐Ÿ‘€

#
icy lynx
#

Just wondering regarding the discordbots API. Does it update instantly when I do the POST request?

#

Wanted to make sure it's working

earnest phoenix
#

i thought it used something sorta like rest?

icy lynx
#

POST /api/bots/:id/stats

earnest phoenix
#

ohohohohoh ok

neon pasture
icy lynx
#

@neon pasture What I used is similar to that

neon pasture
#

what lib are you using?

inner jewel
#

can't people read?

neon pasture
#

examples, so he can see how other people did it.

#

just trying to be nice boi

earnest phoenix
#

just do this insteadjs while(true){ //put request stuff in here }

#

:^)

icy lynx
#
        await aioclient.post('https://discordbots.org/api/bots/' + str(client.user.id) + '/stats/', data={"server_count": len(client.servers)}, headers={'Authorization': '-token-'})```
#

This is what I use. No idea if it works

inner jewel
#

and yes it does

#

just tested

earnest phoenix
#

i program in shakespeare, could i get a server count example for that?

icy lynx
#

I see, thanks

#

How long does it take for the page to update it?

neon pasture
#

it instantly updates, or atleast I think so

#

Is there a way to prevent sqlite from looping?

inner jewel
#

page instantly updates too

icy lynx
#

It does? That's weird. On the server, it reports unclosed connection/repsonse, which might be related to the cause, but I can't reproduce it on my end

inner jewel
#

here it updated instantly after posting count

icy lynx
#

It seems to mention something about a proxy, and I saw github issues mentioning it. Guess it will be a long night

#

Fixed unclosed issues by updating aiohttp dependencies, but it still doesn't insta update. hmm

neon pasture
#

How can I fix that .once isn't running multiple times?

icy lynx
#

what lang?

neon pasture
#

javascript/nodejs

icy lynx
#

It's for sqlite, right?

neon pasture
#

yes

#

Someone told me this: everytime someone goes to play a song, you add a new listener to the connection, so if someone queues like 10 songs and the first song ends, all of those .once's will fire at once.

#

so I want it only fire one .once.

icy lynx
#

Could you show the code?

neon pasture
#

That one is better

#

forgot the last line

icy lynx
#

Mhmm, can't help you on this one. I'm not familiar with once()

neon pasture
#

yeah, it's the same as with .on

young cradle
#

@neon pasture change EventEmitter.once() to EventEmitter.on()

#

once() will only receive an event... once

#

:v

neon pasture
#

Already change .once to .on

#

is doing to same thing

young cradle
#

Which event?

neon pasture
#

connection.on("end", function() {

#

you mean that right?

young cradle
#

Well, if your issue is with it, i assume you are using Eris?

neon pasture
#

yes

young cradle
#

Hmm, second, lemme get abal's git to look at it

neon pasture
#

thank you so much

#

I have been trying this now for 2 days.

young cradle
#

Are you sure end is a client event?

neon pasture
#

yes

young cradle
#

I don't seem to find it

#

๐Ÿค”

neon pasture
#

but .on can fire multiple times too right?

young cradle
#

Oh, it is not a client event, it is a stream event

#

:v

#

nice me

neon pasture
#

is that a big problem?

young cradle
#

Well, i would never find it

#

XD

neon pasture
#

I'm sorry, I can't read

young cradle
#

Well end event should be triggered only once, as a SharedStream is not a singleton

#

Here for reference

neon pasture
#

Someone told me this: everytime someone goes to play a song, you add a new listener to the connection, so if someone queues like 10 songs and the first song ends, all of those .once's will fire at once.

#

that's the big problem.

earnest phoenix
#

eris is the best

#

</plug>

young cradle
#

Hmm, i have never dealt with music with Eris, personally i use djs, but why exactly use SharedStream?

#

I mean

winged osprey
#

yeah

#

its designed to be used for like a bot streaming from a single source

#

to multiple channels

young cradle
#

It'll fire once for a bulk of voice connections

#

If you want per Voice connection, you should look for another method

neon pasture
#

Like that?

winged osprey
#

no

#

you want voiceconnection

#

but don't be creating it yourself

neon pasture
#

playStream(); In discord.js you use this right?

winged osprey
#

yes

#

i don't use d.js, but sure

neon pasture
#

So I need to find that, but then for Eris

winged osprey
#

there's a client function for joining a voice channel

stone kiln
#

why not use pipes?

neon pasture
#

I'm not that smart

winged osprey
#

take a look at client.joinVoiceChannel and client.voiceConnections

young cradle
winged osprey
#

ya thats what he is looking for

young cradle
#

Ofc, when you get a VoiceConnection instance first

neon pasture
#

I use that.

young cradle
#

Then how you ended up with SharedStream

neon pasture
#

idk

#

They all have the end event

#

I mix things up sometimes.

young cradle
#

v:

#

:v

neon pasture
#

I can use .volume.

young cradle
#

But the stream ends for different reasons

fervent goblet
#

lol

neon pasture
#

what do you mean with that?

#

it ends for different reasons?

young cradle
#

SharedStream end event is triggered when all VoiceConnections streams end

neon pasture
#

you mean in all guilds?

young cradle
#

Tbh, you should read Eris' source

#

:v

#

You will understand it a lot more

neon pasture
#

I don't think so :(

#

But thanks for helping

inner jewel
#

reading lib source code to understand how it works
bloblul

young cradle
#

Well, look at some example online, there are tons of repos you can base yourself off

earnest phoenix
#

or

#

or

#

or

#

read docs

icy lynx
#

Gotta follow the roots till you find your answer

google > stack overflow > read docs > read issues > read source code > understand source code > read nodejs > read v8 docs > read v8 source code > understand v8 source code > read C++ docs > read g++ source code > understand g++ source code > read Assembly docs > read Assembly source code > understand Assembly source code > read OS docs > read and understand OS source code if Linux > read hardware docs > understand hardware > build own hardware to re-produce error > ??? > profit

unique star
#

same

vital lark
#

How to be good at css m8

earnest phoenix
#

just dont be bad

#

thats how

rain bramble
#

Wha

earnest phoenix
#

Does anyone know how to use messagecollectors?

earnest phoenix
#

Sorta of.

#

idk what language.

restive silo
#

messageCollectors sound like Discord.js (Javascript)

#

could be usefull

earnest phoenix
#

Yeah.

earnest phoenix
#

๐Ÿ†

earnest phoenix
inner jewel
#

bot doesn't have that guild

#

ยฏ_(ใƒ„)_/ยฏ

earnest phoenix
#

oooh

stable vine
#

@earnest phoenix Did you install ytdl-core ?

earnest phoenix
#

yes.

#

it connects to my voice chanel

#

but doesnt play anything

stone kiln
#

do you use windows?

earnest phoenix
#

..

stable vine
#

@earnest phoenix Volume ?

earnest phoenix
#

it runs on a linux vm

#

?

stable vine
#

Do you have your vol. up

earnest phoenix
#

it would show a green if the bot was playing

stable vine
#

hmmm

earnest phoenix
stable vine
#

I dunno man I don't make Music Bots

earnest phoenix
#

this is some error i got

stable vine
#

Wait is it a actual link ?

#

Like yt link or sound cloud ?

earnest phoenix
#

no

#

since the code has a thing

#

where it searches the video

stable vine
#

Well you probally need like a playlist

earnest phoenix
#

i looked through the code

#

'err' is undefined

stable vine
#

Hmmm

earnest phoenix
#

but doesnt matter

stable vine
#

@gilded plank help

languid dragon
earnest phoenix
#

?

languid dragon
#

The errors are given to you, if err is undefined, define it

#

If ur getting a weird error from a module

#

Google it

#

Theres bound to have been someone else out there with the same error

stable vine
#

^

quiet bobcat
#

How can I get Watching message on my bot? Using discord.js

earnest phoenix
#

rich presence

quiet bobcat
#

So I'll have to make a rich presence for my bot?

unkempt merlin
#

is it possible to set up "private bots" that are not publicly accessible? We already have a NodeJS bot for our Twitch IRC channel and want to add it to our Discord server, but it is not a pure Discord bot, so having it be public would not be realistic for it.

quiet bobcat
#

You can still have it public, you just don't share the link with anyone

#

And just invite it to your guild

unkempt merlin
#

okay cool, thanks for the info ๐Ÿ‘

quiet bobcat
#

np

inner jewel
#

you can make it a private bot

quiet bobcat
#

Can it still join servers?

median isle
#

If public bot is unticked, only the owner can add it to servers

quiet bobcat
#

ok

earnest phoenix
#

.

#

help me

neon pasture
#

check line 1348

quiet bobcat
#

try removing ;

neon pasture
#

let him check it first.

quiet bobcat
#

Yeah

earnest phoenix
#

done

neon pasture
#

and can you send a screenshot of it please.

inner jewel
#

line 80 has nothing to do with that lol

#

the error is in help.js line 1348

neon pasture
#

I know

#

just saw it

#

@earnest phoenix can you make screenshot of line 1348, sorry

#

or you already fixed it?

#

trying to help and he isn't responding anymore. noice

earnest phoenix
#

ok

quiet bobcat
#

Is it fixed or?

earnest phoenix
#

@neon pasture

#

the problem in music

quiet bobcat
#

Only use a }

#

On line 1348

#

Should fix it

earnest phoenix
#

yes

#

@quiet bobcat

quiet bobcat
#

hm

#

I don't get that line of code str.toLowerCase().indexOf('youtube.com') > -1

#

Why do you want it to be lowercase in the first place?

earnest phoenix
#

The problem with the music code I'm sure this was not the case until the music code was added

quiet bobcat
#

Youtube uses 64 type lettering 0-9 a-f A-F

#

so if you make it lowercase

#

you will get a different video

earnest phoenix
#

I will give you a server link and edit it

quiet bobcat
#

Wait I got it now

#

add var res = "youtube.com" over return str...

earnest phoenix
#

I suggest you add them. I do not know the programming

#

now you can edite

quiet bobcat
#

Try it now

#

@earnest phoenix did it work?

earnest phoenix
#

ok

#

The problem did not fix

quiet bobcat
#

Weird

earnest phoenix
#

yes

quiet bobcat
#

Still unexpected token?

earnest phoenix
#

yes

quiet bobcat
#

When you launched the bot?

earnest phoenix
#

yes

#

2 hrs, 11 min , 30 sec

quiet bobcat
#

?

earnest phoenix
#

Do you have a solution

quiet bobcat
#

My solution didn't work, so I guess no.

earnest phoenix
#

ok

quiet bobcat
#

Sorry

earnest phoenix
#

no

#

np

neon pasture
#
  if (element.memberCount < 4) {
    element.guild.leave();
  }
});```
Is this going to work?
thorny hinge
#

You have element.memberCount and element.guild.leave() GWjiangoOmegaLUL

#

element is a guild object so basically ur doing guild.guild.leave()

umbral pelican
#

why call it element thankeng

#

Helen is a much better name

neon pasture
#

I'm sorry dad.

crystal void
#

unmuted ๐Ÿ˜„

#

now I can help ppl again ๐Ÿ˜ƒ

umbral pelican
earnest phoenix
#

How do I replace spaces in a string with something else?

#

Like for instance how would I put all words from a message into seporate arrays

#

Like [ 'Hello', 'I', 'am', 'a', 'person' ]

#

I tried .split() but that returned a whole array

glossy sand
#

...have you tried 'Hello I am a person'.split(' ')

#

split(delim) takes an argument delim that defines what character to partition the string by

earnest phoenix
#

Im doing message.content tho

#

And yes that is what is being done

languid pendant
#

Hey guys

glossy sand
#

@earnest phoenix okay so I'm not entirely clear here

#

what are you trying to do and what have you already tried?

narrow dagger
#

.split() splits on all white space not just spaces

#

Also, why would you need each word in a new list?

earnest phoenix
#

Okay er nvm

#

Theres a way bigger problem that I have

#

.>

#

How do you use message collectors in DM channels?

#

My code is

#
message.guild.fetchMember(message.author.id).then(e => e.send('What tag would you like to see? This will await will be cancelled in 30 seconds. It will finish when you provide a message that goes through the filter the first time.'))
                    .then(() => {
                      message.guild.fetchMember(message.author.id).then(e => e.awaitMessages(response => response.content, {
                        max: 1,
                        time: 30000,
                        errors: ['time'],
                      }))
                      .then((collected) => {
                          message.channel.send(`The collected message was: ${collected.first().content}`);
                        })
                        .catch(() => {
                          message.channel.send('There was no collected message that passed the filter within the time limit!');
                        });
                    });
#

I need to fix a few things

#

But how would I get it to awaitMessages in the DM channel

narrow dagger
#

sorry, I assumed you were coding in py
this is clearly not py

earnest phoenix
#

Nope

#

d.js

#

Should have specified that, sorreh

#

Is anybody around?

#

Please mention me if you can help ;-;

patent reef
#

the snow just stops there

earnest phoenix
#

is it contained to a div?

#

and that div only goes there?

#

also i would have to see snow's script to see if it limits itself or has a die time

#

best use of sockets 2018

languid dragon
#

this should work right? EYES

bitter sundial
#

show the whole code you cropping monster

languid dragon
#

๐Ÿ‘€

#

no ill get judged LOL

fervent goblet
#

then we can't help

bitter sundial
#

I'll judge u hard

fervent goblet
#

xD

languid dragon
glossy sand
#

i mean

#

why wouldn't it work

fervent goblet
#

whats wrong

glossy sand
#

wait no that won't work lol

fervent goblet
#

why

languid dragon
bitter sundial
#

I tried

languid dragon
#

i get NaN ๐Ÿ˜ฆ

bitter sundial
#

yes

languid dragon
bitter sundial
#

they're undefined

glossy sand
#

the this takes the scope of the declaring scope

#

not the scope of the object

#

you'll have to reference them with rRollBot.a + rRollBot.b

languid dragon
glossy sand
#

you can't declare them in one statement lol

languid dragon
#

and i dont wanna waste time declaring it again outside of itself

#

ill google it REEEEEEEEEEEE

bitter sundial
#

hmm

glossy sand
#

you can do something incredibly stupid like

fervent goblet
#

rRollBot.t = rRollBot.a+...

glossy sand
#
let x;
let o = {
  a: x = expression,
  b: x += expression,
  t: x,
};
#

but what's the point

languid dragon
#

ew

glossy sand
#

alternatively,

let o = ((a, b) => ({
  a, b, t: a + b,
}))(expr1, expr2);
languid dragon
#

oh my god

#

LOOOL

fervent goblet
#

?

glossy sand
#

javascript is a c r e a t i v e language

bitter sundial
#

horrible

languid dragon
#

thats awesome lmao

bitter sundial
#

just do the calculation later

glossy sand
#

i've been doing too many one liner challenges

languid dragon
#

OwO

glossy sand
#

ugh

#

had a brief aneurysm

languid dragon
#

yayyyyy

#

easy solution

#

:^)

glossy sand
#

are you a java programmer

#

there's not a good reason to use a getter there

languid dragon
#

wym EYES

glossy sand
#
let a = new Roll();
return a.t;
languid dragon
#

OH

#

WELL THEN

#

THAT MAKES IT SO MUCH EASIER

#

THANK YOU LOOL

#

i only just discovered JS classes the other day ๐Ÿ‘€

glossy sand
#

remember classes are just syntactical sugar for defining functions with properties

languid dragon
#

OwO

#

thanks for ur help xox

bitter sundial
#

mm syntaxical sugar

glossy sand
#

it's really stupid actually

languid dragon
#

LOOOL

#

gotta plusonebw it

#

wait no

#

oh, yeah

#

arrays start at 0 ๐Ÿ‘€

glossy sand
#
class A {
  constructor() {
    this.t = 1;
  }
}

is more or less identical to

function A() {
  return {
    t: 1,
  };
}
bitter sundial
#

just add +1 to your randomizer

glossy sand
#

love javascript

languid dragon
#

best โ„ข

#

its fun to play around with tbh

glossy sand
#

good for code golf, prototyping, and not much else

bitter sundial
#

but why didn't you just

#

make a function

languid dragon
bitter sundial
#

and call it twice for bot and user

languid dragon
glossy sand
#

guaranteed java programmer

bitter sundial
#

lol nice "animation"

languid dragon
#

ty OwO

tawny lava
#

classes are for scrubs anyways

languid dragon
#

ur a scrub

fervent goblet
#

u are

tawny lava
#

class ken extends gay

glossy sand
#

๐Ÿณ๏ธโ€๐ŸŒˆ

fervent goblet
#

class Ken(Gay, Weeb)

bitter sundial
#

let ken = new Ken(true, true)

glossy sand
#

that's python you fool

languid dragon
#

๐Ÿ˜ญ

bitter sundial
#

who cares

fervent goblet
#

LOL

#

ken = Ken(True, True)

bitter sundial
#

programming jokes work anyway

fervent goblet
#

lol

bitter sundial
#

interlingual programming jokes

#

idfk

fervent goblet
#

lol

glossy sand
#

Conjecture: Ken is gay
Observations: His profile pic
Conclusion: The proposition is necessarily true

languid dragon
bitter sundial
#

heh

languid dragon
#

e x p o s e d

fervent goblet
#

lol

elfin depot
#
if (!message.content.includes("--silent")) {
      member.send(stripIndents `
    __**You have been banned! - PERMANENT**__
    __**Server:**__ ${message.guild.name}
    __**Reason:**__ ${reason}
    __**Moderator:**__ <@${message.author.id}>
    **Oh, no! Seems like you have been banned! :frowning:**
    _You have been banned. This could be unfortunate or fortunate to you, depends on what you wanted to happen :thinking:_
    `)
    }
#

can someone help me embed that

prime cliff
#

Just lookup your libarary docs for the embed object

elfin depot
#

k

#

@viral tiger

viral tiger
#

what

prime cliff
crystal void
#

ikr ๐Ÿ˜น

bitter sundial
#

why do they do this

icy lynx
#

Bots, prob

uncut slate
#

IE

earnest phoenix
#

Okay, does anybody know how to use await response in a DM channel?

uncut slate
#

like any other

earnest phoenix
#

But I tried and the whole thing breaks

#

Like it sends a message to the DM channel

#

It then just doesn't wait at all

uncut slate
#

show code

earnest phoenix
#

Okay hold on

#
                   message.guild.fetchMember(message.author.id).then(e => e.send('What tag would you like to see? This will await will be cancelled in 30 seconds. It will finish when you provide a message that goes through the filter the first time.'))
                    .then(() => {
                      message.guild.fetchMember(message.author.id).then(e => e.awaitMessages(response => response.content, {
                        max: 1,
                        time: 30000,
                        errors: ['time'],
                      }))
                      .then((collected) => {
                          message.channel.send(`The collected message was: ${collected.first().content}`);
                        })
                        .catch(() => {
                          message.channel.send('There was no collected message that passed the filter within the time limit!');
                        });
                    });
                }
});
#

I know I need to change the message.channel stuff

#

But the awaitResponse code just doesnt work

languid dragon
#

indentation PLS

#

REEEEEEEEEE

earnest phoenix
#

It is indented, discord is just being weird

#
 message.guild.fetchMember(message.author.id).then(e => e.awaitMessages(response => response.content, {
                        max: 1,
                        time: 30000,
                        errors: ['time'],
                      }))
#

I got rid of max because it isnt rlly needed

#

But this just doesnt work

#

I have no idea why

#

Maybe its because e isnt the correct item?

#

Hello?

earnest phoenix
#

This isnt working

umbral pelican
#

why call it e when its a member

#

you can't awaitMessages on a member

earnest phoenix
#

So it should be m

#

I tried channel

#

;-;

umbral pelican
#

call it what you want, but it makes it easier to read when you call it something related to what it actually is

earnest phoenix
#

But it still isnt working

#

For some odd reason

umbral pelican
#

members don't have channels also

earnest phoenix
#

But then how would I use awaitMessages in a DM channel ._.

umbral pelican
#

dmChannel.awaitMessages

earnest phoenix
#

Ohmygoshthankyousomuch

umbral pelican
#

only users have a dm channel, not members

earnest phoenix
#

Oh ye because members is specific to guilds

#

DMchannel is not defined

#

._.

umbral pelican
earnest phoenix
#

Im looking at it, trust me

umbral pelican
#

well, it's either because you're typing DMchannel not dmChannel or you're still trying to get the dm channel of a member

earnest phoenix
#

Oh

#

It was DMchannel

#

My bad

#

;-;

#

It still says it isnt defined

#
                    .then(() => {
                     dmChannel.awaitMessages(response => response.content, {
                        max: 1,
                        time: 30000,
                        errors: ['time'],
                      })
#

Ah wait

#

Nope

#

Nothing I do is working ;-;

#

Nvm

#

Got it to work

earnest phoenix
#

How can I get the next value in a collection?

#

For instance

#

I do .first()

#

Then how do I reference the next value after that

glossy sand
#

@earnest phoenix language?

earnest phoenix
#

d.js

quiet bobcat
#

Is there any way to change color of the bots name on dbl?

#

I tried it for the html but that didn't do anything

#

To change the color

glossy sand
#

@earnest phoenix what's your use case?

#

why not just use a for loop?

earnest phoenix
#

Wdym

#

Oh

#

Im using awaitMessages

#

So basically

#

It gets a message

#

Then gets the next one

#

Then the next, etc.

#

Like how would I make it keep getting the next one each .then() statement

#

I have collected.first().content

#

But then how would I get the next value after the first

glossy sand
#

uh i'm really confused

earnest phoenix
#

Okay

glossy sand
#

have any pseudocode to show?

earnest phoenix
#

Yes

#
                           .then((collected) => {
                            message.guild.fetchMember('376147022660632587').then(e => e.send(`${Question2} \n \`\`${collected.next().content}\`\``));
                            client.fetchUser(message.author.id).then(user => user.send(Question3))
                          })
                        })
#

Ik .next() isnt a function

#

But how would I keep going down a value in a collection

#

Okay, my entire code is this

#
                    client.fetchUser(message.author.id).then(user => user.send(Question1))
                    .then(() => {
                     message.author.dmChannel.awaitMessages(response => response.content, {
                        max: 1,
                        time: 30000,
                        errors: ['time'],
                      })
                      .then((collected) => {
                          message.guild.fetchMember('376147022660632587').then(e => e.send(`${Question1} \n \`\`${collected.first().content}\`\``));
                          client.fetchUser(message.author.id).then(user => user.send(Question2))
                        })
                        .then(() => {
                          message.author.dmChannel.awaitMessages(response => response.content, {
                             max: 1,
                             time: 30000,
                             errors: ['time'],
                           })
                           .then((collected) => {
                            message.guild.fetchMember('376147022660632587').then(e => e.send(`${Question2} \n \`\`${collected.first().content}\`\``));
                            client.fetchUser(message.author.id).then(user => user.send(Question3))
                          })
                        })
                        .catch(() => {
                          message.guild.fetchMember(message.author.id).then(e => e.send('There was no collected message that passed the filter within the time limit!'));
                        });
                    });
glossy sand
#

sorry i'm on mobile and i really can't read that

earnest phoenix
#

Rip

glossy sand
#

lemme get my laptop out

earnest phoenix
#

Okay

#

When I do collected.first() the second time

#

It returns the first statement

#

Which makes sense, but not what im trying to do

#

Okay, lemme try to explain this better

#

I have a collection of items

#

I referenced the first one

#

But how would I reference the one below that?

#

Aka the next one

glossy sand
#

collections aren't ordered

#

there is no "next" one

earnest phoenix
#

Oh

#

But then-

#

How would I get the message the user sent

#

So

#

For example

#

I have this

winged osprey
#

you could use the spread operator to turn it into an array

glossy sand
#

okay looking at your code there are a few issues here

#

first of all, you're fetching the user every time you send a message

earnest phoenix
#

?

glossy sand
#

why not just store it to some variable before doing all your message sending and use that variable

earnest phoenix
#

Oh nononono its on an if (message.content ===) statement

#

That wouldnt work though, because I need to change the variables inside the calling user

glossy sand
#

I'm asking why you use client.fetchUser(message.author.id) every time

earnest phoenix
#

Oh

#

Because basically

#

This code sends a user a DM

#

Then it sends a question

#

They respond

#

It sends a user their response

#

Then it DMs them another question after the response

#

And that is why I asked how to get the next value in a collection

glossy sand
#

well your issue here is that your second then call is chained onto the first promise instead of the second one

earnest phoenix
#

Oh whoops

#

How would I change that

#

Wait no I need it that way

#

Because once the user from the first promise responds

#

It needs to send another question

#

Wait

glossy sand
#

right but you call then() twice on the first promise

earnest phoenix
#

Imma try something

glossy sand
#

what you're trying to do is call then() on the second promise within the then() of the first promise

#

you probably just misplaced some braces

earnest phoenix
#

Rip

glossy sand
#

also why not use async/await

#

it's a lot more readable than this

earnest phoenix
#

Because I dont know how to use that ._.

uncut slate
#

learn

glossy sand
#

it's a much better paradigm than callback hell

earnest phoenix
#

Errr wot

#

Okay, but all im trying to do is get values in a collection ._.

uncut slate
#

if you can't help you, we can't help you

earnest phoenix
#

Oh I get how this works!

#

Its basically what I was doing but a lot easier

#

But I need to use functions for it

#

Wait how would

#
                    async function Questions() {
                      await message.author.dmChannel.awaitMessages(response => response.content, {
                        max: 1,
                        time: 30000,
                        errors: ['time'],
                      })
                      message.guild.fetchMember('376147022660632587').then(e => e.send(`${Question1} \n \`\`${collected.first().content}\`\``));
                      client.fetchUser(message.author.id).then(user => user.send(Question2))
                    }
#

Would this suffice?

heady zinc
#

i don't get why you use await and .then()

#

you should only use await

#

or only use .then()

#

not both at the same time at least

uncut slate
#

I would argue there are uses where mixing is okay

heady zinc
#

well there are

#

but i don't see one here

uncut slate
#

yes, here you are totally able to drop .then

earnest phoenix
#

.then()

#

Where

#

Oh

#

That is required for my user DM code

#
                    async function Questions() {
                      await message.author.dmChannel.awaitMessages(response => response.content, {
                        max: 1,
                        time: 30000,
                        errors: ['time'],
                      })
                      message.guild.fetchMember('376147022660632587').then(e => e.send(`${Question1} \n \`\`${collected.first().content}\`\``));
                      client.fetchUser(message.author.id).then(user => user.send(Question2))
                    }

                    async function Questions2() {
                      await message.author.dmChannel.awaitMessages(response => response.content, {
                        max: 1,
                        time: 30000,
                        errors: ['time'],
                      })
                      .catch(() => {
                        message.channel.send('There was no collected message that passed the filter within the time limit!');
                      });
                      message.guild.fetchMember('376147022660632587').then(e => e.send(`${Question2} \n \`\`${collected.first().content}\`\``));
                      client.fetchUser(message.author.id).then(user => user.send(Question2))
                }
                Questions()
                Questions2()
#

This is what I learned

#

From reading the document

#

It waits for the awaitMessages promise

#

Then sends messages

glossy sand
#

I don't think you understand it quite yet

earnest phoenix
#

Dang it

glossy sand
#

await waits for a promise to finish then returns the value it's resolved with

earnest phoenix
#

o

#

That isnt what is required

prime cliff
#

Why are you fetching the bot user twice?

earnest phoenix
#

?

glossy sand
#

I asked that too lol

earnest phoenix
#

Im fetching a user by ID

prime cliff
#

But dosent the library already have stuff like currentuser.sendmessage

earnest phoenix
#

And im doing it twice because Im creating a question and response system

prime cliff
#

or something like that

glossy sand
#

ok check this out

#

instead of doing something like

fetchUser(id).then(u => u.sendMessage('hi'));
fetchUser(id).then(u => u.sendMessage('hi again!'));
#

you can just

fetchUser(id).then(u => {
  u.sendMessage('hi');
  u.sendMessage('hi again!');
});
earnest phoenix
#

Okay

glossy sand
#

or, in the async/await pattern,

const u = await fetchUser(id);
u.sendMessage('hi!');
u.sendMessage('Hi again!');
uncut slate
#

sendMessage ๐Ÿค”

glossy sand
#

i'm just making stuff up

earnest phoenix
#

Im just deleting all my code I gotta start over

#

Okay wait

#

I prefer to use .then systems

glossy sand
#

why

earnest phoenix
#

I just understand it better ยฏ_(ใƒ„)_/ยฏ

#

But the main problem is im not sure how to get the next value in a collection

#

So like .first() gets the first one

#

But then how would I get the one after that

glossy sand
#

I'm absolutely sure you're fundamentally misunderstanding many things but I honestly can't be bothered any more

#

use collection.first(n) to get an array of the first n elements

earnest phoenix
#

Okayyy...

#

So collected.first(collected)

glossy sand
#

no

#

collected.first(50) will get you the first 50 elements, for instance

earnest phoenix
#

O

glossy sand
#

I'm sure you can infer how to get an array of all the elements

earnest phoenix
#

Yes

#

collection.array()

#

Okay wow

#

Thank you!

glossy sand
prime cliff
#

I mean if you want to get through all values you can do a for/foreach loop

earnest phoenix
#

Okay

#

The item would be element correct?

earnest phoenix
#

he

#

help me

#

@prime cliff

#

can you help me

prime cliff
#

It says you are missing a ) somewhere....

earnest phoenix
#

Maybe

#

@prime cliff end

#

No limit answers

#

why

#

@earnest phoenix

#

<@&304313580025544704>

#

help

trim steppe
#

Jeez

scenic crest
#

you got to be kidding me

trim steppe
#

Don't ping all mods

languid dragon
#

Why'd you fucking tag every moderator

scenic crest
#

please ping the people who are helping you in the moment, not all mods

glossy sand
#

why is that even a taggable role

scenic crest
#

^

earnest phoenix
#

Fucking hell

#

why why why why ๐Ÿ˜•

scenic crest
#

apparently it needs to be taggable

earnest phoenix
#

Bc tonkku and oliy want it to be

#

I'm going back to sleep

#

Fuck @SnoW#4749 for waking me up

surreal peak
#

bluh

trim steppe
#

Force them to write emails to the moderation team

surreal peak
#

they left

languid dragon
#

woooooooooooooow

fossil oxide
#

here we go

icy lynx
#

Lol

prime cliff
#

He only wanted help because of a missing ) lmao

fervent goblet
#

Whats the js equalsignorecase?

#

actually, case does matter

#

nvm

glacial vale
#

Finally managed to add my bot server count. (more like finally was bothered to)

icy lynx
#

@glacial vale what lang?

glacial vale
#

Python

#

it was easy, just couldn't be asked to do it

earnest phoenix
#

Who pinged me

icy lynx
#

Did you use my code?

glacial vale
#

yes and no

#

i used it but its slightly outdated atleast to the discord.py rewrite version

#

so I had to change a tiny bit to get it working

#

helped a lot tho

icy lynx
#

What's outdated? I can fix it

glacial vale
#

since I could just shove it in, saved me some effort

#

well idk, its probably still up to date with the async version of discord.py

#

but there is the rewrite version

#

which means it then becomes guild rather then server

icy lynx
#

Ahh

glacial vale
#

so on_guild_join

#

and bot.guilds

icy lynx
#

I need to check the rewrite version, will guild be used in the future?

glacial vale
#

also, i almost forgot to make sure i put the token in a file since i push to github and didnt want anyone getting it

#

yes

icy lynx
#

Will need to get ready for the rewrite ๐Ÿค”

earnest phoenix
#

Hey guys?

#

How do I make promises wait for other promises to complete first?

#

I tried an async function but I have no idea how to use it

#

I've been working literally the entire day on this

#

And im so close

#

Nvm I got it

icy lynx
#

๐Ÿ‘ remember to share the solution when you find it, for the next user

earnest phoenix
#

Well

#

I have a bit of a problem

#

I wrote out these huge functions

#

But then when I try to call them with .then

#

It says its undefined

#
                 Questions1()
                  .then(Questions2);
quiet bobcat
#

Questions1() isnt a property

earnest phoenix
#

Its a function

#

That I made

glossy sand
#

it's a function that returns nothing presumably

earnest phoenix
#

Yes

glossy sand
#

because your call resolves to undefined

earnest phoenix
#

It doesnt return anything

quiet bobcat
#

make it say like 2

earnest phoenix
#

Should it?

quiet bobcat
#

or something

#

It should yes

glossy sand
#

why would you try to call then if it returns nothing?

earnest phoenix
#

To create a promise chain

glossy sand
#

but it doesn't return a promise?

earnest phoenix
#

Ah

glossy sand
#

it returns nothing, as you said