#development

1 messages Β· Page 1329 of 1

gentle lynx
#

ok

carmine summit
#
(message.content.toUpperCase() == 'NO' || message.content.toUpperCase() == 'N')
```how do i merge this?
opal plank
#

huh?

slender thistle
#

["no", "n"].includes(message.content.toLowerCase())

gentle lynx
opal plank
#

you pass a function

#

not a string

#

that whole query() thing

#

promisification is just getting rid of callbacks and returning you the value

gentle lynx
#

?

opal plank
#

try it

gentle lynx
#

doesnt work

quartz kindle
#

promisification depends on some compatibility constraints. if your sql library is compatible, it will be something like this:

gentle lynx
opal plank
#

i only had to use promisification a couple times

earnest phoenix
#

promisification depends on some compatibility constraints. if your sql library is compatible, it will be something like this:
@quartz kindle and then someone else sent a screenshot which was completely unrelated to what Tim was saying

quartz kindle
#
// right after you define client.con
client.con.promisifiedQuery = util.promisify(client.con.query);

// your code here
let result = await this.message.client.con.promisifiedQuery(sql)
#

you promisify the function itself at the beginning of the code, then use the new promisifed version everywhere

opal plank
#

that'd be smarter

#

in this case they could just do without the query(sql) and use query instead though

sharp thicket
#

hi

opal plank
#

though yeah, not using promises nowadays is just a pain and a half

quartz kindle
#

you shouldnt even be using libraries that use callbacks these days xD

sharp thicket
#

why do people hate global.<name> so much its useful

quartz kindle
#

namespace pollution

opal plank
#

^^

sharp thicket
#

oof

quartz kindle
#

its fine to use globals in your own projects

opal plank
#

tim what do you think of me possibly attaching the whole client object with hundreads of other shit in it onto process ?

quartz kindle
#

but if you ever write a library on npm for example, and it uses globals, it can easily interfere with other libraries

sharp thicket
#

i have a global function named exit() lol

#

yeah ik

#

i use like

quartz kindle
#

@opal plank well why not xD

opal plank
gentle lynx
#

holy fuck tim

foggy cove
#

saw someone's code one time and it was filled with so many constants he didnt even use

gentle lynx
#

thank you

#

!!

opal plank
#

im really tired of passing around client on every single function i do

quartz kindle
#

yw

#

i mean

opal plank
#

though im also lazy to go remove client from every single function i have

quartz kindle
#

if you pass any other djs object/class, you dont need to pass client

sharp thicket
#

global.exit = function exit(exitcode){
Blah code
}

opal plank
#

im not even gonna lie, i barely touch classes

#

even though i make a shit ton of interfaces and types

earnest phoenix
#

im not even gonna lie, i barely touch classes
@opal plank That's schoolism angeryBOYE

sharp thicket
#

wait can you define constructors with global ?

#

like

#

global.bot = new Client()

quartz kindle
#

i mean like, if you use (client,message) => {}
you might as well use message => {}

opal plank
#

@earnest phoenix i only enjoy alcoholism, sorry

quartz kindle
#

no need for client

opal plank
#

not even for that tbh

#

actually

#

here

#

lemme grab the interface from client rq

quartz kindle
#

@sharp thicket yes you can

sharp thicket
#

nice

earnest phoenix
#

k

opal plank
#

for d.js this is fine

#

like you said, its attached onto message

sharp thicket
#

i alr use .run(bot , message, args) tho so no need for it

quartz kindle
#

you dont need bot

#

you can just use message.client

opal plank
sharp thicket
#

not every time

opal plank
#

but then theres this on twitch

earnest phoenix
#

wait is that the actual code of discord.js @opal plank

opal plank
#

no

sharp thicket
#

ik but im too lazy to type message

opal plank
#

thats my interface

sharp thicket
#

lol

earnest phoenix
#

oh k

opal plank
#

and me redeclaring the client class

quartz kindle
#

let bot = message.client

#

:^)

sharp thicket
#

ok that smart

quartz kindle
#

whats client.rip lmao

sharp thicket
#

or i use global in my message.js (comand handler) and define it

opal plank
#

erm

sharp thicket
#

idk

opal plank
#

eeerm

#

eeeeeeeeerrrm

sharp thicket
#

maybe kills client?

earnest phoenix
#

Is there a reason why JavaScript timeouts sometimes last for 1 minute+ when I wrote with as 5000 miliseconds?

#

whats client.rip lmao
@quartz kindle sleep mode?

opal plank
#

lets just say that shouldnt be there

sharp thicket
#

@earnest phoenix it may be ur code

opal plank
#

its a simple RIP command

quartz kindle
#

@earnest phoenix nope

earnest phoenix
#

ok

opal plank
#

like, a RIP counter

#

someone diess, +1 Rip

earnest phoenix
#

lmfao

quartz kindle
#

xD

opal plank
#

my brain, i cant even type anymore

#

im struggling to TYPE ffs

sharp thicket
#

@earnest phoenix if ur host/pc/server is slow/bad the other code can make a delay

earnest phoenix
#

yeah

opal plank
#

yesterday that sharding took out every braincell i had

earnest phoenix
#

my computer thinks it's 11 AM even though it's 4:36 PM

opal plank
#

hence why you await for promises

#

and do proper code

sharp thicket
#

i tried breaking a world record for most clients in one code

opal plank
#

cant be bothered by delay/slow pc if everything is chained

sharp thicket
#

i only go 160 oof

#

got*

opal plank
#

PPPPFFFFFFFFFFFFFFF

#

how cute

sharp thicket
#

what

quartz kindle
#

160 clients

#

wtf

sharp thicket
#

ik world record

opal plank
#

my shards spawn a client EACH

earnest phoenix
#

this is the code and this.receiving only changes back to a true after a minute of being changed into false

opal plank
#

i think i did 400 on stream in voice chat here

#

best part?

sharp thicket
#

@earnest phoenix what do you host on?

quartz kindle
#

@earnest phoenix check if that code is not being executed multiple times, like by multiple people using the same command

sharp thicket
#

yeah thats smart

quartz kindle
#

so once it turns back to true, another command makes it false again

earnest phoenix
#

@earnest phoenix what do you host on?
@sharp thicket digitalocean $40 tier

#
d3.selectAll("button").transition()
.style("display","none");

how do i change the delay?

opal plank
#

for each slave/shard i have, i put 40+ on the event listeners to be able to handle that retarded amount of channels i can join in one go

sharp thicket
#

oh okay

earnest phoenix
#

Can i remove an event with eval?

sharp thicket
#

i dont think so

#

you can emit one tho

#

like

earnest phoenix
#

so once it turns back to true, another command makes it false again
@quartz kindle its not a command, it’s a function that executes on an interval of 60 seconds

sharp thicket
#

client.emit("message" //blah)

opal plank
#

if you declared the listener on a variable, you can

earnest phoenix
#

I know that@sharp thicket

sharp thicket
#

like

quartz kindle
#

@earnest phoenix are sure its no being executed multiple times? like multiple intervals running

opal plank
#

@earnest phoenix removeListener() is a thing, though your Listener needs to be on a variable, accessible in the eval

sharp thicket
#

var event = bot.on("message" //blah)
a!eval event.delete()

opal plank
#

var

sharp thicket
#

a! is ma perfix

opal plank
#

stop using vars reee

sharp thicket
#

whats wrong with var?

quartz kindle
#

._events is also a thing

opal plank
#

lemme grab a picture

earnest phoenix
#

hmm?

sharp thicket
#

whats wrong with var?

tulip ledge
#

Tim are u here

opal plank
quartz kindle
#

nothing wrong with var, just others are usually better, depending on your use case

tulip ledge
#

U know the answer prob

opal plank
#

vars are declared globally when they are initiated

sharp thicket
#

huh

#

ok

opal plank
#

this can cause some REALLY annoying to catch bugs

sharp thicket
#

ok use let

opal plank
#

let/const > var

tulip ledge
#

message.mentions.members returns an empty collection even tho i mention someone and the content states: !force @tulip ledge

opal plank
#

var DOES have its uses though

quartz kindle
#

vars are function scoped, const/let are block scoped, so they are stricter

opal plank
#

though they are quite specific

earnest phoenix
#

@quartz kindle it logs the function being executed only once and "Time shall move again." only logged after like 1 minute when it’s supposed to be 5 seconds

sharp thicket
#

let eventman = bot.on() blah
!eval eventman.delete()

quartz kindle
#

vars can overwrite other vars with the same name, const/let cant

tulip ledge
#

I didn't know that

#

cool

sharp thicket
#

i dont use vars but they kool

#

**kool88

#

shit

tulip ledge
#

u can however do

let a = b
a = c
sharp thicket
#

thats not the same

quartz kindle
#

@earnest phoenix can you show the full interval?

tulip ledge
#

no, but has the same function

sharp thicket
#

your changing the value of a variable not the name

tulip ledge
#

oh right

#

I'm an idiot

sharp thicket
#

nah

#

people forget sometimes

tulip ledge
#

Tim do u know my issue? I've been struggling with it for like 3 days now

#

message.mentions.members returns an empty collection even tho i mention someone and the content states: !force @tulip ledge

earnest phoenix
sharp thicket
#

message.members.mentions ??

quartz kindle
#

@tulip ledge that happens if the member is not cached

earnest phoenix
#

in d3 how can i repeat the same thing on a transition multiple times in a single method

tulip ledge
#

oh

earnest phoenix
#

because i need to do smth 9 times and i don't want to type the same thing 9 times

tulip ledge
#

message.cache.mentions.members?

opal plank
#
CommandExecute() {
if(a) {
var a = a + 1
}
if(b) {
var a = 2;
}
}

im fairly certain var would re-assign the value of a once it passes, even though they are in different scopes, this can be one pain and a half to debug, specially for people like me who use common variable names eveywhere, like a, _a, e, _e, x, _x and so on

sharp thicket
#

what do i add to my automod thingy

#

im bored

#

antispam?

#

antimassping

#

?

#

idk

opal plank
#

what are you on about?

earnest phoenix
#

anti capppppppppppppppppppppppppppppppppppsssssssssssssssssss

sharp thicket
#

ew my bot is not a roblox caffe worker

tulip ledge
#

none of these work
message.mentions.members.cache.first()
message.mentions.cache.members.first()
message.cache.mentions.members.first()

quartz kindle
#

@earnest phoenix so STAR FATINUM logs immediately, then Time shall move again logs after 1 minute?

sharp thicket
#

who even plays that game

quartz kindle
#

@tulip ledge all of those are wrong

opal plank
#

^^^^^^^^^^

tulip ledge
#

mmh

opal plank
#

message.mentions.<members/users/channels>.first()

tulip ledge
#

how would I do it then

#

like I said earlier, doesn't work

opal plank
#

i think there are others as well

earnest phoenix
#

@earnest phoenix so STAR FATINUM logs immediately, then Time shall move again logs after 1 minute?
@quartz kindle yes

opal plank
#

i just dont remember back of my head

sharp thicket
#
const mentionedUser = message.mentions.users.first();
const mentionedMember = message.mentions.members.first();
const mentionedRole = message.mentions.roles.first();
const mentionedChannel = message.mentions.channels.first();```
@tulip ledge
still merlin
#

