#development

1 messages · Page 763 of 1

modest maple
#

i personally like selenium for Speed purposes but it opens a web browser up to work

uneven wyvern
#

uh

modest maple
wooden lance
#

Does anyone know how to ban multiple users at once from an array? Would be helpful so my bot doesn't get rate limited during a raid.

#

js

modest maple
#

you cant do mass Bans in one request

#

but you can send a couple in a short period and its fine

#

its just a spam of it that will get u rate limited

wooden lance
#

Oh no, like banning users

slender thistle
#

1s delay between each ban

modest maple
#

mass Bans sorry

wooden lance
#

@slender thistle ok thank you

#

wait, how the heck would i do that

modest maple
#

by just iterating through the array and just waiting a sec

#

through each loop

wooden lance
#

oh yeah

lofty hamlet
#

Hi, i have problem with my bot when i shard this bot : Nebulusdimanche dernier à 00:29 I explain my problem It is not synchronized, it is super strange ... even by saving the file all the commands, the shard one has the json file of the bot when it launches and the two also and after they leave in their corners and the file is saved by doing rollback or I don't know what It's very strange I can show you with my bot directly Wesleydimanche dernier à 00:32 The json is probably cached meaning that changes on shard x won't transfer to shard y After you require() the file It's cached And no longer checks what's actually in the file

So i can patch this ?

earnest phoenix
#

what are you doing exactly with the json?

lofty hamlet
#

I have a small database

#

Very small

modest maple
#

stop right there

earnest phoenix
#

okay, don't, problem solved

modest maple
lofty hamlet
#

I know 😂

earnest phoenix
#

you won't get support for doing something that everyone told you not to do lol

lofty hamlet
#

This system dates from 2 years I know that it is not for that JSON but until I redo the code that has 10,000 lines I need to patch that

earnest phoenix
#

because... you werent meant to do it in the first place

#

you can't patch it

#

it's IO

mossy vine
#

patch code in node.js itsrlf

lofty hamlet
#

It's IO ?

#

IO ?

mossy vine
#

input/output

lofty hamlet
#

So when i remake my code i can't patch this ?

earnest phoenix
#

when you recode, don't even use json, problem solved

lofty hamlet
#

So no solution, I just have to redo my code very quickly ?

#

Yeah i recode with quick.db

#

With sqlite

#

Json is shit for database i know

modest maple
#

pretty much

twin forge
#

Hi

modest maple
#

hello

lofty hamlet
#

He does'nt work he convert my file to a .sql

#

It's normal ?

#

Nobody have good converter for convert json file to .sqlite

cursive dagger
#

.SQL is normal

#

What u do is you run the commands in that SQL file in your DB

dusky marsh
#

Afaik sqlite extension doesn't matter or can be various things

lofty hamlet
#

???

#

No i want .sqlite file

#

I use quick.db who use sqlite file

quartz kindle
#

99% chance that will never work

modest maple
#

you cant get a .sqlite file

#

its just

#

.db

lofty hamlet
#

So i can't make this ?! Because i have a json database system with my bot and i do change this

#

I can't convert my .json to sqlite ?

quartz kindle
#

you cannot magically convert a json database to an sql database. the structure is very very different

modest maple
#

in all honesty if you db is 'small' its not gonna hurt you to just manually add the old stuff back

#

and yes tim is right

#

its completley diffrent format layout etc..

lofty hamlet
#

No my database .json is very big

#

Very very very big

modest maple
#

well then make a program to convert it over

quartz kindle
#

you need to code everything yourself, how to change which keys and values into which tables and rows and indexes

lofty hamlet
#

So my bot is finish ... i can't convert .json to .sqlite :/

modest maple
#

there is no .sqlite

#

sqllite doesnt use .sqlite

#

it just uses a database file

lofty hamlet
#

I have .sqlite file

#

With quick.db

#

Quick.db use .sqlite file for save ...

quartz kindle
#

the only way to properly migrate databases is like this:

  1. load json file
  2. loop over all json items
  3. insert each item into sqlite database, according to your exact specification
  4. change all your code to load data from sqlite instead of json
modest maple
#

and trust me ik the pain ive been through it

#

but its the only way

quartz kindle
#

im gonna do it soon as well lmao

#

my bot is at 2100 and still runs on json

modest maple
#

i gotta transfer 5000 files over to db

lofty hamlet
#

There I am in the process of redoing my code of 10,000 lines which uses database .json for database with quick.db and it will be very long! And if I also have to do something to migrate the database it will last me forever!

quartz kindle
#

you gonna save files in db? as blobs?

lofty hamlet
#

My bot have 2.600 servers 😢 and use json database for her main part 😂

quartz kindle
#

nothing you can do about it Nebulus

lofty hamlet
#

I do change this 😦

quartz kindle
#

people dont change databases, and if for any reason they need to, they hire an entire team to do it

modest maple
#

this is why we tell people not to use json db's

#

cuz this is what happens

lofty hamlet
#

1 year ago I knew that the .json I did everything via this

#

So here I am in shit because I can't keep my basic database in .json because with sqharding everything is bug

quartz kindle
#

these are all lessons to learn

#

as my bot is approaching sharding limit and is also running json, what im gonna do is a complete rewrite

modest maple
#

im in the process of rewriting mine

quartz kindle
#

my old code is shit af anyway

modest maple
#

just be glad you dont have to rewrite a lib just to use shards xD

lofty hamlet
#

@quartz kindle we have the same problem 😂

#

We are in the shit

#

@modest maple yeah but sharding is shit

#

Just fucking shit

modest maple
#

well its not

earnest phoenix
#

it gets to a point where you shard or your bot is kinda just not gonna work

modest maple
#

yh

quartz kindle
#

but once you go through it once, you will know how to futureproof all your bots

lofty hamlet
#

Yeah 😢

#

Fuck i'm in the shit

quartz kindle
#

im making my bot memory-proof as well, so i can stay on the 3$ vps for years

lofty hamlet
#

😂

#

I have 3 projects so i have big dedicated server

quartz kindle
#

nice

lofty hamlet
#

70 $ / month 😢

#

But now it's not the problem

quartz kindle
#

fk

lofty hamlet
#

I want kill mùe 😢

#

I want return in the past for start dev of my bot with quick.db

#

And not fucking json

#

Argh

modest maple
#

bruh how big is ur server to be using 70$ a month in electricity

lofty hamlet
#

64 GB ram

modest maple
#

