#development

1 messages Ā· Page 1174 of 1

fringe axle
pale vessel
#

but why call it bot

sharp thicket
#

Uh name it somme else

lyric mountain
#

dude, first of all: CHANGE THAT VAR NAME

green bison
#

ok

fringe axle
#

const embed = new MessageEmbed()

lyric mountain
#

name it pepperoni, but not bot

sharp thicket
#

Lol

fringe axle
#

message.channel.send(embed)

pale vessel
#

yeet

sharp thicket
#

Xd

delicate shore
#

what should i do then?

knotty steeple
#

name ur variables properly šŸ˜”

pale vessel
#

run npm i and read the error

sharp thicket
#

We just told you....

delicate shore
#

run npm i and read the error
@pale vessel it gives no error

#

We just told you....
@sharp thicket where.....

delicate shore
#

npm i --save does not change

#

anything

sharp thicket
#

Wai i got confused sry

pale vessel
#

bruh

lyric mountain
#

Npm i module —save

delicate shore
#

i tried

#

did not worked

sharp thicket
#

Yeah

pale vessel
#

how did it not throw any error

sharp thicket
#

Yeah

delicate shore
#

wait you want me to do npm i opus --save?

golden condor
#

try just install npm i discord.js

sharp thicket
#

Update node ?

delicate shore
#

v12

sharp thicket
#

Hmm

pale vessel
#

12 volts?

sharp thicket
#

Version

delicate shore
#

;-;

sharp thicket
#

Smh

pale vessel
#

he said 12v mmLol

sharp thicket
#

Lol

pale vessel
#

can't argue

sharp thicket
#

Xd

delicate shore
#

ok so flazepe

#

i did npm i discord.js

#

and even npm i

#

nothing

lyric mountain
#

you could try yarn

golden condor
#

Install opusscript

sharp thicket
#

Do you have a package.json ?

golden condor
#

Wait do you have ffmpeg installed

delicate shore
#

yes

#

i did it 5 times

sharp thicket
#

Um idk

delicate shore
#

Do you have a package.json ?
@sharp thicket obviously that is why my bot is on

#

only music not working

earnest phoenix
#

what function allows me to edit the CSS style data of an element in browser javascript

sharp thicket
#

Umm

lyric mountain
#

what function allows me to edit the CSS style data of an element in browser javascript
@earnest phoenix F12

golden condor
#

try yarn as KuuHaKu said

sharp thicket
#

Lol

delicate shore
#

try yarn as KuuHaKu said
@golden condor idk commdn for yarn

golden condor
#

It's literally just yarn

lyric mountain
#

yarn install

earnest phoenix
#

@earnest phoenix F12
@lyric mountain lol i meant actual javascript

sharp thicket
#

May it be your module that is having issues ??

lyric mountain
#

Document.getElementById() to get the element ig

pale vessel
#

like element#style?

earnest phoenix
#

lmfao

lyric mountain
#

after that idk

sharp thicket
#

Lol

#

šŸ˜‚

#

I have school baii

pale vessel
#

element.style.color = "#ffffff"; for example

earnest phoenix
#

huh

#

oh wait

#

is style a class?

pale vessel
#

no

delicate shore
#

@golden condor how to install yarn

earnest phoenix
#

what is it then

golden condor
#

look on their website?

lyric mountain
earnest phoenix
#

@golden condor how to install yarn
@delicate shore https://readthedocs.io

delicate shore
#

I am not doing it on local

#

it's on my vps

pale vessel
#

npm install -g yarn

golden condor
proud mulch
#

How to get nitro? Please

golden condor
#

Buy it

lyric mountain
#

you pay = you get it

green bison
#

it says
embed.Send(embed)
^

ReferenceError: embed is not defined

lyric mountain
#

have u updated ur var name?

golden condor
delicate shore
#

ok

green bison
#

yes

golden condor
#

Here come the brain aneurysms again

delicate shore
lyric mountain
#

@delicate shore note that npm and yarn shouldn't be used althogether, I'd recommend deleting package-lock.json

delicate shore
#

wait what

#

i already used them

lyric mountain
#

the lockfile I mean

earnest phoenix
#
<p id="makeThisGreen">makeThisGreen</p>
<script>
document.getElementById("makeThisGreen").style.color = "green";
</script>
lyric mountain
#

npm can restrain yarn sometimes

earnest phoenix
#