are you using msg or message

opal plank
#

theres no cache

quartz kindle
#

message.mentions.members.first() is correct, but it only works if the member is not cached

tulip ledge
#

it. doesnt. work.

quartz kindle
#

if the member is not cached, you need to use the user

#

and fetch the member with the user

tulip ledge
#

user doesn't work either

opal plank
#

it does, you used cache in both of them

still merlin
#

have you tried msg?

opal plank
#

members.cache doesnt exist on mentions

#

@still merlin message and msg are the same thing

quartz kindle
#

message.mentions.users.first() doesnt work?

sharp thicket
#
const mentionedUser = message.mentions.users.first();
const mentionedMember = message.mentions.members.first();
const mentionedRole = message.mentions.roles.first();
const mentionedChannel = message.mentions.channels.first();```
i use this
tulip ledge
#

message.mentions.users.first(); --> Undefined
message.mentions.members.first(); --> Undefined

opal plank
#

user undefined?

#

wot

sharp thicket
#

try and log message.content

tulip ledge
#

content: '!force @tulip ledge',

opal plank
#

was there a MENTION in it?

slender thistle
quartz kindle
#

Lol

still merlin
#

I know @opal plank, but he or she might be using msg πŸ€·β€β™‚οΈ

opal plank
#

@slender thistle choto matte, you doing C now?

slender thistle
#

C# gang

opal plank
slender thistle
#

OOP assignment

sharp thicket
#

c# sux

slender thistle
#

korabi sux ngl

sharp thicket
#

lel

opal plank
#

so you went to C# but wont come with us on the js/ts gang?

sharp thicket
#

bulli

opal plank
quartz kindle
#

@earnest phoenix add another console.log after users.forEach, see how long it takes for the second log to appear

slender thistle
opal plank
slender thistle
#

I have to use C# for my OOP assignments

sharp thicket
#

what does message.members return?

opal plank
#

Collection

tulip ledge
#

undefined

sharp thicket
#

Tim is it possible to use message.members[2] ?

quartz kindle
#

@tulip ledge are you using regular discord.js?

#

which version?

tulip ledge
#

should be yes

sharp thicket
#

run npm i --save just to be safe

#

that will update it

earnest phoenix
#

@earnest phoenix add another console.log after users.forEach, see how long it takes for the second log to appear
@quartz kindle immediately as well, my bot player had their HPs decreased instantly

strong tundra
#

eh c# isn't terrible

quartz kindle
#

@sharp thicket there is no message.members

sharp thicket
#

oh

#

so its undefined

tulip ledge
#

The only thing I did was new Message(this, JSON.parse(JSON.stringify(message)), message.channel); but it should be exactly the same as the normal message class I just did it so I could add some methods

strong tundra
#

better than server side Javascript πŸ˜”

opal plank
#

im afraid of updating my libs simply for the sheer amount of patches i put on them, its one pain and a half to re-patch everything

sharp thicket
#

brb

quartz kindle
#

@tulip ledge well that explains it

#

lmao

sharp thicket
#

l0l

tulip ledge
#

"discord.js": "^12.3.1",

honest perch
#

run npm i --save just to be safe
@sharp thicket --save is deprecated

tulip ledge
#

Wait what did I do wrong there then?

sharp thicket
#

ik

#

--save looks cool

quartz kindle
#

@tulip ledge console.log(JSON.stringify(message))

sharp thicket
#

i think npm ignores it

#

lol

#

brb

honest perch
#

rip to all the people that do --save-dev when you can just do -D

opal plank
#

no take backs @slender thistle

tulip ledge
#

But if I log mesage it show something totally different o.O

quartz kindle
#

see

tulip ledge
#

well how would I fix it then?

opal plank
#

@slender thistle come to Ts, we got intelisense, tooling and a bunch of h**kers

slender thistle
opal plank
#

ditch the C gangs and join us the smol breins

slender thistle
#

I've got intillisense in C# tho

opal plank
#

do they have a bunch of h**kers though?

#

thought so

#

come, you get donuts for the first week

quartz kindle
#

@tulip ledge discord.js's Message class is designed to work on discord's message objects

slender thistle
quartz kindle
#

this is how they look like

next flax
#
  throw err;
  ^

Error: Could not locate the bindings file. Tried:
 β†’ /home/runner/Thunder/node_modules/better-sqlite3/build/better_sqlite3.node
 β†’ /home/runner/Thunder/node_modules/better-sqlite3/build/Debug/better_sqlite3.node
 β†’ /home/runner/Thunder/node_modules/better-sqlite3/build/Release/better_sqlite3.node
 β†’ /home/runner/Thunder/node_modules/better-sqlite3/out/Debug/better_sqlite3.node
 β†’ /home/runner/Thunder/node_modules/better-sqlite3/Debug/better_sqlite3.node
 β†’ /home/runner/Thunder/node_modules/better-sqlite3/out/Release/better_sqlite3.node
 β†’ /home/runner/Thunder/node_modules/better-sqlite3/Release/better_sqlite3.node
 β†’ /home/runner/Thunder/node_modules/better-sqlite3/build/default/better_sqlite3.node
 β†’ /home/runner/Thunder/node_modules/better-sqlite3/compiled/12.18.3/linux/x64/better_sqlite3.node
 β†’ /home/runner/Thunder/node_modules/better-sqlite3/addon-build/release/install-root/better_sqlite3.node```