bruh

quartz kindle
#

you can have dozens of bots in there lmao

modest maple
#

thats pretty expensive for a 64gb ram system

quartz kindle
#

its prob a dedi

modest maple
#

i run a dedi

lofty hamlet
#

I have 4 bots lit 24/24 a minecraft server, a gmod server and 4 sites and other little tricks: ')

#

😂

modest maple
#

and mines like £60 a month in electricity at low load

lofty hamlet
#

@quartz kindle you want return into the past with me ?

modest maple
#

and thats 48 cores, 96 threads and 256GB ram

quartz kindle
#

well, £60 is more than $70 isnt it? xD

modest maple
#

slightly

lofty hamlet
#

I create my time travelling machine and she work

#

Come with me dude

modest maple
#

but its not the gap you would expect

quartz kindle
#

i g2g sleep now lul

lofty hamlet
#

Shit !

#

I have idea

#

I make an command that the player executes and it takes things and puts them in sqlite

earnest phoenix
#

I need help

#

dont we all

#

How do you add ur bot to the server

lofty hamlet
#

😂

earnest phoenix
#

I just joined

#

Come on man

#

@earnest phoenix

#

Go to discord permissions calculator

#

I did

#

I am*

#

Then get your bots client ID

#

And put it where it says you need to

#

Then click the perms you wanna give

#

My bot is in here already

#

O

#

how do i add a new row onto an existing mysql table? i tried adding 3 but it only added 1 row

modest maple
#

itterate through

#

adding a new row at a time

earnest phoenix
#

i hate myself

#

i didnt even have that problem, i did show tables and assumed the table name was a row i added 🤦‍♂️

modest maple
earnest phoenix
#

ok i actually could use help now

modest maple
#

say ur issue

earnest phoenix
#

i need to figure out how to actually get my database to work with my code eg the xp system i already have

#

and to start storing the info into the table

#

seeing as it wont be stored onto a json anymore

#

oh wait yeah i also need to add another row to my table so if you could tell me the command to do that please? 😁

modest maple
#

sqllite yh?

earnest phoenix
#

mysql

modest maple
earnest phoenix
#

oh no

modest maple
#

dont you need todo INSERT INTO <Table> (Columns) VALUES (items, items, items)

earnest phoenix
#

idk, this is my first time using mysql i just set it up like 10mins ago

modest maple
#

im pretty sure you do with sql

#

try it

honest karma
#

you have to do ALTER TABLE

modest maple
#

im pretty sure it is INSERT INTO <table> (c1, c2, etc..) VALUE (v1, v2, etc..)

#

cuz mysql follows the same syntax as sqllite

earnest phoenix
#

alter table?

honest karma
#

I'm only saying this because data types like INT NOT NULL if you're trying to change or insert a value is moost suited for that.

#

I could be very well wrong tho.

modest maple
#

if youre adding values you use INSERT

#

and need to specify the comlumns and values

earnest phoenix
#

im not adding values, im just adding a new row to store values

honest karma
#

Then use ALTER TABLE

modest maple
#

why are you adding rows when you have no data to put in them

#

that removes the whole point of the row

earnest phoenix
#

because data will be added into them eventually by the bot

modest maple
#

but you can just do it when it needs

honest karma
earnest phoenix
modest maple
#

like insert automatically creates the row with the vlues

#

are you talking about columns?

earnest phoenix
#

which will be very soon after i finish this bit of code

modest maple
#

do you mean columns?

#

or rows?

earnest phoenix
#

rows

modest maple
#

then just add rows when you have data to put in them

#

INSERT handles that for you

#

theres no point adding rows with nothing in, it just creates more work when searching for stuff

earnest phoenix
#

Are there any free servers to keep a discord bot online 24/7?

#

what is going on????

modest maple
#

@earnest phoenix not really glitch and heroku are sorta scuffed semi sorta hosting systems

#

@earnest phoenix in the top error you did '<Numbers> and didnt close the string with a '

earnest phoenix
#

what?

#

ok wait i think i got it

modest maple
#

you were trying to give it a string as a num yh

#

well you didnt actually close that quote mark

#

so it was like wtf is this data type

earnest phoenix
#

ok i fixed that but the other thing?

modest maple
#

it would appear its empty

earnest phoenix
#

like it doesnt exist or just no data?

#

?

modest maple
#

apparently it hasnt got anything in it

#

so its empty

earnest phoenix
#

but it does?

#

i'm so confused

#

🤔

#

makes no sense

analog roost
#

is it possible to make a command to show the guilds your bot is in?

modest maple
#

yes

#

should you

#

NO

earnest phoenix
#

@analog roost dont know why you need it but add client.guilds.forEach(guild => console.log(guild.name)) to your code which is along the lines of client.on('ready'...)

#

or use this code already done: ```client.on('ready', async () => {

client.guilds.forEach(guild => console.log(guild.name))
console.log('I am now online!')
``` change client to bot if you already have it as 'bot.on'
analog roost
#

alright thx

earnest phoenix
#

anyone found the solution to my problem or nah?

#

also i need to know now how to add a new row for levels so when the database detects the user has leveled up, it adds 1 onto the current level

modest maple
#

@earnest phoenix don't spoonfeed them code

earnest phoenix
#

ok

modest maple
#

The simple answer as to why we do not spoonfeed, is it does not help you learn.

If you come in this server and ask a question that has a very basic answer, and you do not know how to figure out this answer...then put quite bluntly, you need to learn more. What we will do, is point you in the right direction to learn what you need to. By simply giving an answer that you, most likely, cannot then figure out why it is the correct answer....you learn absolutely nothing.

All developers need to learn some very basic things:
How to read docs
How to read tracebacks/errors
How to figure out where to look
Would your question be better suited to simply google?
Is your question in the docs, quite clearly?
If you think about your question, do you think it's probably been asked many times before? Have you tried the FAQ?

Whenever you are "not spoonfed", you are being assisted in how to do one of the above. Don't be unnapreciative, it is the type of help you need, whether you want to admit it or not.

earnest phoenix
#

sorry my bad...

modest maple
#

Dw

#

As for your error

#

Don't you have todo fetchall() to get everything from the db

#

Well from the specified field

earnest phoenix
#

hm?

#

probably not? but i did stuff and got a new error so i need to add new code for a coin system i was planning on adding but dont really know how to make...

modest maple
#

Hmm

#

I'm about to go to sleep so I can't rlly help much, if you're still stuck I'll try help tomorrow