Is this korrekt (not on pc rn can't test)

green bison
#

have u updated ur var name?
@lyric mountain
yes

pale vessel
#

getElementById

earnest phoenix
#

oh wait

pale vessel
#

yes

earnest phoenix
#

so it's korrekt yay

pale vessel
#

if that doesn't work, put it on the bottom of your body

delicate shore
#

anywasy yarn workec

#

anyways yarn worked

pale vessel
#

to make sure the document loads first

earnest phoenix
delicate shore
#

and not music works

#

thanks

#

all for the help bloody legends

lyric mountain
#

oh my

pale vessel
#

yarn seems easier to use

#

but i'm too used to npm

golden condor
#

Same

delicate shore
#

yes

earnest phoenix
#

I made my own kinda-useless (that's the literal name) npm package and it got 700+ downloads in two weeks people are fucking stoopid

green bison
#

is this correct?
`var embed = new Discord.MessageEmbed()

client.on("message", message => {
if (message.content === "-bot") {
MessageEmbed.Send(embed)
.setAuthor(client.user.username, client.user.avatarURL)
.setColor("#00000")
.addField(
"✽ Bot Ping : ",
Ā» ${Date.now() - client.createdTimestamp} + " ms",
true
)
.addField("Servers : ", Ā» ${client.guilds.size}, true)
.addField("Channels : ", Ā» ${client.channels.size} , true)
.addField("Users : ", Ā» ${client.users.size} , true)
.addField("Bot Name : ", Ā» ${client.user.tag} , true)
.addField("Bot Owner : ", Ā» <@686573386289119232 , @742791852327174145 >, true)
.setImage("")
.setFooter(message.author.username, message.client.avatarURL);
message.channel.send(embed);
}
});`

earnest phoenix
#

The fuck

manic osprey
#

@earnest phoenix hi

earnest phoenix
#

sorry if this hurts you but you seem like a dumbass

green bison
#

im new to coding

earnest phoenix
#

Then

manic osprey
#

@green bison const embed = new discord Message embed()

lyric mountain
#

...why haven't u started with "Hello World"?

#

like, bots ARE hard to make for a beginner

earnest phoenix
#

Learn a lot before gettinginto bot shit

manic osprey
#

client on

#

after if

earnest phoenix
#

tf

manic osprey
#

const embed

earnest phoenix
#

@manic osprey you're wrong

manic osprey
#

client.on("message", message => {
  if (message.content === "-bot") {
    const embed = new Discord.MessageEmbed()
      .setAuthor(client.user.username, client.user.avatarURL)
      .setColor("#00000")
      .addField(
        "✽ **Bot Ping** : ",
        Ā» ${Date.now() - client.createdTimestamp} + " ms",
        true
      )
      .addField("**Servers** :  ", Ā» ${client.guilds.size}, true)
      .addField("**Channels** : ", Ā» ${client.channels.size} , true)
      .addField("**Users** : ", Ā» ${client.users.size} , true)
      .addField("**Bot Name** :  ", Ā» ${client.user.tag} , true)
      .addField("**Bot Owner** :  ", Ā» <@686573386289119232 , @742791852327174145 >, true) 
      .setImage("")
      .setFooter(message.author.username, message.client.avatarURL);
    message.channel.send(embed);
  }
});```
delicate shore
#

ok so lyrics command crashes my bot and breaks my screen

#

causing my bot to go offline

earnest phoenix
#

@green bison use grasshopper app by google and go absolutely nuts with coding then get into bot development

delicate shore
manic osprey
#

@delicate shore you bad?

#

@delicate shore send me code

earnest phoenix
#

WHAT THE ABSOLUTE FUCK

#

@delicate shore see a doctor

delicate shore
#

yes

earnest phoenix
#

that big of an error message oh my god

delicate shore
#

;-;

#

I need to remove the

#

command

#

i guess

earnest phoenix
#

No

lyric mountain
#

that looks like a minified source code of the site you're getting the lyrics from

earnest phoenix
#

lmfao

#

The output is JSON

gentle karma
#

I NEED HELLP

earnest phoenix
gentle karma
#

How to download discord.js ik how to code a bot

earnest phoenix
#

the fuck

lyric mountain
#

wait, let's split it up

earnest phoenix
forest mirage
#

if you know how to code a bot you would know basic node.js

earnest phoenix
#

yeah

delicate shore
#

ok so what should i do

forest mirage
#

which allows you to install and uninstall packages

lyric mountain
#

A - How to download discord.js

OR

B - Ik how to code a bot

delicate shore
#

maybe remove command

lyric mountain
#

choose one

gentle karma
#

Ok

earnest phoenix
#

npm install @gentle karma

gentle karma
#

oi

#

Ok

earnest phoenix
#

ok so what should i do
@delicate shore debug it

delicate shore
#

9 y/o will see this and ask me how to get free nitro GWcorsairAWAUKEN GWcorsairBully

gentle karma
#

Nvm i already downloaded it

tight plinth
#

@lyric mountain C - how to gain brain cells to ask good questions/use a good translator

earnest phoenix
#

if you want to prevent your bot from going offline on errors put a try catch block on the stuff that causes the most errors

delicate shore
#

who ghost ping

earnest phoenix
delicate shore
green bison
#

can anyone help with this
.addField("Servers : ", Ā» ${client.guilds.size}, true)
^

TypeError: message.channel.addField is not a function

faint prism
#

because message.channel.addField is not a function

fringe axle
faint prism
#

channel doesn't have an addField option

#

So not sure why you're trying to access a function in a class that doesn't have that function

midnight blaze
#

@gentle karma you are a good troll xd

green bison
#

do i type Message.Embed?

faint prism
#

do you have the docs pulled up?

#

because I just searched for the function you're trying to access

earnest phoenix
#

please learn

faint prism
#

or just search the docs

#

it's super user friendly

earnest phoenix
#

i meant learn javascript

faint prism
#

it contains the answers to every question you've asked

#

I saw that server invite

green bison
#

ok thank you

earnest phoenix
#

@green bison please learn actual javascript

faint prism
earnest phoenix
#

Use both

#

And go ABSOLUTELY NUTS

faint prism
#

Just to understand the basic syntax, using variables, functions etc

#

Makes attempting an intermediate level project much easier

lyric mountain
#

a "Hello World" project is the holy grail of development

faint prism
#

holy grail starting point*

lyric mountain
#

if you don't do it at least once for the lang ur learning you're bound to fail

dire obsidian
#

Hello everyone

earnest phoenix
#

lmfao

delicate shore
#

Remeber when i was a retarted kid who always asked for spoonfeed

#

I can't type

lyric mountain
#

Remeber when i was a retarted kid who always asked for spoonfeed
pepperidge farm remembers

earnest phoenix
#

Remeber when i was a retarted kid who always asked for spoonfeed
@delicate shore you still are tbh

delicate shore
#

:(

#

My bot won't go online if I close ssh client

#

I even have a screen enabled

earnest phoenix
#

????

#

you use glitch

delicate shore
#

???

#

No

faint prism
#

use screen

delicate shore
#

Galaxy gate

#

i do

faint prism
#

sudo apt update && sudo apt install screen && screen -S botSession and run your bot start command then CTRL+A and press D to detach from the screen. Then you can exit the ssh session safely

heavy anchor
#

You should use a process manager like nodemon or PM2 to keep it alive and monitor it when you close terminal

faint prism
#

@delicate shore Are you using it correctly? Detaching from the screen before disconnecting the ssh session?

delicate shore
#

Ok so my bot crashes and virtual screen finishes

#

@delicate shore Are you using it correctly? Detaching from the screen before disconnecting the ssh session?
@faint prism nah

#

You should use a process manager like nodemon or PM2 to keep it alive and monitor it when you close terminal
@heavy anchor if my bot crashes it creates a bot loop

earnest phoenix
#

screen lmao

#

use tmux

faint prism
#

Screen for life

earnest phoenix
#

screen is ass

faint prism
#

Your screen is ass, mine works great

earnest phoenix
faint prism
#

It's a dead simple way to background tasks

#

tbh, I just haven't learned tmux yet

#

It supports dividing windows, doesn't it?

earnest phoenix
#

yes

faint prism
#

That's a really cool feature

#

It's probably a better terminal multiplexer as well tbh

delicate shore
#

way

#

ym

#

why does it says disabled

heavy anchor
#

Idk try PM2 start 0

delicate shore
#

ok but my bot is on tho

#

and i closed the sessionn

heavy anchor
#

Nvm then

delicate shore
heavy anchor
#

You know you can set up a Web dashboard too with PM2

#

To monitor your servers and bots

delicate shore
#

Really ?

#

Any guide or something ?

quartz kindle
#

make an account in the pm2 website and follow the instructions

delicate shore
#

Can I make it such that another bot sends a message in channel when bot is offline

dusky mason
#

anyone here know how to use aiohttp and python?

#

i need help with something

delicate shore
#

Discord.js for life

faint prism
#

I'm not really sure what you guys mean when you say "dashboard"
Are you all talking about a website with metrics for your bot?

lyric mountain
#

Can I make it such that another bot sends a message in channel when bot is offline
@delicate shore yes

quartz kindle
#

in pm2's case yes

lyric mountain
#

make a monitoring bot

quartz kindle
#

its metrics dashboard

heavy anchor
#

Yes for the server and you can add bot metrics too

shy turret
#

(discord.js) how do you detect if the bot leaves the server?

lyric mountain
#

onGuildMemberRemove event

shy turret
#

but detect it as the bot id?

heavy anchor
#

Use the deletedGuild event

earnest phoenix
#

Hi, I have a question. How do i add the code that you will get money when you win the game and that money will store in your bank?

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

module.exports = {
    name: 'type',
    description: "this is a type command",
    async execute(message, args) {
        let user = message.mentions.members.first() || message.author;

        const quiz = require("./quiz.json");
        const item = quiz[Math.floor(Math.random() * quiz.length)];
        const filter = response => {
            return item.answers.some(
                answer => answer.toLowerCase() === response.content.toLowerCase()
            );
        };
        const type = new Discord.MessageEmbed()
            .setTitle("Typing Competition")
            .setDescription(item.question)
            .setFooter('Made by Hermione Granger#9434')
            .addField(`Time`, `20 seconds! Be quick!`)
            .setColor("RANDOM");
        let amount = Math.floor(Math.random() * 80) + 1;
        message.channel.send(type).then(() => {
            message.channel
                .awaitMessages(filter, { max: 1, time: 20000, errors: ["time"] })
                .then(collected => {
                    message.channel.send(`${collected.first().author} is the first one to win the game and won ${amount} POG `)
                    db.add(`money_${message.guild.id}_${collected.first().author.id}`, amount);

                })
                .catch(collected => {
                    message.channel.send("Looks like nobody is as fast as me");
                });


        })
    }
}
lyric mountain
#

if (user.id === "ur bot's id")

sonic lodge
#

guildDelete

shy turret
#

onGuildMemberRemove or guildDelete confusion

faint prism
#

So the way someone would setup a bot's dashboard is setting up a webserver that uses an api service that gets metrics from the bot's database or logs? Does that sounds right?

sonic lodge
#

guildDelete is emitted whenever a guild kicks the client or the guild is deleted/left

lyric mountain
#

onGuildMemberRemove or guildDelete confusion
@shy turret idk how djs calls the event

#

I'm a java guy

shy turret
#

oh

lyric mountain
#

but you get the idea

shy turret
#

then im gonna do guildDelete

earnest phoenix
#

Someone please answer my question

faint prism
quartz kindle
#

are you talking about pm2 or a custom dashboard?

faint prism
#

Someone please answer my question
@earnest phoenix You'd have it store an integer in whatever database context you're using

placid iron
#

My webserver connects directly to the database

shy turret
#

Emitted whenever a guild kicks the client or the guild is deleted/left. oh

faint prism
#

are you talking about pm2 or a custom dashboard?
@quartz kindle I suppose a custom solution, since pm2 is JS-specific iirc

quartz kindle
#

then yes, it would basically be a webserver that queries the bot process either via an api or via linux tools like top

faint prism
#

Copy that, thanks Tim šŸ‘

quartz kindle
#

there are also many pieces of software that do it for you

#

like prometheus + graphite

#

and many others

faint prism
#

Mhm I've heard about those

#

grafana as well

earnest phoenix
#

@earnest phoenix You'd have it store an integer in whatever database context you're using
Oh okay

faint prism
#

Mhm, just update whatever their bank value each time, and upsert it into the user's record in the db

earnest phoenix
#

Okay I will try and work it out

#

Not sure if anyone is able to help me here but I’ve been looking for away to make it to my bot commands can’t be activated in the main chat on my server I’ve been trying to use the docs and still can’t find how to do it

faint prism
earnest phoenix
#

I’ll try

heavy anchor
#

@earnest phoenix The easiest way would be to change the overrides for that channel in your server and deny the bot send messages

earnest phoenix
#

hey guys who can help me with downloading discord commands on mac im using pytho

faint prism
#

@earnest phoenix The easiest way would be to change the overrides for that channel in your server and deny the bot send messages
this is probably the better solution. Less tethered to specific ID's that way

earnest phoenix
#

It’s only for one command that’s all

faint prism
#

It’s only for one command that’s all
@earnest phoenix right, but if you did what I suggested. It'd only work for that 1 channel ID and not on any other guilds. @heavy anchor 's suggestion was better in that it was more robust for handling separate guilds

earnest phoenix
#

if (message.channel.id === 'channelId')
#

That’s how I’ve done it for now

faint prism
#

are you okay with that not working on other guilds?
Hardcoding ID's may want to be avoided

hard pumice
#

wtf

#

still nothing

faint prism
#

token is invalid

#

read the error

hard pumice
#

?

faint prism
hard pumice
#

ohhh

#

ik

faint prism
#

Then change it

hard pumice
#

but its not invalid

faint prism
#

but it is

hard pumice
#

thats the thing

earnest phoenix
#

@faint prism I would like to think that that error would only happen if the channel is was the same as mine but even if they did somehow get the same channel ID it just sends a message in the chat to use the correct channel

hard pumice
#

it isnt dad

faint prism
#

the API is rejecting it. It MUST be invalid

hard pumice
#

but it isnt

faint prism
#

BUT IT IS

hard pumice
#

wanna go in a vc?

#

ill show you

#

i trust y

faint prism
#

No, I'm working rn

hard pumice
#

😢

faint prism
#

No, don't trust me

hard pumice
#

mk

#

BUT

faint prism
#

Don't trust anyone with your token. lmao

earnest phoenix
#

@hard pumice regen it and paste it in

hard pumice
#

okie doki

#

\

#

ill try

#

did it last night

#

nothing worked

#

and i showed 3 ppl my coding

#

and they all said it was fine

remote nova
#

Can someone help me which one i install its ubuntu 18.4

#

I got this all options in Ubuntu 18.4

hard pumice
faint prism
#

and i showed 3 ppl my coding
Can a JS dev show this guy how to place his token in a .env file or something? I get the feeling he is constantly leaking his token

hard pumice
#

nope

#

and if i do i regen it before showing

faint prism
#

still. You should consider doing that

hard pumice
#

wht?

faint prism
#

placing token in an environment variable

hard pumice
#

:'

remote nova
#

Can someone help

hard pumice
#

what is that

slender thistle
#

putting it in a .json file works and then parsing it works too

remote nova
#

Can someone help me which one i install its ubuntu 18.4.
I got this all options in Ubuntu 18.4

hard pumice
#

a js file i what ive been using so ill go with that

#

and this is gonna fix it?

slender thistle
#

hardcoding your token isn't safe as you can see

faint prism
#

@remote nova minimal ig

remote nova
#

Ohk thx

#

Now which one in this

faint prism
#

one big

remote nova
#

Ohk thx once again

faint prism
#

np

hard pumice
#

wait so what do i do ĀÆ_(惄)_/ĀÆ

#

just delete everything?

faint prism
#

no

#

lol

hard pumice
#

well what

#

token never works

#

idk it worked before

#

but now nope

#

WAIT

faint prism
#

Did you copy the latest from discord, update the token variable, SAVE FILE, and restart the bot?

hard pumice
#

IK]

#

IK WHATS WRONG

#

gimme a sec

#

it didnt work

#

i forgot to replace the code in my other file that started the bot

#

but it still didnt work

viral iris
#

how to push image into array in canvas ?

faint prism
#

Is it a byte array?

earnest phoenix
#

lol

hard pumice
#

I DID IT

#

im retarded

earnest phoenix
#

how to push image into array in canvas ?
@viral iris b r u h m o m e n t

hard pumice
#

i didnt save

earnest phoenix
#

lmfao

faint prism
#

ugh

earnest phoenix
#

John I have a feeling you don't really know how to code

hard pumice
#

as soon as i saw that white dot i was so happy as i knew that was the cause

faint prism
#

Did you copy the latest from discord, update the token variable, SAVE FILE, and restart the bot?
I thought that was the issue, so I made sure to ALL-CAPS when I said it

earnest phoenix
#

lmfa

hard pumice
#

no remember i forgot to put it in the other js thing

#

that ran the bot

#

and thats why it was broken

earnest phoenix
#

lel

#

use an environment variable file

#

.env is the file

hard pumice
#

and store the token in there?

earnest phoenix
#

we use it for storing stuff we don't want other people to see

faint prism
#

yeah

hard pumice
#

how would i store it?

earnest phoenix
#
TOKEN=your token
#

that's it

hard pumice
#

a screen shot?

faint prism
#

lol

earnest phoenix
#

do process.env.TOKEN to grab it in js

faint prism
#

so it's something like client.login(process.env.TOKEN)

hard pumice
#

in a new file in vsc?

earnest phoenix
#

yep

#

name the file .env

#

no name

#

just .env

faint prism
#

no

#

lmao, don't confuse him

earnest phoenix
#

and you'll be absolutely retarded to leak the file and/or run smth which outputs process.env.TOKEN data

hard pumice
#

that?

faint prism
#

lol

earnest phoenix
#

you got it right šŸ™‚

faint prism
#

no

earnest phoenix
#

Yep

#

Make the env file

#

.env

#

hes done

#

No

#

.vsc

copper cradle
#

I was gonna try to help

hard pumice
#

it is env

faint prism
#

Why did you make the filename: .env token file

earnest phoenix
#

yeah

#

ur good dude

faint prism
#

just make it .env

earnest phoenix
#

Bruh

copper cradle
#

but I can see I'm gonna loose braincells

hard pumice
#

idk

earnest phoenix
#

Absolute retard

hard pumice
#

just named it something random

faint prism
#

no he did it backwards lmao

copper cradle
#

@earnest phoenix don't use that word, mods may mute you

faint prism
#

Just like cry was, rip

hard pumice
#

is that right?

faint prism
#

no

earnest phoenix
#

yes

#

ur good bro

hard pumice
#

sounded the most right

copper cradle
#

Oh my gof

faint prism
#

@earnest phoenix bro no it's not. Stop giving false information

earnest phoenix
#

@faint prism bro why u confusin him

copper cradle
#

just name it .env

hard pumice
#

ohhhhhh

copper cradle
#

Voh please stop it

faint prism
#

@earnest phoenix You're actually trolling rn

earnest phoenix
#

the way he did it is how i did it

copper cradle
#

you're clearly trolling

earnest phoenix
#

but ok

hard pumice
faint prism
#

Then you're doing it wrong

earnest phoenix
#

Two retards here

#

wtf

copper cradle
#

now remove the text from the file

earnest phoenix
hard pumice
#

ok

earnest phoenix
#

lel

#

you admitted it yourself too

faint prism
#

The .env file should include the following line:
TOKEN=putyourtokenhere
NOTHING ELSE

earnest phoenix
#

not the .vsc?

copper cradle
#

no

quartz kindle
#

Lol

copper cradle
#

lmao

prisma oriole
#

tf is a .vsc

#

lmao

faint prism
#

A directory that contains VSC's settings like how to launch the program when you click "Run"

earnest phoenix
#

How to i get my team bot developer in top.gg

prisma oriole
#

yeah but like

#

what does that have to do woth .env

earnest phoenix
#

How to i get my team bot developer in top.gg
@earnest phoenix dm a mod

prisma oriole
#

lmfao

#

brain cells

earnest phoenix
#

Ok

hard pumice
#

aight i did it

faint prism
#

great don't leak it

copper cradle
#

now you gotta parse that file so your code can access it

hard pumice
#

was i supposed to make a folder or something?

copper cradle
#

you can use the dotenv module

faint prism
#

no

earnest phoenix
#

yes parse in .vsc file i think

#

then good šŸ‘

faint prism
#

just in the same folder as the .js files

prisma oriole
#

Omg

copper cradle
#

omg

hard pumice
#

oh

faint prism
#

yes parse in .vsc file i think
@earnest phoenix seriously stop

earnest phoenix
#

dude

#

ok fine u help

prisma oriole
#

learn brain cells before offering help

#

require(ā€˜dotenv’).config()

#

I beleive is the next step

#

in your index file

earnest phoenix
#

Voh please stfu

hard pumice
#

was i supposed to put the token below where it said put token here?

copper cradle
#

did you install dotenv already?

hard pumice
#

i have a feeling i was

earnest phoenix
#

yes

#

you put token there

#

was i supposed to put the token below where it said put token here?
@hard pumice waitWhat

copper cradle
#

@hard pumice if I say <here> should you put it in mars or <here>

faint prism
#

you put it IN PLACE OF that yourtokenhere

earnest phoenix
#

I'll spoonfeed cuz I'm going nuts rn

copper cradle
#

common sense my boi

hard pumice
#

😢

#

ok

earnest phoenix
#

why u guys be rude

#

wtf

faint prism
#

@earnest phoenix BC you're feeding incorrect information and it's frustrating enough

earnest phoenix
#
.env
  |_TOKEN=your fucking token retards

bot-code.js
  |_bot.login(process.env.TOKEN):
#

now

#

you still need help

#

stop saying r word

#

stop being the r word

prisma oriole
#

welcome to the javascript community

faint prism
#

ruhroh 🐶 ||scooby||

sudden geyser
#

javascript is a horrible masterpiece

prisma oriole
#

python is an amazing disaster

sinful belfry
#

the hell is going on here

prisma oriole
#

Frt

#

fr

faint prism
#

It's hell starman

earnest phoenix
#

lol

copper cradle
#

some crap

earnest phoenix
#

we tryna explain two retards

sinful belfry
#

dont be toxic

faint prism
#

We're trying to help a guy who is constantly doing it wrong
And @earnest phoenix is feeding incorrect information

earnest phoenix
#

they admitted themselves

#

?

prisma oriole
#

pls mute

earnest phoenix
#

i told him how i did it

#

or atleast one guy

sinful belfry
#

doesnt matter

earnest phoenix
#

and some dude is saying the r word

#

over and over again

#

alright I'm out

copper cradle
#

the way you did is not the best way

sinful belfry
#

be helpful, and keep drama outta here

prisma oriole
#

ā€œretardsā€ because theyre learninng javascript

opal plank
#

there was a way to post emojis with only id, no?

earnest phoenix
#

@earnest phoenix was the one using the r word constantly

prisma oriole
#

we were all beginners at some point chill my mans

earnest phoenix
#

alright I'm just gonna click Alt + F4

sinful belfry
#

@earnest phoenix did i not just say to keep drama out of here?

opal plank
#

<: id here :>

earnest phoenix
#

my bad

sinful belfry
#

don't continue it, please

opal plank
#

im certain there was a way

#

though i forgot how

prisma oriole
#

anyway lets not talk about anything drama related or controversial

Angular is a dumpster fire

opal plank
#

no one knows?

sudden geyser
#

there was a way to post emojis with only id, no?
@opal plank I don't think so

opal plank
#

i remember having a discussion with someone

#

they proved me wrong

prisma oriole
opal plank
#

i said you needed to get the emote with the cnd url

prisma oriole
#

you can fetch the name

opal plank
#

i know the base sytanx

prisma oriole
#

then use that firmat

#

format

opal plank
#

but there was a way to do with ONLY ID

sudden geyser
#

but that requires fetching it right

prisma oriole
#

Fetch the entire emoji using the id then use that format?

opal plank
#

no code

#

in client

#

aaaah found it

prisma oriole
#

epic

opal plank
#

<:\a:any_id>

copper cradle
#

nice

prisma oriole
#

Time to go commit mass brain cell exodus with my best friends, brackets

sudden geyser
#

@opal plank syntax? <:\a:580739487487754240> does not work for me

opal plank
#

i tested, it works

#

make sure you got access to that emote

sudden geyser
#

I have access to it and it still does not work.

copper cradle
#

did you add the \

#

cuz that's just for escaping it

#

and if you did then šŸ¤¦ā€ā™‚ļø

opal plank
#

ignore the shit in the background

sudden geyser
#

Ah I see it now

#

ty

fickle dune
#

<:\a:607682498050260998>

copper cradle
#

oml

fickle dune
#

<:\a:607682498050260998>

#

adasda

copper cradle
#

are people like, blind?

fickle dune
#

no

sudden geyser
#

What's confusing is you have to remove the slash afterwards

copper cradle
#

don't šŸ‘ add šŸ‘ the šŸ‘ \

#

not really

#

backslashes are for escaping

sudden geyser
#

Yes, some people will think you need to actually add it in there and try it like that

earnest phoenix
#

i use expressjs for my smol website and i have to make a new app.get function for every single page

#

f

copper cradle
#

well yes

#

that's how routing works

earnest phoenix
#

can i compact it down to one

#

smh

copper cradle
#

I mean you theoretically could

earnest phoenix
#

don't worry i don't storr my env file in the root directory of the site

copper cradle
#

every request object comes with the uri, so you can make a function, pass it to every route, and then in that function check the uri

#

and do the crap

hard pumice
#

can anyone tell me whats wrong with my case and colon?

faint prism
#

The if statement

hard pumice
#

thats not supposed to be there?

faint prism
digital ibex
#

ur closing the switch statement

faint prism
#

You're missing the { it looks like for the if

hard pumice
#

k

digital ibex
#

not needed

#

you only need the { if you have morw than one line

#

like

#

if (bob) console.log(bob)

#

u can do

hard pumice
#

so now its this parenthisis at the bottom

digital ibex
#

if u wanna do more stuff and indent the code, u need the {} otherwise it sees the other lines as the other stuff unrelated to the if statement

#

ur closing the switch statement

hard pumice
#

?

delicate shore
#

ok so how to get number of bots in a server

faint prism
#

iterate over each user and check for the user.isbot boolean, then increment an integer variable

delicate shore
#

forEach

sage crane
#

Coni

#

Cono

digital ibex
#

no

faint prism
#

forEach
@delicate shore sure

digital ibex
#

filter the guilds members to find the bots

#

like

#

using that is a slower way and unnecessary in this case

#

guild.members returns an array of members

#

so

#

filter the members to find user.bot

hard pumice
#

can you explain to me whats wrong

#

and how its wrong

#

and how i can fix it

digital ibex
hard pumice
#

waht is a switch statment?

#

im new

faint prism
#

uh

#

the thing you're using

hard pumice
#

just started like 3 days ago

misty sigil
#

switch/case

hard pumice
#

ohhhh

#

star your way better

faint prism
#
{
  case 'something':
    // Do a thing
    break;
}```
#

It's kind of like a different if/else statement

hard pumice
#

it messed things up even more

faint prism
#

case doesn't need { }

#

but the switch statement does

hard pumice
#

what is switch

faint prism
#

you should probably just stick to if/else

weak rain
#

do anyone know a good website

#

i wanted to see

faint prism
#

if (thing == 'something')
{
// Do thing
} else if (thing == 'somethingelse')
{
// Do a thing
}

#

do anyone know a good website
@weak rain google.com is pretty cool

weak rain
#

@weak rain google.com is pretty cool
@faint prism lmao i want for bot

faint prism
#

Are you asking for a bot website?

weak rain
#

Yes

faint prism
#

or bot list?

ionic dawn
#

Nasty

weak rain
#

bot

#

nasty ?

ionic dawn
#

You mean a bot maker website?

faint prism
#

I think he wants a website for his bot

weak rain
#

i mean

#

a example

delicate shore
#

should this work

#
msg.guild.members.cache.filter(member => member.user.bot).size;
ionic dawn
#

Like some docs for your bot so people can learn how to use it?

delicate shore
#

don't send me tryitandsee thing

misty sigil
#

but try it

faint prism
#

a example
@weak rain you can go on top.gg and click on a bot and check their websites' out

delicate shore
#

lazy to do so

weak rain
#

@weak rain you can go on top.gg and click on a bot and check their websites' out
@faint prism good idea

#

ty

hard pumice
#

it still dont work 😢

faint prism
#

you're } should be before the break;

earnest phoenix
#

@outer star

#
let member = client.fetchMembers(ur id);```
faint prism
#

and your for loop doesnt have anything inside it

outer star
#

kk

earnest phoenix
#

pls help

#
message.reply(member.user.tag)```
hard pumice
#

@faint prism wdym

misty sigil
#

what @earnest phoenix

faint prism
#
{
 // Has nothing inside it
}```
earnest phoenix
#

i need to make cross chattig

hard pumice
#

it is the queue

#

its looping the queue

earnest phoenix
#

:p

hard pumice
#

prrty sure

earnest phoenix
#

Found a way to make expressjs serve files automatically without me having to keep on making new app.get() functions. Am I dead from this line of code?

app.use(express.static(__dirname));
faint prism
#

@hard pumice you really just need to learn Javascript syntax, man... lol

hard pumice
#

should i use that one website

faint prism
#

yeah

hard pumice
#

k

earnest phoenix
#

so

#

am i dead guys

#

cuz

#

kys

tight plinth
#

u are to me

earnest phoenix
#

my .env is in the root directory

misty sigil
#

rude

split hazel
#

Found a way to make expressjs serve files automatically without me having to keep on making new app.get() functions. Am I dead from this line of code?

app.use(express.static(__dirname));

i mean that will just make every file in your dir accessible

earnest phoenix
misty sigil
#

Should work

topaz fjord
#

just make another dir called public and change it to path.resolve(__dirname, 'public')

earnest phoenix
#

i mean that will just make every file in your dir accessible
are app.get() functions called before express automatically serves files via app.use(express.static(__dirname));? Cuz i can just override the function and serve a KEKW image when .env is called

#

lemme try

faint prism
#

I'm sure you can

split hazel
#

i think everything gets called in the order you add it

earnest phoenix
#

ok

split hazel
#

dont take my word for it though

topaz fjord
#

you're doing extra work for something that can be resolved by just creating a new directory and throwing the static files in it

earnest phoenix
#

no

#

i think everything gets called in the order you add it
@split hazel no

#

app.get() functions work before express static stuff

topaz fjord
#

dont take my word for it though

earnest phoenix
#

i tried it and saw

fickle dune
#

ok i made a lot of commands this enough

earnest phoenix
#

no

#

make more

topaz fjord
#

he said he wasn't sure

fickle dune
#

bruh

earnest phoenix
#

but atleast i tried adn tested

#

so we both learned a smol bit of stuff

faint prism
#

@fickle dune Don't stop until there are commands to see statistics on everything you can think of mmLol

earnest phoenix
#

that app.get() functions work before express static serving

fickle dune
#

@earnest phoenix i have like 30

#

and making thes

#

my english

#

went brrrrrrrrr

#

i have to change some names

#

i made redit

#

insted f rededit

ionic warren
#

how do i make embeds?

earnest phoenix
#

bruh

fickle dune
#

discord.richemebed

earnest phoenix
ionic warren
#

ty

fickle dune
#

in a const

earnest phoenix
#

wrong

faint prism
#

embed*

earnest phoenix
#

partially wrong

fickle dune
#

lol

#

my english

earnest phoenix
#

not smth to lol ab out

#

if you give someone wrong info it ain't funny

#

how should i style my docs page Thonk

#

do i put multiple doge pics on the background

#

or do i put a heck detailed rainbow

#

or smth

fickle dune
#

no one is here

#

: C

earnest phoenix
#

me is here

#

want help

#

or perhaps you want D E A T H

green bison
#

does anyone know the code to show how many servers the bot is in?

paper cliff
#

how to use discord as a library

knotty steeple
#

v11 or v12

green bison
#

v12

#

i think

earnest phoenix
#

when you suck so much at CSS you use 100 lines of JS to style your stuff

paper cliff
#

horrible ^

#

bad bad bad

knotty steeple
#

<Client>.guilds.cache.size

#

i think

fluid basin
#

spoonfeed

paper cliff
#

yes sammy

knotty steeple
#

man its 1 short line

paper cliff
#

btw what's the code to show that in assembler

fluid basin
#

I like how stackoverflow is the reverse of here, they will gladly spoonfeed

paper cliff
#

what is spoonfeed

fluid basin
#

wuts assembler

#

V8 is JIT, output can vary

topaz fjord
#

spoon-feed = giving code as "help"

earnest phoenix
#

what's the correct function name, document.getElementByTag() or document.getElementsByTag()

paper cliff
#

oh thanks turtle

topaz fjord
#

the first one gets one element

paper cliff
#

@earnest phoenix check in your console

topaz fjord
#

the second one gets all

paper cliff
#

both I guess, yes

fluid basin
topaz fjord
#

one's plural and one's singular

#

read the names

earnest phoenix
#

oh wait

#

TagName

#

lol

fluid basin
#

more than one element can have the same tag

#

so it doesn't make sense to only have one element for a tag name

earnest phoenix
#

this becomes this:

fluid basin
#

unlike id where it is supposed to be unique across the entire document

earnest phoenix
#

oof

#

did i just spoil

paper cliff
#

dafuk

earnest phoenix
#

What is the variable for the event of disconnected user ??

#

huh

#

event

#

variable

paper cliff
#

disconnected?

#

what

earnest phoenix
#
document.getElementsByTagName("body").Map(array)[0]
#

is that the correct way to use Map

#

wtf even is Map

sharp thicket
#

Hello,anyone know how do i react to the embed i sent not the trigger ?

#

discord.js

earnest phoenix
#

???

topaz fjord
earnest phoenix
#

isn't there another function called Map() to convert a collection to an array

#

I'm not THAT good at JS

topaz fjord
#

and you don't need .getElementsByTagName() because there can only be one body tag

#

*you don't need to map it

earnest phoenix
#

i need it for smth else

#

lots of doges

#

lol

#

who tf am i talking to

#

chat dead since 9:37 pm

#

RIP chat

#

ok

#

hey

#

hey

#

lmfao

ionic dawn
#

That home page

earnest phoenix
#

is it better to use CSS for styling pages or HTML?
||i'm not mad||

ionic dawn
#

Comedy level 10

earnest phoenix
#

thx

#

wait

#

sarcasm?

cinder patio
#

are you actually being serious?

is it better to use CSS for styling pages or HTML?
||i'm not mad||

paper cliff
#

can someone creates a Doge programming language please

earnest phoenix
#

yep

#

css

lofty jay
earnest phoenix
#

can someone creates a Doge programming language please
@paper cliff there is a cryptocurrency for it too

#

@paper cliff meme format on the writing techniques for it

paper cliff
#

i don't care about cryptocurrency i wanna write code with the dog

earnest phoenix
#

I ACTUALLY USE HTML FOR STYLING MY PAGE KILL ME CSS IS TOO HARD FOR ME
||mommy help||

paper cliff
#

in fact

#

you're using css into html

#

so it's the same

earnest phoenix
#

no

cinder patio
#

How can one use HTML to style their page? HTML is used to define the layout of the page, CSS is used to style it

earnest phoenix
#

i meant using headers and stuff

paper cliff
#

then it's not styling

earnest phoenix
#

k

cinder patio
#

That's not styling

earnest phoenix
#

joke ruined

paper cliff
#

pay your joke tax

earnest phoenix
#

the fu

#

gotta use heroku for now because i got no money for hosting gotta install a phone app for restarting dynos to turn the bot back on if the app crashes

cinder patio
#

it was a joke... sure

paper cliff
#

host it on your phone wtf

#

if you have no money for monthly payments

#

host at home?

earnest phoenix
#

cant

paper cliff
earnest phoenix
#

my pc makes too much heat and i dont own a rasperry

paper cliff
#

buy a raasp

earnest phoenix
#

this is a temporary solution

#

rasperry

paper cliff
#

You can even host a minecraft server on your phone

earnest phoenix
#

i host mine on repl.it no i don't

paper cliff
#

repl.it needs your code to be public

#

btw

earnest phoenix
#

also

#

wanna see my npm package bois

paper cliff
#

no sorry I have to eat dogs

earnest phoenix
#

wait

#

you can't use percentages in width and height attributes of img tags?!?!

paper cliff
#

sure you can

earnest phoenix
#

oh wait

paper cliff
#

height: 100%;

earnest phoenix
#

yep

#

that's the error

#

hmm why does my bot on heroku crash within 10 minutes of turning on

paper cliff
#

heroku is slow that could be a reason

#

but uh check the logs

pale vessel
#

<img style="height: 100%">

paper cliff
#

on the heroku's website

earnest phoenix
#

What I should do:

<img style="height: 25%; width: 25%;">

What I am actually doing:

<img width="25%" height="25%">
pale vessel
#

bruh

#

that's like for iframes

paper cliff
earnest phoenix
#

am i just gonna sit here being embarassed from sucking at CSS

paper cliff
#

then

#

just

#

learn css????

pale vessel
#

just learn :4head:

earnest phoenix
#

still doesn't work

#

TF

#

where did you get the domain mate

#

google it

#

yea my bot just goes offline with no log at all from heroku

#

it does work dumbass me thought it was displaying the actual size
have you ever heard of a guy who thought the image was as big as it looks like when it has been shrunk down to 25%? you heard of em (you're reading his message man)

restive furnace
#

if an idiot like me can make https://aeon.js.org with only html, css, and js then so can you
custom css, or some like water.css?

pale vessel
earnest phoenix
#

water.css wuts that

pale vessel
#

it's literally pure css

#

in one page

restive furnace
#

ok

pale vessel
#

because i was too lazy

earnest phoenix
#

where did you get the domain
you have to pay for it or did someone give it to you for freeeeee

cinder patio
#

I'm pretty sure it's free, but you have to host your site on github pages

earnest phoenix
#

"f" + "REEEEE"

#

I'm pretty sure it's free, but you have to host your site on github pages
@cinder patio EXCUSE ME GITHUB PAGES GIVES US FREE DOMAINS WHA THE -

misty sigil
#

No

restive furnace
cinder patio
#

I've never tried github pages so I dunno. I simply repeated what was said in the website because I can read

earnest phoenix
#

i can't read :/

#

Hey guys I need a little help

#

So im making a RPG bot and I need to know how to set up an inventory for it

#

wasnt amazon AWS free for a year?

#

if i do <a href="/docs/functions.html"> and the current webpage is <my domain>/docs/index.html will it try to take the user to <my domain>/docs/docs/functions.html??

#

docs inside docs

#

I do not know

cinder patio
#

Digital Ocean gives you 2 months of free credits

earnest phoenix
#

no it doesn't

#

it just appends /functions.html to the domain name

#

Does anyone know how to set up an inventory for my RPG bot

misty sigil
#

use a database

earnest phoenix
#

and we won't spoonfeed anyways

misty sigil
#

@earnest phoenix that’s wrong use of it

earnest phoenix
#

Starwoman wtf

#

How do I use a database

restive pebble
earnest phoenix
#

read the docs

misty sigil
#

quick.db is nice

#

easy

pale vessel
#

@earnest phoenix it's relative so domain/docs/functions.html

faint prism
#

sqlite, ms-sql,mongodb,quick.db, etc

pale vessel
#

if you remove the leading / then it would be a different case

earnest phoenix
#

Ok

sudden geyser
#

How do I use a database
@earnest phoenix learn SQL or use a no-sql database

faint prism
#

it's nosql

#

aka "not just sql"

sudden geyser
#

Confused. Are you trying to say "no-sql" is not the same as "nosql" when used in a message

faint prism
#

If you mean't no-sql = nosql then no

restive furnace
#

no-sql != nosql

faint prism
#

lets eat, grandpa
lets eat grandpa

sudden geyser
#

What is the difference?

restive furnace
#

that no-sql is not nosql

faint prism
#

What is the difference?
@sudden geyser grandpa is eaten is one sentence

pale vessel
#

interesting

cinder patio
#

Stop being silly, it's obvious what they meant

sudden geyser
#

So you're saying a mistake with my grammar is the reason it's not correct even though I'm implying what is obvious

faint prism
#

I think I started something accidentally. What you implied was obvious. However nosql is not hyphenated.

robust furnace
#

.

restive furnace
#

dOt pOsT

#

bruh

sudden geyser
#

Yeah you're right on it not being hyphenated but to say they're not the same when what I implied (and you knowing) is obvious is just petty.

faint prism
#

Petty indeed. My mistake.

#

Not sure if this counts an an "optimization". What do you all think? I think i should be able to offload this to the mongodb as a query instead of just getting everything.

hot totem
#

?

sterile thicket
#

I have some args let args = ['a', 'b', 'c']
When I mention arg that doesn't exist ie, args[3], it returns undefined of course.
But I want the undefined arg to return "" an empty string.
I'm trying args[3] === undefined) ? "" : args[3]
What am I doing wrong and how to correct it?

misty sigil
#

it starts from 0

sterile thicket
#

ik

#

read it

earnest phoenix
#

Should I iframe a gitbook space on my docs page or do I make my own HTML shenanigan

#

Anyone got any recommendations for an app or something I can use to develope my bot on the computer Windows 7

misty sigil
#

oh lul i thought args was ["a", "b", "c"]

earnest phoenix
#

Anyone got any recommendations for an app or something I can use to develope my bot on the computer Windows 7
@earnest phoenix chrome

misty sigil
#

@earnest phoenix visual studio code?