quartz kindle
#

stringifying a message instance does not produce a discord message object

tulip ledge
#

oh

quartz kindle
#

it produces a discord.js-specific version of a message

tulip ledge
#

so do I not stringify it?

quartz kindle
#

nope

next flax
#

whats this

quartz kindle
#

what are you trying to do in the first place?

tulip ledge
#

just message = new Message(this, message, message.channel);?

#

It's to make custom methods

opal plank
#

u can just extend class thgouh

quartz kindle
#

like message.mymethod()?

opal plank
#

thouhg*

tulip ledge
#

yes

quartz kindle
#

you use class extensions for that

opal plank
#

^^

tulip ledge
#

oh ok

quartz kindle
#

discord.js supports class extensions

#

like this

tulip ledge
#

so I just ditch the message class then?

earnest phoenix
#

You could extend the classes or do something like

Message.prototype.myMethod = /* function body */```
opal plank
#

hacking classes

quartz kindle
#
Discord.Structures.extend("Message", OldMessage => class Message extends OldMessage {
  mymethod() {
    console.log(this.content)
  }
})
#

at the top of your main file, before you create your client

tulip ledge
#

ok ty

quartz kindle
#

or just check djslight's source code, it has tons of weird ass extensions

#

lmao

tulip ledge
#

alr ty

quartz kindle
#

lmao

next flax
#

?

opal plank
#

omg

earnest phoenix
#

bruh I still don't understand what prototype pollution means, about adding methods to the existing classes

next flax
opal plank
#

i use this but im not used to using this that often

#

too many this'es

quartz kindle
#

@next flax where is your bot hosted?

earnest phoenix
#

Oh no, an error raised from quick.db installation again

next flax
#

@quartz kindle i m using

earnest phoenix
#

Try reinstalling it

next flax
pure lion
#

Oh no quick.db

#

Why use local file es em ech

next flax
#

k

quartz kindle
#

and you added quick.db through repl.it's packages menu?

next flax
#

no

pure lion
#

Would a .sqlite file even work?

next flax
#

i used terminal for that

earnest phoenix
#

Then use repl's package manager to install it

pure lion
quartz kindle
#

try installing it from the package manager

next flax
#

k

carmine summit
#

const db = require('quick.db')

#

Just put that code

earnest phoenix
pure lion
#

No.

carmine summit
#

Yes

strong tundra
#

what is quick db sir

earnest phoenix
#

No

quartz kindle
#

lol...

pure lion
#

@strong tundra a database

strong tundra
#

is it fast data base

quartz kindle
#

no

#

lmao

strong tundra
#

lol

earnest phoenix
#

what is quick db sir
@strong tundra It's meaning is simply "urmom"

pure lion
#

It uses better-sqlite3

strong tundra
#

is it faster than rocksdb

quartz kindle
#

no

pure lion
#

@strong tundra use mongo

strong tundra
#

ew no

pure lion
#

Or postgres

#

Why is that an ew no

earnest phoenix
#

Everything is faster than quick.db LULW

strong tundra
#

lol

#

i use yugabyte

next flax
#

is mongo db easy to use

pure lion
#

Everything is faster than quick.db :LULW:
Json

carmine summit
#

No

#

Hell no

pure lion
#

@carmine summit stfu

#

@next flax yea

strong tundra
#

mongodb is pretty fine

earnest phoenix
#

Mongo is hell to use, but best database for a bot

carmine summit
#

I can't even connect to it porperly

strong tundra
#

i just kinda like sql so

opal plank
#

.txt database

strong tundra
#

lemme pull up some code

carmine summit
#

JSON database

earnest phoenix
#

I can't even connect to it porperly
@carmine summit Learn to read documents i guess KEKWLaugh

pure lion
#

There is nothing wrong with SQL/nosql they each have their own good boyes

#

I like nosql more because nyoom

next flax
#

i use quick.db because

slender thistle
#

I cba to write proper SQL statements

next flax
#

i feel it easy

earnest phoenix
#

MongoDB atlas === Best database for a discord bot

pure lion
#

Also voltrex idk what you mean, mongodb is easy to work with

strong tundra
#

ez

pure lion
#

Mongoose is sex

carmine summit
#

Yeah its better to use quick db

#

Just import it

#

Boom your connected

opal plank
#

@slender thistle SELECT/UPDATE/INSERT only sql statements' gang

pure lion
#

Yeah its better to use quick db
No stop

opal plank
#

the 3 saviours of SQL

#

no need for anything else

quartz kindle
#

lol...

carmine summit
#

No stop
@pure lion sure just help me connect to my db

strong tundra
#

sqlx is niiiiice

slender thistle
#

Tim, those dots are telling me you are disappointed to a very high extent

carmine summit
#

I woyld like to use mongoose

quartz kindle
#

lmfao

pure lion
#

mongoose.connect("mongodb+srv:// thingy here")

strong tundra
#

amazing compile type checked sql

earnest phoenix
#

I know, i meant like it's functions, in quick.db you can insert anything to the database but in mongodb you have to check if it exists, if not insert one, if so, update the doc @pure lion

pure lion
#

I am disappointed too

earnest phoenix
#

I meant that

strong tundra
#

i wish js had something like it

carmine summit
#

Then how do you define db??

pure lion
#

Oh dear

opal plank
#

Tim is displeased with my 3iq jokes

next flax
quartz kindle
#

im amused by db wars

opal plank
pure lion
#

This channel makes me go boomboom in headhead

strong tundra
#

bro just look up discord bot database mongodb youtube

earnest phoenix
#

Tim is probably cringing at this chat rn

pure lion
#

I am too

strong tundra
#

heh yeah

#

im having fun

pure lion
#

fum

quartz kindle
#

i just use sqlite :^)

opal plank
#

yeah, its all futile. We all know postgreSQL is and will always be the superior DB, regardless of what the plebs say

strong tundra
#

sqlite is interesting

opal plank
earnest phoenix
#

i just use sqlite :^)
@quartz kindle Falls off chair

pure lion
#

I prefer !sql

slender thistle
#

Erwin banned for wrong opinion mmulu

opal plank
next flax
#

what is a SQL data base GWcorbinHolyFuck

carmine summit
#

Quick.db is the best mmulu

strong tundra
#

i do prefer postgres personally

earnest phoenix
#

SQL = Structured Query Language

strong tundra
#

or postgres-compatible

next flax
#

Quick.db is the best mmulu
@carmine summit tickYes

slender thistle
#

Hell, I had to do quite a clusterfuck of SQL in Delphi yesterday

pure lion
#

nosql = not structured query language but somehow fast jajaajjajaj

earnest phoenix
#

Quick.db, the worst database in the west

slender thistle
#

Tim, you familiar with Delphi?

restive furnace
#

CQL is the best, Cassandra Query Language

strong tundra
quartz kindle
#

quick.db is not even a database in itself, its a library that uses a database behind the scenes and creates an interface for it
quick.db's actual database is SQlite

opal plank
#

the best part of this Database wars is that 99% of the people commenting havent tried any other database apart from the one they call best

strong tundra
#

yugabyte supports ysql as well

next flax
#

quick.db is not even a database in itself, its a library that uses a database behind the scenes and creates an interface for it
quick.db's actual database is SQlite
@quartz kindle i think then its a db wrapper

strong tundra
#

and redis for some reason

quartz kindle
#

@slender thistle i tried to reverse enginner a delphi program and failed miserably, thats about it

slender thistle
#

The only databases I tried are SQLite and MongoDB KEKW

pure lion
#

.sqlite files are barely for database usages anyway, it should just be an alt to json that can be written to

opal plank
#

postgres, redis, cassandra, in that order

pure lion
#

Without corruption

earnest phoenix
#

Tim failing at something? That's something rare to encounter

strong tundra
#

wow yugabyte supports all three clap clap

#

uh anyways

carmine summit
#

Uh

quartz kindle
#

sqlite is better than most people think

pure lion
#

Like why would you write to a file on your machine when a dedicated server can handle it ooooohhh

carmine summit
#

Someone

#

Teach me

opal plank
#

Tim would likely fail to comprehend my intelligible code, due to how bad it is

sharp thicket
#

hi

carmine summit
#

How to use mongoose

#

And define db

slender thistle
#
begin
    s := '';
    op := ' ';
    If CheckBox1.Checked then
        begin
            s := s + ' fio like ''' + Edit1.Text + '%''';
            op := ' AND ';
        end;
    If (CheckBox2.Checked) and (Edit21.Text <> '') and (Edit22.Text <> '') then s := s + op + 'aip >= ' + Edit21.Text + ' and aip <= ' + Edit22.Text;
    If (CheckBox3.Checked) and (Edit31.Text <> '') and (Edit32.Text <> '') then s := s + op + 'history >= ' + Edit31.Text + ' and history <= ' + Edit32.Text;
    If (CheckBox4.Checked) and (Edit41.Text <> '') and (Edit42.Text <> '') then s := s + op + 'evm >= ' + Edit41.Text + ' and evm <= ' + Edit42.Text;
    If (CheckBox5.Checked) and (Edit51.Text <> '') and (Edit52.Text <> '') then s := s + op + '((aip + history + evm) / 3) >= ' + Edit51.Text + ' and ((aip + history + evm) / 3) <= ' + Edit52.Text;
    if s <> '' then
        begin
            Form1.ADOQuery1.SQL.Clear;
            Form1.ADOQuery1.SQL.Add('SELECT * FROM ocenki WHERE' + s);
            Form1.ADOQuery1.Open;
        end;
end;
``` @quartz kindle
quartz kindle
#