earnest phoenix
#

i can easily get it to add the coins to the database since its basically copy paste

#

ok

#

see ya

sinful lotus
#

what lib are u using

#

at the first place

oak minnow
#

Hello. Ive been trying to make a report command and then when you click on the reaction, the report closes/deletes. ive been trying but i cant find out how to fix it. Code: >>>https://hastebin.com/guyafukexa.js<<<

west raptor
#

message.delete

#

delete is a method

#

not a property

#

why do you have a empty .then

oak minnow
#

its not empty

west raptor
#

why is line 31-36 randomly in it's own scope

oak minnow
#

embedMessage.react("✅").then

west raptor
#

then what??

oak minnow
#

thats it

west raptor
#

that makes no sense

oak minnow
#

u know what

#

ill just do it my self

west raptor
#

ok then

oak minnow
#

thanks for trying 2 help

slender thistle
#

What a surprise
What do you wanna do after you react to message

earnest phoenix
#

Can somebody help me with a music node im coding? I code in JS, the code dosent work I think its outdated but I don't know what to change. Hastebin ---------------------------------> https://hastebin.com/egukahasof.js

#

@me if you have a possible solution or a suggestion. please

west raptor
#

what exactly isnt working

#

we cant help you without more information

earnest phoenix
#

That's the thing Idk what isn't working because on the code editor is says nothing is wrong

#

I checked the logs to

#

and I checked if all the packages were up to date

west raptor
#

can you debug you're code and see exactly where it stops working

earnest phoenix
#

ok

modern elm
#

Who knows how to get someones email and password

#

Uhhhhh asking for a friend

#

jkjkjk 🤣

earnest phoenix
#

Nothing pops up in the debugger either

#

I might just have to recode it maybe

wary kraken
#

Does anyone know how to have this where I dont have to have this window open on my computer?

earnest phoenix
#

Press the X at the top

#

does that work?

slender thistle
#

Original question stating "so that the bot worked without the command prompt"

wary kraken
#

I have windows 8 and on that it comes default with the regular command promt

#

Thats a different one

#

its the Node.Js command promt

slender thistle
#

What does that matter

wary kraken
#

npm works with the Node.js command promt the regular one doesnt

#

not npm

#

something else

slender thistle
#

npx?

wary kraken
#

Im searching it

west raptor
#

Yarn?

#

What

wary kraken
#

Oof but im wondering how you can use that

#

without having the program open

#

all the itme

#

time

#

If I close it the bot stops working

west raptor
#

Could make it a system process

#

But I discourage that unless you're on a vps

#

Dedicated to hosting the bot

wary kraken
#

Im not on a vps

#

So errrrr

west raptor
#

Why not just get a vps

#

To host it on

lilac wharf
#

To host something without a window/application on your window you need either

1: A friend who's willing to host it for free
2: A VPS with at least 1gb ram (since discord bots don't really need that much ram depending on how much it's being used) [I'd suggest GalaxyGate]
3: A Home-server (or another pc) where you can keep the bot online as much as you want (but you will need to maintain it yourself).

west raptor
#

Or run a system process for it

lilac wharf
#

That too...

west raptor
#

But again I wouldn't do that

earnest phoenix
#

Or you could just get code that keeps it online 24/7 as long as you have a website pinging your bot

#

I don’t mind telling you the code if you use JS

blissful scaffold
#

3B: An example of a cheap home-server could be a Raspberry Pi or something similar.
Anything that runs Linux or Windows can host a bot

amber fractal
#

Most things that can connect to the internet and have enough processing power can run a bot

#

Just might need to attempt to bypass stuff mmLol

quartz hill
#

Are all channel ids unique?
client.channel.get(channelid);

#

Return a single channel?

earnest phoenix
#

theoretically there can be a dupe id

#

but realistically all ids are globally unique

quartz hill
#

I will send messages to only one channel of a server, how can I do this.
This server will only be on the bot's main discord server.

west raptor
#

Fetch the channel and send the message

quartz hill
#

client.channel.get(channelid).send("msg");
this?

#

javascript

west raptor
#

Something along those lines yes

#

Proper error chandling might be good as well

#

Handling*

#

Gotta love mobile

quartz hill
#

try catch

west raptor
#

Yeah or just fetch and check if it exists

#

Either way works

quartz hill
#

thx so much 😄

slate wave
#

Honestly I just need ideas for commands im not creative at all 😐

slender mountain
#

Just copy other bots

#

But don't copy other bots guncat

#

capeesh?

slate wave
slender mountain
#

As in look what commands other bots have

#

But don't just copy code

slate wave
#

lol there was someone that said they need my source code to make sure my bot wasnt a spam bot mewhenhubgetsreleased

slender mountain
#

lol

#

Cool idea, if you have nitro

#

is to make an emoji stealer

slate wave
#

I dont feel like paying for nitro lol

#

imma add reaction roles or something

slender mountain
#

I made the emoji stealer

#

is pretty fun to see peoples reactions

#

can even steal reaction emojis

slate wave
#

Is that not against TOS?

slender mountain
#

Don't imagine why it would be

#

as long as they aint copyright

#

You can do it manually

slate wave
#

Yea

scenic kelp
#

It does sound like it's against TOS since I'm assuming you're using a user account to fetch the emoji URLs

slender mountain
#

Nope

#

I don't fetch the URLS

#

I fetch the name of the emoji and the id

#

which is what the url is composed of

scenic kelp
#

Same difference...

slender mountain
#

But it isn't a user account well

#

I would fetch the url

#

less work

#

but can you even?

slate wave
#

Damn it I started csgo on accident

slate wave
#

How do I get a message from a server by it's ID?

#

Im trying to get reactions from the message btw

slender mountain
#

message.channel.fetch

#

or fetchMessage

#

if your not on master

slate wave
#

So I would have to get the channel from the discord then fetch the message?

slender mountain
#

look at the docs

#

yes

slate wave
#

So I just need to add the channelID to the json

slender mountain
#

client.channels.get(CHANNEL_ID).fetchMessage(MESSAGE_ID)

slate wave
#

Imma go through the guild to get the channel

slender mountain
#

You don't need to go through the guild

slate wave
#

don't need

slender mountain
#

just sayin

slate wave
#

Yea ik I just like it more spread out

#

its just my coding style

#

There is no messages method of a channel

modest maple
#

Well that's one way to needlessly go and call a load of API requests

slender mountain
cinder patio
#

not much of a difference if the guild/channels are cached really

slender mountain
#

@slate wave I think only master has that

#

try just channel.fetchMessage instead

restive furnace
#

@slate wave client.guilds.get(ID).channels.get(ID).messages.fetch(ID)

#

or fetchMessage if youre still on v11

slate wave
#

i think I got it 1 sec

slender mountain
modest maple
#

if you're trying to get a reaction on a message why not just store the message object

slate wave
#

I want to update the reactions and have it work even if I restart the bot

modest maple
#

you could still do that by storing the object...

#

rather than making an api request which can get oofed by cache

restive furnace
#

i have custom msg cache :DD

slate wave
#
    let channel = guild.channels.get(bot.reactRoles[i].Channel)
    fs.writeFile("./Jsons/Testing.json", JSON.stringify(channel.messages), err =>{
        if(err) throw err
    })
#

That turns the Testing.json to have nothing in it

#

Because then I use ```js
let message = channel.fetchMessage(bot.reactRoles[i].messageID)

#

That doesnt work even when I use

let message = channel.messages.fetch(bot.reactRoles[i].messageID)
quartz kindle
#

Can you even stringify a collection?

#

Also, fetching is async

#

So both .fetch and .fetchMessage needs await or .then

slate wave
#

Even when I dont stringify it it doesnt work

quartz kindle
#

Of course it doesnt

#

.messages is a collection, which is a complex structure, it cannot be stringified

slate wave
#

Yea but it doesnt work when I don't stringify it

quartz kindle
#

You need to take what you need out of it and build a simple object

#

Of course it doesnt, you cant save non stringified objects

slate wave
#

yes you can

quartz kindle
#

Unless you save them as a buffer or blob or something

#

Anyway what part of messages do you need to save?

slate wave
#

I have the ID saved and I need to get the message to get the reactions from it

quartz kindle
#

I mean, you have writeFile on channel.messages

#

Thats trying to save all cached messages from a channel in a file

earnest phoenix
#

ahhh

#

it does have

modest maple
#
  1. not the right place to talk about that
  2. DM the mod who declined your bot
earnest phoenix
#

where can i know who declined it ?

modest maple
mossy vine
modest maple
#

beat u that time cyber :P

marble juniper
#

uh so

#

I have a script for recieving a post method

#

and so on pretty easy

#

but it tells me that it cannot read url of undefined

#
app.post("/upload", (req, res) => {
   console.log("recieved a post method")
    if (!req.body.url) return console.log("no url value posted cancelling...")
    else console.log(req.body.url)
});
#

I did execute a post method on the url/upload

#

with a json and a url object

#

it tells me that url is not defined

#

and idk why

#

im using https://ifttt.com to make a web request if I like a video

#

and then send the url

#

looks like this

#

but idk why it gives me an error because I do post the url to it

coral trellis
#

Are you using body parser?

marble juniper
#

uh no

#

idk

coral trellis
#

Using express right?

marble juniper
#

yes

coral trellis
#
const bodyParser = require('body-parser');
app.use(bodyParser.urlencoded({extended: false}));
#

This will allow you to read req.body

marble juniper
#

well in my other api I have bodyparser

#

maybe that was missing

#

k thanks I will try it now

#

also I don't think I need body parser

#

cuz it also works with express.urlencoded

#

ok so I added it now

#

but it tells me now constantly that url doesn't exist

#

aka return console.log if there is no req.body.url

#

oof

#

doesn't matter how I do it

#

it just tells me it doesn't exist

coral trellis
#

console.log(req.body)

marble juniper
#

Im gonna try your method with that module

coral trellis
#

And see what it returns

marble juniper
#

ok

coral trellis
#

Cause it might actually be sending it as something else

marble juniper
#

result was

#

{}

#

I did eval a post method with my bot this time

#
require("axios").post("https://youtube-video-converter.glitch.me/upload", {url: "ok"})
#

this is what I evaluated

coral trellis
#

Strange

earnest phoenix
#

How to add 3 owners in a bot

#

I added 2

modest maple
#

add a 3rd

earnest phoenix
#

I cant see another box to add

modest maple
#

you do it on the same box

#

seperating it with a ,

earnest phoenix
#

How to add 3rd

#

How man

#

Let me try

modest maple
#

<ID1>, <ID2>, <ID3>

earnest phoenix
#

Not working

modest maple
#

send a ss

uneven wyvern
#

@earnest phoenixdo it in a array

earnest phoenix
#

Like this ?

#

586214600412758040, 592792499739820230

modest maple
#

yes

earnest phoenix
#

Not workings

modest maple
#

where are you putting this?

#

send a ss

earnest phoenix
uneven wyvern
#

["586214600412758040", "592792499739820230"] @earnest phoenix

modest maple
#

@uneven wyvern you dont do that with the site

uneven wyvern
#

Wrong Ping fuck

earnest phoenix
#

Let me try

modest maple
uneven wyvern
#

Oh

modest maple
#

you do not have it like an array

uneven wyvern
#

In the Site

#

I thought in coxe

#

JEUSUS

#

AHW

earnest phoenix
#

@uneven wyvern its invaild format

marble juniper
#

coce cocde coxe

uneven wyvern
#

fuckin little phones these days

earnest phoenix
#

586214600412758040, 592792499739820230

#

RIGHT

#

?

uneven wyvern
#

yeah

marble juniper
#

you seperate it

#

with a,

earnest phoenix
#

@modest maple ?

#

should i just dm you it?

#

Not working

modest maple
#

@earnest phoenix whats it saying

earnest phoenix
#

Nothing

modest maple
#

@earnest phoenix yh, it looks mostly correct so im not entirley sure

uneven wyvern
#

bruh

earnest phoenix
#

It showing 2 devs alone

modest maple
#

are you adding your own ID to that list

earnest phoenix
uneven wyvern
#

lmao

earnest phoenix
#

Another dev is not here

marble juniper
#

seems like

#

I also needed app.use(express.json())

#

because I did get a body

#

but wasn't able to read the url object

#

or any json

#

aaaand now I got a 503 error

earnest phoenix
#

guys, what is good youtube package for js

mossy vine
#

a package for interacting with the youtube api

marble juniper
#

@earnest phoenix what exactly do you want to do get video info or what

earnest phoenix
#

mostly for playing music

marble juniper
#

simple youtube api

mossy vine
#

then ytdl-core

earnest phoenix
#

^ i have heard about it

#

ight

#

imma see what i can do

wooden lance
#

Does anyone know a way to see who made an edit (e.g. deleting a channel)? (js)

#

i thought of fetching the info from the audit logs but couldn't find a way to do it

sudden geyser
#

what library

wooden lance
#

js

sudden geyser
#

discord.js?

wooden lance
#

yes

earnest phoenix
#

you have to check audit logs

wooden lance
#

yes but i have no clue how to do that

earnest phoenix
#

browse the docs

sudden geyser
#

check under guilds for fetching audit logs

wooden lance
#

@sudden geyser aha found it thanks

summer torrent
#

fetch executor from audit logs

earnest phoenix
#

can i get some help with mysql?

#

i keep getting this error but don't know how to fix it

#

have you tried reading the error

#

doesn't make much sense at all to me

#

i get that it says level doesnt have a default value but i dont understand how to fix it

#

ive looked on google but the answers don't make much sense either

valid frigate
#

it uh

#

you're not specifying level?

earnest phoenix
#

explain?

valid frigate
#

bruh

#

if you read the error it gives you the sql query as well

#

there is probably more than 2 rows in your databasr

#

one that is "level" and you're not specifying it

#

just speculation

earnest phoenix
#

but then how would i specify it?

valid frigate
#

you add it to your query

earnest phoenix
#

wait let me send some code and take a look, cuz i think i already have

valid frigate
#

ok

earnest phoenix
#

although knowing me, my code probably doesnt even work

#

sorry, most likely*

earnest phoenix
#

... it doesnt work does it

quartz kindle
#

INSERT INTO info (id,coins)

#

Youre inserting only an id and a coin value. If your table has any other columns (which looks like it does) they need to have a default value configured, or be explicitly inserted as well

earnest phoenix
#

i uh... dont really understand...

quartz kindle
#

You know what is a table?

earnest phoenix
#

yeah

quartz kindle
#

You know what are columns?

earnest phoenix
#

yeah

quartz kindle
#

Which columns do you have?

#

On the info table

earnest phoenix
quartz kindle
#

Id level xp and coins

#

None of them have a default value

#

That means every time you do an INSERT, you need to insert a value for all of them

#

INSERT INTO info (id,level,xp,coins) VALUES (bla,blab,lab,la)

#

You cannot insert only id and coins

earnest phoenix
#

so basically even for the xp and id if i want to add only those, i still have to add the others and just assign them as 0 for example?

quartz kindle
#

Yes

earnest phoenix
#

ah okay

#

does the order matter?

quartz kindle
#

Unless you give those columns a default value during table creation

#

Nope, order doesnt matter

#

As long as the order inside the () is the same

earnest phoenix
#

and thats for the first time a new user is added right?

quartz kindle
#

Yes

earnest phoenix
#

so the update is fine as it is

quartz kindle
#

After that you can update columns individually

earnest phoenix
#

ah okay

#

thank you for the help

quartz kindle
#

👍

celest spear
#

is it possible that the bot can react by order?

sudden geyser
#

yes (depends what lang)

celest spear
#

js

sudden geyser
#

when you react, await it and do it in order or use a bunch of .then in order (reasonably)

celest spear
#

i did that

#

and did not go to order

sudden geyser
#

code?

celest spear
#
  let s = args.join(' ')
    if(!s) return message.channel.send(`Hello <@${message.author.id}>, I cannot send an empty suggestion!`)

    let e = new Discord.RichEmbed()
    .setTitle(`Suggested by: ${message.author.tag}`)
    .setDescription(s)
    .setColor(color)

client.channels.get('661141334937305108').send(e).then(m => m.react(':tick:').then(m.react(':deny:')))
sudden geyser
#

.then accepts a function, not a promise for your 2nd .then.

#

also I don't think that's correct usage

celest spear
#

but it works

summer torrent
#
let m = client.channels.get('661141334937305108').send(e)
m.react("")
m.react("")```
celest spear
#

@summer torrent oh ty

sudden geyser
#

example won't work but promises like:

await msg.react(1starg)
await msg.react(2ndarg) // This happens 2nd because first one is awaited```
summer torrent
celest spear
#

k

#

ty

earnest phoenix
#

ok, it did work but for some reason it creates 2 of the same user?

#

@quartz kindle

quartz kindle
#

are you inserting it twice?

#

also, if you want your users to be unique, you should define the user id as a UNIQUE column

#

idk which software you're using to manage your database, but look into how to create unique indexes on an existing column, or just drop the table and rebuild it that way

earnest phoenix
#

Inserting it twice?

grizzled raven
#

😏

earnest phoenix
quartz kindle
#

your code flow is very messy and unoptimized, so its very difficult to understand whats happening

#

try reducing the amount of database calls and duplicated stuff

earnest phoenix
#

yeah i know... sorry about that

quartz kindle
#

for example, start with merging the xp system and coin system in the same function because its the same table after all

#

so you only open the table once

earnest phoenix
#

so the insert change it to ````INSERT INTO info (id,xp,coins,level) VALUES ('${msg.author.id}', ${generateXp}, ${generateCoins}, ${curLvl})` ```?

quartz kindle
#

well, if you're inserting, that mean it doesnt exist yet, so you can insert the default values, no need to use any function

#

and then you can safely exit the function i guess

#

for example js connection.query(stuff, () => { if(!rows) { insert all default values; return; } continue code here if user already exists })

earnest phoenix
#

huh?

#

so... ```connection.query(SELECT * FROM info WHERE id = '${msg.author.id}', (err, rows) => {
if(err) throw err;

    let sql;
    let curLvl = 1;
    let nxtLvl = 1;

    if(rows.length < 1) {
        sql = `INSERT INTO info (id,xp,coins,level) VALUES ('${msg.author.id}', 0, 0, 1)` ```
#

?

quartz kindle
#

think about the order of operations

#

if there is no user, you dont even need to begin any current/next level logic

#

because it wont be used anyway

earnest phoenix
#

but if this is triggered on message?

#

or are you referring to the curLvl and nxtLvl?

quartz kindle
#

yes

#

and also, assuming there is nothing to do after inserting a user, you dont need to declare sql outside and assign it like that

#

you can just run the query directly

#

if(length < 1) { connection.query(INSERT ...) }

earnest phoenix
#

ok

quartz kindle
#

idk which mysql library you're using, but maybe its easier if you use async, if it supports it

earnest phoenix
#

mysql: "^2.17.1" is what it says in my package.json

#

and the client runner is MySQL 8.0

#

so async sql?

#

ill just leave it as connection.query

quartz kindle
#

i cant find anything in the docs about async

#

so yeah you'll have to stick with callbacks

#

so you will need to build if-else trees basically

earnest phoenix
quartz kindle
#
if(rows < 1) {
  connection.query(INSERT,error check)
} else {
  check level and xp logic
  connection.query(UPDATE, error check)
}```
#

exactly, except the sql part

#

doing sql = something doesnt run anything

#

you need to run it with connection.query

earnest phoenix
#

so change sql to connection.query

#

and that should be fine right?

quartz kindle
#

yeah, also dont do one update for each individual field, update them all at once

earnest phoenix
#

how would i lay it out for that?

quartz kindle
#

SET xp = newxp, level = newlevel, coins = newcoins WHERE id = author.id

earnest phoenix
#

ok as for the lvl up thing? it doesnt work, eg my user is at lvl 1 and has 600 xp, but i should be at lvl 2 if i had 300

#

@quartz kindle ?

uneven wyvern
#

how to check if a number gets added in js?

earnest phoenix
#

when you realise despite all this code you need to find a free way to run your bot 24/7 still because heroku is god awful

#

😁

quartz kindle
#

@earnest phoenix you're not really doing any level logic in there? show your generate functions

earnest phoenix
#

well i havent added yet because i wanted you to help me out with it

#

before you helped me change everything to keep it tidier, i had this, but it didnt work

quartz kindle
#

how much xp do you add per message?

earnest phoenix
#

its random between i think 10 and 30 xp?

#

or 20 and 30

quartz kindle
#

so basically the logic should be:

  1. get current xp and add random xp
  2. if current xp > level threshold
    2a. reset xp, add level, save xp and level to database
    else
    2b. add xp, save xp to database
earnest phoenix
#

ok

#

hmm

#

wait how would i get the new xp value that is stored in the database?

quartz kindle
#

what new xp? to do what with it?

earnest phoenix
#

to compare it to the max amount of xp before leveling up

#

if that makes sense?

#

assuming thats what you're saying

quartz kindle
#

you already have it

#

from rows[0]

earnest phoenix
#

oh right

#

so if i do if(xp > level * 300) that bit works fine

#

that'll have the users level and xp from the database right?

quartz kindle
#

if you get the xp and level from rows[0] yes

#

rows[0] should be the values in the database

earnest phoenix
#

i have xp = rows[0].xp so that would auto assign xp to the one in the database right?

#

oh also in the new code where am i adding this?

quartz kindle
#

technically you're giving xp a copy of the value of the database's xp, but yes

earnest phoenix
#

as for where to put the code?

quartz kindle
#

which code?

earnest phoenix
#

for the leveling up system to work

quartz kindle
#

where else would it go?

earnest phoenix
#

i mean like in the else statement or outside it

quartz kindle
#

if you put it outside it would be executed regardless if the user exists or not

#

which is probably not what you want

earnest phoenix
#

so inside

#

and before the query to update right?

quartz kindle
#

yes

earnest phoenix
#

ok

#

wait would i have to add a new update thing?

#

in order to increase the level and reset the xp to 0

gray laurel
#

All hässlich 😂

#

💦

earnest phoenix
#

oh...

#

@quartz kindle i did it but for some reason the id and stuff is still being added twice

sudden geyser
#

where do you define sql

earnest phoenix
#

no i sorted that problem out, i just removed that line, it wasnt needed

quartz kindle
#

you never do multiple queries, you do all the logic and then update everything in one go

#

else you will be trashing your database with too many requests

earnest phoenix
#

then?

quartz kindle
#

i mean, its quite simple logic, what is it that you dont understand?

earnest phoenix
#

i have this now but if you're saying updating twice will trash it then how would i reset things to 0 one they level up?

quartz kindle
#

just do what i told you before

#
  1. if current xp > level threshold
    2a. reset xp, add level, save xp and level to database
    else
    2b. add xp, save xp to database
earnest phoenix
#

but isnt that it what i did there?

quartz kindle
#

you didnt do an if/else

#

you did and if/and

#

basically

earnest phoenix
#

oh

#

wait what do i do for the else then? return?

quartz kindle
#

also, you need to add the xp before you compare with level

#

no, you update only the xp, instead of xp and level

earnest phoenix
#

wait gtg

#

ill be back in like 30mins if you're still online

analog roost
#

So I got an error saying MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 message listeners added to [Client]. Use emitter.setMaxListeners() to increase limit

amber fractal
#

Congrats you're listening to an event 11 times

modest maple
#

Real pro's listen to the event 12 times dabward

amber fractal
#

Real pros make a new listener for each command

earnest phoenix
#

uhh @quartz kindle ?

analog roost
#

@wise sail wow you bullying me

valid frigate
#

why you bully me

earnest phoenix
#

@quartz kindle can you explain the lvl up thing again? it doesnt 100% work

quartz kindle
#

@analog roost are you doing something like this? ```js
client.on("message", message => {
command 1
});

client.on("message", message => {
command 2
});

etc...```

#

or something like this? js module.exports = () => { client.on("message", message => { command 1 }) }

#

@earnest phoenix missing access means your bot could not find the message or channel it was looking for

earnest phoenix
#

ah

#

well uh, the xp thing isnt really working now...

errant quarry
#

command discrim allows users to get usernames of everyone in the specified # please remove this

#

is that against tos?

modest maple
#

yes if its across all servers

earnest phoenix
errant quarry
#

if I make it server specific is it okay then?

strong mortar
#

Oof

quartz kindle
#

@earnest phoenix you didnt change anything, you're still doing the same thing... if/and

earnest phoenix
#

i fixed it and it works?

quartz kindle
#

and you dont have any generateXp() nor generateCoins() functions

earnest phoenix
#

generateXp and stuff are above

#

you cant see in that screenshot

quartz kindle
#

oh now you tell...

earnest phoenix
#

sorry

quartz kindle
#

i told you to show them long time ago and yo said you didnt have them because you were waiting for help lol

#

but you're still not doing what i told you to

earnest phoenix
#

oh...

quartz kindle
#

you're checking how much xp the person has before adding it, and you're not using if/else, you're running both queries

#

i'll give you a hint

#
let newxp = xp + generateXp();
let newcoin = coin + generateCoin();

if(newxp > level * 300) {
  connection.query(level = level + 1, xp = 0, coin = newcoin);
} else {
  connection.query(xp = newxp, coin = newcoin)
}```
storm wagon
#

For discord.py, in a channel's history, how do I check if a member has never sent a message?

earnest phoenix
#

you can't without spamming the api until you get to the first message in the channel

wooden lance
#

My bot just tried addRoles() on a bot and it got a Missing Permissions error even though it has enough permissions. Anyone know why it's happening?

earnest phoenix
#

it can't modify itself or users higher above it in the hierarchy

wooden lance
#

It is above the user

earnest phoenix
#

are you sure

wooden lance
#

Yes

#

positive

earnest phoenix
#

is the user the guild owner?

wooden lance
#

No it's a bot

#

wait a second issue found, it's trying to edit the bot's role, as in the one it manages

grizzled raven
unkempt ocean
#

are video embeds working? any ideas

merry reef
#

I'm not sure if this is the correct place it ask, but is there a way to set this (see image) as just an image without any text?

earnest phoenix
#

Heres what it says if the picture is to small to read ---> (node:1962) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 message listeners added. Use emitter.setMaxListeners() to increase limit

#

Im coding on JS

earnest phoenix
#

are video embeds working? any ideas
what do you mean?

#

I'm not sure if this is the correct place it ask, but is there a way to set this (see image) as just an image without any text?
use the html img tag and fill the rest of the description with zero width characters

#

I keep getting this in my logs. How to I set max listeners since it keeps telling me to, im confused on that part.
don't, stop creating a new listener for each command, handle your commands in one listener only

#

Ok thanks

nocturne dagger
#

Can anyone spot the error it doesnt work

#
  const modr = message.createReactionCollector(mod, {
                time: 1000000
            });

modr.on('collect', r => {
      message.delete();
let modembed = new Discord.RichEmbed()
  .setTitle("Moderation Commands")
  .setDescription("Kick\nBan\nPurge\nchanneln\delete-chan")
message.channel.send({
embed: modembed
}  )
topaz fjord
#

what doesn't woek

#

work

nocturne dagger
#

when I react to it it doesnt do anything

#

no errors in logs either

topaz fjord
#

Nothing comes out when you log r

#

?

#

@nocturne dagger

nocturne dagger
#

one sec

earnest phoenix
#

maybe try indenting your embed command

topaz fjord
#

that won't do anything

#

this isn't python

nocturne dagger
#

no nothing

topaz fjord
#

what is message

nocturne dagger
#

wdym

topaz fjord
#

Is it the message from the message event or a sent message

nocturne dagger
#

its the message that has the embed that lists the reaction

topaz fjord
#

can you show what mod is

nocturne dagger
#
const mod = (reaction, user) => reaction.emoji.name === mode && user.id === message.author.id;
const fun = (reaction, user) => reaction.emoji.name === fune && user.id === message.author.id;
const info = (reaction, user) => reaction.emoji.name === infoe && user.id === message.author.id;

  
  const modr = message.createReactionCollector(mod, {
                time: 1000000
            });
#

the mode is the emoji

topaz fjord
#

It could be possible that the mod filter's conditions aren't being met so it's not gonna collect the reaction

#

check if the emoji name it's matching is right

nocturne dagger
#

const mode = "🛑"

#

thats what i have

#

do i need the name liek the :emojiename:

#

i just have a copy paste emoji

topaz fjord
#

if you pass an empty filter, and log r what happens

#

(react with the same emoji)

nocturne dagger
#

wdym empty filter

#

?

west spoke
#
from flask import Flask

app = Flask(__name__)

@app.route('/home/pi/html',methods=['GET','POST'])
def index():
    return 'just the main area.. nothing to see here'
    
if __name__ == '__main__':
    app.run(port=5644)
#

ok

#

im trying to set up a webserver to communicate with my bot (and other things i will be making)

#

but how would i get other files in the directory

nocturne dagger
#

Tutrtle figured it out thanks for the help anyway

west spoke
#

in the app.route area

topaz fjord
#

@nocturne dagger const hello = (reaction, user) => true

#

oh

west spoke
#

*nevermind i found the problem

ivory sapphire
#

With async for message in channel.history(...), how far back can you go without it being considered API abuse? It's something I've wondered about for ages haha

west spoke
#

GET doesnt have a heavy ratelimit, and that would be fine i believe

earnest phoenix
#

api abuse would be continuing to do the same thing over and over again after already getting ratelimited twice or three times

ivory sapphire
#

Aah okay

#

So technically using that can't be API abuse then? Cos it doesn't rate limit to my knowledge, at least getting stuff (as Neko said)

earnest phoenix
#

every endpoint has a ratelimit

#

neko said the ratelimit isn't heavy

west spoke
#

for once cry agrees with me lol

#

/s

ivory sapphire
#

I meant to say I've never seen it rate limit in my experience - sorry should've been clearer haha

#

I just didn't know if there was like a limit you should keep to, like 1,000 messages or something

#

But thinking about it a limit would've been implemented in the API if it was a massive issue

slender thistle
#

Eh I don't think message.history has a ratelimit or it's really huge

ivory sapphire
#

Fair dos, cheers

willow wraith
#

How to do it at Server Info it will show how many boosts there are to serve

earnest phoenix
#

in which library

willow wraith
#

js

earnest phoenix
#

in which library

willow wraith
#

JavaScript

earnest phoenix
#

yes but what is the library

willow wraith
#

discord.js

earnest phoenix
#

you have to use the master version

#

stable doesn't support it

minor kelp
#

lol r i p

restive furnace
#

you can use 11-dev too

#

if you dont want to use master and rewrite all embeds, some things

golden raven
#

In discord.py how to set prefix as string, i have tried but returns nothing

#

like bot

modest maple
#

There are alot of ways

#

It depends on if you're using client or bit

golden raven
#

bot

modest maple
#

Or if you're using custom prefixes

sullen salmon
#

if message.content.startswith == "bot": etc

golden raven
#

@sullen salmon im asking python

sullen salmon
#

This is python

modest maple
#

That's not

#

XD

sullen salmon
#

How is it not

#

It's a python if statement

#

Fuck

golden raven
#

i think it is ctx.message.startswith

modest maple
#

Well for starters starts with is a function

sullen salmon
#

Oh I might remember it wrong then

modest maple
#

Secondly you don't use one = as a comparison

golden raven
#

open brackets right?

sullen salmon
#

Jee forgive me for not being faultless

modest maple
#

3rdly thats gonna be caps sensitive

sullen salmon
#

Why are programmers like this

modest maple
#

Because don't spoonfeed code

sullen salmon
#

Yhea it's a prefix, it's supposed to be case sensitive

modest maple
#

And if your ur gonna spoonfeed code atleast know what Ur doing yourself

sullen salmon
#

How is this spoonfeeding

#

It gives perfect insight into what to do

#

It teaches the use of startswith

modest maple
#

Even tho the bot class you can Parse the prefix on start

golden raven
#
if ctx.message.startswith("bot help"):
    # code..

will this work?

modest maple
#

Well that's saying check the message object if it starts with not if the content starts with

#

Also if you're using the bot object why not use cogs?

golden raven
#
if ctx.message.content.startswith("bot help"):
    # code..
#

bot.cogs ?

modest maple
#

Well your using the bot object so you might aswell use cogs rather than hard coding if, elif, elif, elif, elif etc...

golden raven
#

ok

barren heath
#
@client.command()
async def shiba(ctx):
    with open("shiba.json") as url:
        r = re.compile(r"https://i\.redd\.it/\w+\.jpg")
        matches = list(set(m.group(0) for m in r.finditer(url.read())))
        ctx.send(random.choice(matches))

It gives me an error saying: "discord.ext.commands.errors.CommandInvokeError: Command raised an exception: FileNotFoundError: [Errno 2] No such file or directory: 'shiba.json'"

knotty steeple
#

well it cant find the file

barren heath
#

yeah ik

knotty steeple
barren heath
#

but why

knotty steeple
#

is it in the same place that command is

#

idk

barren heath
#

oof

knotty steeple
#

python

#

so i cant really help much

barren heath
#

oh rest in peace discord.js user

knotty steeple
#

i dont use d.js

barren heath
#

u use wot

modest maple
#

You have to give it the directory

#

Unless it's in the same folder as the code

#

You must give it path

barren heath
#

:/

#

oh nice so cogs?

#

or no

modest maple
#

What

barren heath
#

idk

modest maple
#

You literally just add the path to the file name

#

Like

#

This is basic python

barren heath
#

oof im dumb af

#

ITS WORKING

#

THANKS FOR YOUR HELP

heavy grotto
#

Who here is interested in converting a Python script to PHP?

earnest phoenix
#

gzys

#
    throw err;
    ^

Error: Cannot find module 'C:\Users\itzem\Desktop\EasyTicket\run'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:966:17)
m
    at Function.Module._load (internal/modules/cjs/loader.js:859:27)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71
:12)
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}
PS C:\Users\itzem\Desktop\EasyTicket> node run index.js
internal/modules/cjs/loader.js:969
    throw err;
    ^