lmao

pure lion
#

@carmine summit it's simpler than that

earnest phoenix
#

My eyes just died

slender thistle
#

This is a working clusterfuck I had to help my classmate with

strong tundra
#

yeah sqlite is fine for small things and client apps

#

imo

earnest phoenix
#

Rip

pure lion
#

just create the connection and then require it in each file as mongoose

#

Anyway

opal plank
#

@slender thistle shivaco, you are being promoted to outside of the door, shoo

pure lion
#

I'm gonna go and isbfisbr9srhwihs

slender thistle
#

It was EVEN worse the way it was handed to me

sharp thicket
#
RTNETLINK answers: Operation not permitted
RTNETLINK answers: Operation not permitted
We have an error talking to the kernel
RTNETLINK answers: Operation not permitted
v14.11.0
:/home/container$ node index.js
Thanks for using Factful.js
/entrypoint.sh: line 32:    18 Bus error               (core dumped) node index.js``` whats this?
quartz kindle
#

imo sqlite is pretty much the best option for small things, and by small things i mean less than 1000 operations per second

strong tundra
#

i do know winget uses sqlite

carmine summit
#

const db = mongoose.connect(url)

#

That??

pure lion
#

No

carmine summit
#

WDYM no

pure lion
#

You don't need to define dB as the connection

earnest phoenix
#

connect returns a promise

sharp thicket
#
RTNETLINK answers: Operation not permitted
RTNETLINK answers: Operation not permitted
We have an error talking to the kernel
RTNETLINK answers: Operation not permitted
v14.11.0
:/home/container$ node index.js
Thanks for using Factful.js
/entrypoint.sh: line 32:    18 Bus error               (core dumped) node index.js``` whats this?
pure lion
#