Error: Cannot find module 'C:\Users\itzem\Desktop\EasyTicket\run'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:966:17)
m
    at Function.Module._load (internal/modules/cjs/loader.js:859:27)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71
:12)
    at internal/main/run_main_module.js:17:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}```
#

help

tulip wave
#

node index.js

#

you dont need to type run

earnest phoenix
#

kk

#

@tulip wave

#

the bot goes dowsnt on

tulip wave
#

what?

wheat jolt
#

The bot doesn't go on *

#

Show us the error

#

The log

tulip wave
#

ah

earnest phoenix
#

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


consttoken = 'MY TOKEN';

bot.on('ready', () =>{
    console.log('EasyTicket Erfolgreich gestartet!');
})

bot.login(token);```
#

it doesnt comes a error

wheat jolt
#

const token*

#

Not consttoken

tulip wave
#

const Discord = require("discord.js")

#

you need to declare what Discord is

wheat jolt
#

Uhm

tulip wave
#

nsv

#

it was outside the code block

wheat jolt
#

Yup

tulip wave
#

am dum

earnest phoenix
#

what?

tulip wave
#

@earnest phoenix your const token line

#

you have it as consttoken

wheat jolt
#

instead of consttoken you should have const token

earnest phoenix
#

yes guys

#

i fixed it

#

but doesnt works

tulip wave
#

what is the error

earnest phoenix
#

doesnt comes a error

wheat jolt
#

Make a screenshot after you do node index.js

earnest phoenix
wheat jolt
#

You have an extra space when between new and Discord.Client() ?

earnest phoenix
#

wdymn?

sudden geyser
#

reset your token

#

the extra space doesn't affect the program

earnest phoenix
#

kk

#

@sudden geyser i resetted the token

#

it deosnt works

#

oof

wheat jolt
#

Press Ctrl + S

#

Then run again

earnest phoenix
#

worked

wheat jolt
#

Yup

#

Don't forget to save index.js after modifing it

earnest phoenix
#

How to go to New line

#

<br/> not working

wheat jolt
#

\n

#

Yup, \n

tulip wave
#

\nthis is a new line

#

adding a space after \n will make the text
start like this

wheat jolt
#

Yeah

tulip wave
#

some people dont figure that out

#

i found out the hard way lol

earnest phoenix
#

help

#
    at WebSocketConnection.<anonymous> (C:\Users\itzem\Desktop\EasyTicket\node_modules\discord.js\src\client\ClientManager.js:48:41)
    at Object.onceWrapper (events.js:412:26)
    at WebSocketConnection.emit (events.js:305:20)
    at WebSocketConnection.onClose (C:\Users\itzem\Desktop\EasyTicket\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:390:10)
    at WebSocket.onClose (C:\Users\itzem\Desktop\EasyTicket\node_modules\ws\lib\event-target.js:124:16)
    at WebSocket.emit (events.js:305:20)
    at WebSocket.emitClose (C:\Users\itzem\Desktop\EasyTicket\node_modules\ws\lib\websocket.js:191:10)
    at TLSSocket.socketOnClose (C:\Users\itzem\Desktop\EasyTicket\node_modules\ws\lib\websocket.js:850:15)
    at TLSSocket.emit (events.js:317:22)
    at net.js:667:12
(node:9444) 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:9444) [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.```
modest maple
#

Incorrect login details given

earnest phoenix
#

no its righht

modest maple
#

No is definitely not

earnest phoenix
#

oof

modest maple
#

I'm guessing it's the wrong token you've given it for client

earnest phoenix
#

its right

warm marsh
#

Clearly not

modest maple
#

It's is quite definitely wrong

earnest phoenix
#

i just found this gem for this channel