@sharp thicket sotp

opal plank
sharp thicket
#

sotp?

earnest phoenix
#

Factful.js KEKWLaugh KEKWLaugh KEKWLaugh KEKWLaugh

pure lion
#

node-return-object-of-numbers-one-to-nine

sharp thicket
#

its a good api

carmine summit
#

What?

#

const db = '???'

earnest phoenix
#

2020, the year where everyone uses APIs instead of coding it themselves

pure lion
#

There is no const db

quartz kindle
#

make your own api

strong tundra
#

just insert your pool in your data variable

#

smh

carmine summit
#

THEN HOW DO YOU INTERACT WITH THE DATABASEE

pure lion
sharp thicket
#

can someone just help me with the os error?

#

or is that a node error?

earnest phoenix
#

@pure lion That's boeing's repository, i was supposed to contribute to it but didn't have time

pure lion
#

@carmine summit after you create the connection you can look at the docs and see how to do stuff

opal plank
#

2020, the year where people code bots by copying code, use libs that are hand holding them, and theres an API/module for everything you can ever hope for

earnest phoenix
#

Dies of cringe

pure lion
#

2020, the year the purple people died of brain cancer

sharp thicket
#

bruh noone helping me im going

earnest phoenix
#

We literally don't have any idea about your issue

pure lion
#

@earnest phoenix is boeing dead

strong tundra
#

lgtm

earnest phoenix
#

Idk, i have not seen him anywhere lately

pure lion
#

Same to you too

#

Aw

#

He was nice boye

#

:(

opal plank
#

Stackoverflow, BotMaker, Github clones => API's for everything => modules for everything and anything

making bots has never been easier imo, specially on discord / js

strong tundra
#

just do this

#

ez

earnest phoenix
#

Well, we are all basically using an api tho, using discord api to send request and make bots, Everything is an API KEKWLaugh

strong tundra
#

apis are how things connect with other things

earnest phoenix
#

API: ah yes, it's all coming together

quartz kindle
#

i turned my bot's core functionality into a public api

opal plank
#

use an API to get info for a command provided by an API, which then uses your own API to route stuff around within shards, which then sends it back to the API

strong tundra
#

tim: is this online rest api

#

lol

opal plank
#

i cannot hope to make my bot an open API

#

shit will catch on fire way too fast

quartz kindle
#

xD

earnest phoenix
#

We are using the discord API even when we're not developing bots, cuz discord client is connected to discord api

opal plank
#

and theres a very small possibility of the code becoming self aware and Dossing whoever makes requests to the api

strong tundra
#

i might make a local api for my bot

#

just something to interface with it

earnest phoenix
#

shit will catch on fire way too fast
@opal plank Not faster than new bot devs running into an error while following outdated YouTube tutorials

opal plank
#

THIS ^^^^^^^^^^^^^^^^

quartz kindle
#

"how make bot"

strong tundra
#

lol

#

this is a reason why i do not use java script πŸ˜”

quartz kindle
#

"how get bot online"

opal plank
#

"How to make bot NO CHEAT ENGINE working 2020 OCTOber 20 YOUTUBE english"

quartz kindle
#

make a bot with cheat engine

#

lmao

slender thistle
#

LMFAOOOOOO

opal plank
carmine summit
strong tundra
#

"hello sir how to get free vps for host my discord botums"

earnest phoenix
#

New bot devs be like:
Writes 1 line of code
Wait why is there 99 errors
There's an error on line 500 but i only have one line

strong tundra
#

actually related

#

i did get a free vps today

#

lol

carmine summit
#

Uh

#

How?

#

I want free VPS

strong tundra
#

not telling

#

uhh

#

it is to host my discord botums

carmine summit
#

Ok sadcat

opal plank
#

you can get FREE VPS for only $5 mmulu

quartz kindle
#

technically my vps is also free

opal plank
#

technically mine too

spring pawn
#

Hi. I was wondering what was the criteria for accepting bots or not on top.gg?

quartz kindle
#

got enough donations to cover several years

opal plank
#

though its a whole cluster

earnest phoenix
#

I can imagine people making videos with the title of
"How to make a free and pro bot using lucky patcher 100% working 2020 NO CLICKBAIT πŸ”₯πŸ”₯πŸ”₯"

quartz kindle
#

lucky patcher omg lmao

opal plank
#

only andoird gang will get the ref

strong tundra
#

guys i m logging into vps server right now omgg

quartz kindle
#

anyone ever edited an android firmware?

opal plank
#

i did

carmine summit
#

Uh

opal plank
#

and almost bricked the shit out it

quartz kindle
#

lmao

strong tundra
#

i don't really know java so i don't think id know how

carmine summit
quartz kindle
#

i dont know java either

opal plank
#

me neither

strong tundra
#

guys i logged in to my vps server

opal plank
#

noice

carmine summit
#

Uh

#

Lucky

strong tundra
earnest phoenix
opal plank
#

what could go wrong playing with a very expensive phone's firmware?

quartz kindle
#

i did it on my old galaxy pocket (android 2.7 i think) to remove the brightness slider from the notification menu, because it was a waste of space

#

lmao

strong tundra
#

i actually don't have anything to run on this lol

opal plank
#

mine was a galaxy s2 iirc

#

that shit survived a 4 story high fall into concrete

#

and a car ran it over

quartz kindle
#

nice

earnest phoenix
#

Bruh I'm glad it wasn't a nokia

opal plank
#

scratched the side, the glass and phone were intact apart from that

earnest phoenix
#

It would have split the world in half

carmine summit
#

Just put a lil bit of toothpaste and it'll be good as new

strong tundra
#

only thing is this vps only has an ipv6 address

#

so

opal plank
#

toothpaste? poor kid, we all know we fix stuff with ramen noodles

quartz kindle
#

put it in a jar of rice and asians will come at night and fix it for you

earnest phoenix
#

Just put it in rice

opal plank
#

LMAO

quartz kindle
earnest phoenix
#

put it in a jar of rice and asians will come at night and fix it for you
@quartz kindle That asians be like: that rice looking sus, let's have a look at it

quartz kindle
#

:^)

carmine summit
#

Yes

opal plank
#

we talking about cellphone firmware

#

technically development

carmine summit
opal plank
#

technicall support(be it by summon asians with rice) is still technical support

earnest phoenix
#

Fixing stuff with rice, totally development mmLol

carmine summit
#

I am asian and I can smell the rice from here

quartz kindle
#

theres a bunch of videos on yt where people fix holes and damaged parts with dry ramen noodes

opal plank
#

i really wonder if you could technically fix the cellohone carcass to an extent with noodles

earnest phoenix
#

Nah just give those holes the documents link, they'll learn and fix themselves

carmine summit
#

Submerge it in ramen soup for 24 hours after that.

foggy cove
#

i was about to send my code regarding an error then i saw how i misspelled the word content at the last second smh

quartz kindle
#

xD

foggy cove
#

no wonder it was undefined.

carmine summit
#

After that, dry it up using heat by putting it in a microwave in high heat

opal plank
#

its 9AM and i have 2 braincells left, one for breathing, and the other one is typing, really think i'd be jugding someone rn cuz of grammar?

earnest phoenix
#

Man we went from development to cooking recipes

quartz kindle
#

you been up all night?

opal plank
#

yup, havent sleep in prob 24+ h

carmine summit
#

@opal plank Kill the otherone and just use V-Braincells

quartz kindle
#

rip

earnest phoenix
#

Man i haven't slept in 2 days

quartz kindle
#

i went to sleep at 11 and woke up at 7:30

#

go sleep people

#

sleep deprivation is bad

earnest phoenix
#

What's sleep in the first place

opal plank
#

coding vampires dont need sleep

#

that was a clever pun

#

laugh ffs

foggy cove
#

you mean programmers? well.. "programmers"

#

ah wait

#

i am stupid

earnest phoenix
#

This guy's brain went SyntaxError

quartz kindle
#

i've been getting messages from my old phone company saying i still owe them an unpaid bill

#

i login to their website to check, and i get a blank page

#

open f12 and see this

#

lmfao

opal plank
#

oof

earnest phoenix
#

Epic code 100

quartz kindle
#

fucking OI

carmine summit
#

Lmao

opal plank
#

prefessionel webositoe

strong tundra
#

good job react

quartz kindle
#

@opal plank stay away from them

foggy cove
#

i saw a glimpse of the gates of hell in there

opal plank
#

wait wot?

#

OI?

quartz kindle
#

yes

opal plank
#

a big company got that bs?

quartz kindle
#

yes

opal plank
#

BRUH

earnest phoenix
#

You know it's sus when a website url has oi in it

opal plank
#

im dissapointed that TIm doesnt use Tim

carmine summit
#

Erwin whats an alternative for forEach?

opal plank
#

for those who dont know, OI and Tim are brazilian mobile data providers

quartz kindle
#

@opal plank i do use TIM

#

lmao

opal plank
#

E3EEEEEEEEEEEY

#

LETS GOOO

quartz kindle
#

OI was my landline

#

my cellphone is TIM

opal plank
#

i think i had Telefonica, then switched to Net

carmine summit
#

Well, Erwin hates forEach so much, that he scolds users who uses it

opal plank
#

they merged

#

Net has been giving quite a good service thus far

earnest phoenix
#

forEach is slow

quartz kindle
#

does NET still operate with cable? or do they have fiber now?

strong tundra
#

i don't think foreach has async

opal plank
#

they have fiber

strong tundra
#

or something

#

i forget

earnest phoenix
#

forEach has a callback

opal plank
#

i got a special private pack from them for 1 gigabit internet

strong tundra
#

oh i could have done that

#

duh

quartz kindle
#

finally, i always hated NET because cable was bad for gaming

earnest phoenix
#

forEach can have an async callback lol

#

But slow asf

opal plank
#

im fairly certain they still have cable

carmine summit
#

Tf

quartz kindle
#

forEach will not await the callbacks correctly tho, it will execute them all concurrently

opal plank
#

mine is def fiber

strong tundra
#

yeah that's the problem

foggy cove
#

WHY ARE ALL MY CODE ERRORS TYPOS

strong tundra
#

well, it was

quartz kindle
#

lmao

earnest phoenix
#

PepegaReading

carmine summit
#

Uh

#

I once got message.chanel.send()

#

Or mesage.channel.send()

quartz kindle
#

chanel, the perfume

carmine summit
#

Then I was confused why .send() is not a function

opal plank
#

why did i just picture someone spraying perfume on someones face?

carmine summit
#

Yeah I once got console.log is not a function

strong tundra
#

ok yeah i did for key of list instead

earnest phoenix
#

Someone should pin a message in this channel saying "Risk of losing most of your brain cells, proceed with caution"

carmine summit
#

I was confused AF

slender thistle
#

who reads pins

earnest phoenix
#

No one

#

Except mods

next flax
#

i m unable to install Shit.db aka quick.db

earnest phoenix
#

PepegaBlind + PepegaReading

opal plank
#

thats a sign of god that you should be using an ACTUAL usable database

earnest phoenix
#

tfw you blame the package on your inability to read README

pure lion
next flax
#

Use repl.it's package manager mate
@earnest phoenix i used that only

earnest phoenix
#

quickdb requires native dependencies, read the readme

#

What if you, wanted to go to heaven but god said
uninstall quick.db first

pure lion
#

quick.db is like JSON that doesn't corrupt

earnest phoenix
#

Everything can be corrupted

pure lion
#

Still slow and it's better suited for other uses

earnest phoenix
#

it isn't as slow

carmine summit
#

What a coincidence, I encountered that error a while ago and fixed it by copying the package.json in my existing bot that has quick.db then pasting it then deleting package-lock.json

pure lion
#

It's still overall worse than the big boyes

earnest phoenix
#

it's just super restrictive considering it's actually running on sqlite

#

quick.db is just basically an sqlite wrapper but very slow

#

But remember that it stores all your info given on a file so if that file gets deleted, all your data is lost

carmine summit
quartz kindle
#

technically all dbs store data in files

earnest phoenix
#

redis mmLol

quartz kindle
#

even redit does, if you enable persistency

#

xD

earnest phoenix
#

But not all dbs create a file in your root directory to store the info tho

honest perch
#

mongo stores in bson

earnest phoenix
#

But i think this only applies on cloud based DBs

next flax
earnest phoenix
#

boiled down all databases store in files yeah however the "proper" databases as we know are doing so much more in the background, caching, memory management, custom formatting etc.

#

it's why your typical json db won't be able to verse a database that hunderds of people are working on

quartz kindle
#

binary data storage with proper indexing

#

200 years of database design :^)

earnest phoenix
#

and mysql is still used as an enterprise solution blobsad

honest perch
#

mysql is bad?

earnest phoenix
#

horrible

honest perch
#

how come

earnest phoenix
#

sec

honest perch
#

cant be as bad as the uk governments way of storing data

#

excel spreadsheets

earnest phoenix
#

yikes

honest perch
#

i see oracle and im out

carmine summit
#

Does that apply to quick.db??

earnest phoenix
#

what is that

#

the screenshot?

#

no since quick.db is just internally using sqlite

sudden geyser
#

quick.db is just a high-level abstraction of SQLite

gentle lynx
#

so

earnest phoenix
#

believe it or not sqlite is more powerful than mysql, it's just slower with exponential growth

gentle lynx
#

amount is Promise { 0 }

honest perch
#

personally i just use mongo

gentle lynx
#

how can i get the number?

honest perch
#

as its great for what i use it for

earnest phoenix
#

resolve the promise, i.e. await it @gentle lynx

gentle lynx
#

uh

quartz kindle
#

@gentle lynx .then(result => console.log(result))

#

the content of amount is given as the variable in the .then()

gentle lynx
#

oh shit

#

thanks!!

#

im still new to promises sorry

sudden geyser
quartz kindle
#

so i just tried installing quick.db and better-sqlite3 in repl.it for testing

gentle lynx
#

thanks Lite

quartz kindle
#

and it seems the compiler is killed during building sqlite

#

because it takes too long

#

lmao

fluid basin
#

oof

#

isnt there a prebuilt version?

earnest phoenix
fluid basin
#

its actually a minor perf advantage compiling it from source

quartz kindle
#

there are prebuilt versions, but apparently not the the node version replit uses

#

12.18

fluid basin
#

oof

quartz kindle
#

maybe bug the author to release one

#

xD

fluid basin
#

I should setup a ci for it

#

quick db doesnt use sqlite?

quartz kindle
#

it does

fluid basin
#

oh woot

#

lmao I kept thinking it was json

#

since everyone was not recommending it

#

XD

quartz kindle
#

techincally

#

it serializes data as json and saves it in sqlite as text

gentle lynx
#
  1. why it doesnt return
  2. why is the "u have enough items!!" message sends before the "You don't have enough items" one
quartz kindle
#

xD

#

@gentle lynx a forEach creates a function for each iteration

fluid basin
#

nice, it depends on better sqlite

quartz kindle
#

when you return inside a forEach, you are returning that function

gentle lynx
#

oh

quartz kindle
#

you cannot return the outside code from inside a forEach

fluid basin
#

which means it needs separate package for prebuilt

gentle lynx
#

oof

quartz kindle
#

if you want to control the outside code as well, use a for loop instead

fluid basin
#

use for(...)

gentle lynx
#

how can i use for loop with maps

fluid basin
#

theres iterators

earnest phoenix
#

oh hey glassy

gentle lynx
#

hi

quartz kindle
#

for(let [key,value] of amounts.entries()) {}

gentle lynx
#

ah ty

#

its still not returning

#

and the message is still sending before

earnest phoenix
#

Because the loop goes on and doesn't wait until it's complete

fluid basin
#

ugh await/async and promises dont really go together

earnest phoenix
#

I'm sure you can await in for loops

fluid basin
#

I mean async and sync

#

you will need to Promise.all

#

or Promise.allSettled

vale garden
#

hi

gentle lynx
#

i dont get it @fluid basin

#

did this so it only sends once

#

it worked

neon jasper
#

Can someone tell me how you make your bot reply when it gets mention in Discord.js V12 ?

fluid basin
#

we dont spoonfeed

#

tell us what you have tried

gentle lynx
#

nothing

fluid basin
#

not u

gentle lynx
#

oh

earnest phoenix
#

Can someone tell me how you make your bot reply when it gets mention in Discord.js V12 ?
@neon jasper in the message event check if the <Message>.content is equal to the bot's mention using RegEx

#

and then return a reply or whatever u wanna do

fluid basin
#

or use message.mentions

neon jasper
#

Okay thanks

quartz kindle
#

@gentle lynx you need to use async/await syntax

gentle lynx
#

nvm fixed it

white night
#

can anyone help me with this

#

(node:9236) UnhandledPromiseRejectionWarning: SyntaxError: Unexpected token < in JSON at position 0
at JSON.parse (<anonymous>)
at module.exports (C:\Users\Christopher\Desktop\Wobbles\node_modules\ytsr\lib\main.js:18:23)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async module.exports (C:\Users\Christopher\Desktop\Wobbles\node_modules\ytsr\lib\main.js:58:22)
(node:9236) 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: 1)
(node:9236) [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.

wary flame
#

Actually i had this problem today also

white night
#

im trying to play music with term searchs

sudden geyser
#

you're probably trying to parse html as json

wary flame
#

Its a bug (already reported in github issues)

white night
#

ok

sudden geyser
#

112batman and Le Wobbles show your source code pls

wary flame
#

That is is failing to parse the youtube response because youtube severely reworked this

#

@sudden geyser it is am ytsr issue

#

You can see in in the github issues of ytsr

#

All we dan do is wait, the owner is already working on it

white night
#

ok my friend said i should use usetube

sudden geyser
#

ah

earnest phoenix
#

I don't see any issues on ytsr

wary flame
#

It works 20% of the time

#

And might have something to do with your server region idk

static nexus
#

ik this place is about bots

#

but can someone help me with a machine learning thing

quartz kindle
#

big systems like youtube take time to apply changes, like discord releases features to only 5% of people at a time for example

earnest phoenix
#

This place is about everything's development @static nexus

fleet socket
#

I need help working the zero-two bot

The NSFW doesn't work for me

static nexus
#

ok

#

I need help with an error im getting

#

full is here

white night
#

how do i use usetube in my discord bot where do i put it

next flax
#

i m unable to install quick.db

waxen tinsel
#

@white night what language?

white night
#

node

#

js

waxen tinsel
#

||no idea how to help||

white night
#

Ok

#

im try random shit

foggy cove
#

my code keeps saying that serverQueue is undefined despite the fact that i literally defined it, unless i did something wrong

#
 const serverQueue = queue.get(message.guild.id)
waxen tinsel
#

Where is it saying it is undefined though

earnest phoenix
#

Show not only that code but the code around that

foggy cove
#

yes

sage bobcat
#

One message removed from a suspended account.

earnest phoenix
#

maybe the package you're tryna download isn't on yarn

blissful coral
#
const channels = message.mentions.channels.filter(c => c.type === 'text')
        const channelarray = channels.array()
        let count = 0;
        let found = false;
        let channel = '';
        var i;
        for(i = 0; i < channels.size; i++) {
        connection.query(`SELECT * FROM config WHERE guildid = '${message.guild.id}' AND id = '${channelarray[i].id}'`, async function (err, results) {
                if(results[0] !== undefined) {
                    found = true
                    channel = `${channel} | ${results[0].id}`
                }
                console.log(found)
        })
        }  
        if(found === true) {
            return message.channel.send(`Error attempting to disable channels. The following are already disabled: ${channel} Please remove these channels from the command and retry!`)
        } else {
#

All is working

#

Other then, it isn't waiting on the loop to be done before checking if found is true or not

#

It is doing the if statement before the for

vale garden
#

hi

sudden geyser
#

because .query takes a callback, which is called later, like I said before.

vale garden
#
if (args[0] === "catch") {
        if (args[1] === pkmns[pkmn]) {
          message.channel.send(`You have caught a ${pkmns[pkmn]}`)
        }
        else {
          message.channel.send("That is the wrong pokemon")

        }
      }
#

what tf is wrong here

#

when i type !catch {pkmns[pkmn]} nothing is displayed

sudden geyser
#

You need to do your handling in the callback if you want it to be in order.

vale garden
#

pls help

sudden geyser
#

I assume you aren't literally typing out {pkmns[pkmn]}, correct

vale garden
#

yea ik that

#

pkmns[pkmn] is an element of an array

#

not shown here

#

to be exact this it it

#
let pkmns = ["Caterpie", "Metapod", "Butterfree", "Weedle", "Kakuna", "Beedrill", "Pidgey", "Pidegotto", "Pidgeot", "Scyther", "Pinsir", "Rhyhorn", "Rhydon", "Shellder", "Cloyster", "Psyduck", "Golduck", "Zubat", "Golbat", "Horsea", "Seadra", "Paras", "Parasect"]

    let pkmn = Math.floor(Math.random() * pkmns.length)
carmine summit
#

if pkmns.includes(args[1])

vale garden
#

you mean the opposite?

#

anyways ill try

#

you mean if (args[1].includes(pkmns[pkmn]) right? @carmine summit

carmine summit
#

Yes

#

No

vale garden
#

kk

#

wat

quartz kindle
#

no

carmine summit
#

Why

vale garden
#

cuz

#

ok im confused

carmine summit
#

Can you tell me how its supposed to work

vale garden
#

oh

#

see the argument needs to be the element from the array

carmine summit
#

if pkmns.includes(args[1])

vale garden
#

oh wait

#

ye

#

nvm

carmine summit
#

If you add [pkmn], Then it will return a string of a random pokemon, then if the args and the string is not the same, it will return false

#

If you place in pkmns.includes(args[1]), if the array had the args, it will return true

tired panther
#

When I make shardmanager
can I send in every guild messages or just those which are in the shards?

quartz kindle
#

you can, but its a bit different

tired panther
#

is it with broadcasteval?

#

does it work with that?

#

@quartz kindle

quartz kindle
#

yes

blissful coral
#

@sudden geyser Ok so, I am the worst at callbacks

#

Wanna like lowkey show me how I should do this ;p

sudden geyser
#

yeah they suck

tired panther
#

and that works 100%?
another question:
when I have normal commands
which changes do i have to do @quartz kindle?

blissful coral
#

Literally like so confusing

earnest phoenix
#

what is the difference between npm, yarn, homebrew and bower

tired panther
#

goooooooogle

blissful coral
#

os I think

sudden geyser
#
connection.query("<...>", (err, results) => {
  if (results[0] !== undefined) {
    // Do your stuff here
  }
})```
#

They're package managers code

blissful coral
#

That is what I have, Lite

sudden geyser
#

I know, you already have what you need to write one.

blissful coral
#

Or it can't be in a for

#

ohhhh

#
function callback(guild, id) {
                connection.query(`SELECT * FROM config WHERE guildid = '${guild}' AND id = ${id}`, async function(err, results) {
                    console.log(id)
                    console.log(guild)
                    if (results[0] !== undefined) {
                        found = true
                        channel = `${channel} | <#${id}>`
                        console.log(found)
                    }
                    if (results[0] === undefined) {
                        found = false
                        console.log(found)
                    }
                })
            }
            for (i = 0; i < channels.size; i++) {
                callback(message.guild.id, channelarray[i].id)
#

This is very

#

VERY

#

wrong

#

lmfao

#

and spaghetti ugh

foggy cove
#

i love spaghetti

blissful coral
earnest phoenix
#

yarn is a package manager but or a thing used to make fabric angeryBOYE

foggy cove
#

yeah and string is one way to call something that's use on instrumentS

sudden geyser
#

@earnest phoenix for example, npm and yarn are both targeted at JS. Yarn tries fixing some issues with npm/Node.js, but I personally stick with npm. Homebrew is for installing stuff on macOS easily, like brew install rust, and I don't know what bower is

blissful coral
#

A variable is defining something or a part of a science project

earnest phoenix
#

yeah and string is one way to call something that's used on instruments
@foggy cove instruments were made with animal intestines in olden times

foggy cove
#

you call em membranes

earnest phoenix
#

wat

foggy cove
#

ok yeah that's too deep in topic of music classification uh

#

ok yeah i need help

#
client.on('message', async message => {
    if(message.author.bot) return
    if(!message.content.startsWith(PREFIX)) return

    const args = message.content.substring(PREFIX.length).split(" ")
    const serverQueue = queue.get(message.guild.id)

how is serverQueue not defined and how do i global scope

#

i do not know how to code and i am dying to hear why this is a thing please

misty sigil
#

@foggy cove don’t make a bot if you can’t code

#

do some research first

#

I know where you copy pasted that code from, at least I can make a guess

blissful coral
#

Anyone got a good example on how to use a callback

#

I can't figure this shit out

fluid basin
#

uh, you are trying to use a callback or make one?

blissful coral
#

make one

earnest phoenix
#

Hey! I am trying to make dashboard, they have to login trought their discord account.

Now I want to make, that it joins the support server! How?

fluid basin
#

ah

earnest phoenix
#

I can't find any docs

#

If someone knows where I can find them I would be already happy :DDD