#development

1 messages ยท Page 1000 of 1

delicate shore
#

It's not leaving

golden condor
#

What is your error

delicate shore
#

I don't know

#

I haven't done console.log

regal raven
#

tk apperently is now paid
@lusty quest I just got one for free the day before yesterday so it was a good idea ๐Ÿ™‚

golden condor
#

So there is no error in the console?

delicate shore
#

Wait lemme do it

summer acorn
#

getting an error with localhost mongo. I've tried a couple different things; localhost with and without port, localhost but the ip. All seems to give this error after the bot running for about a minute.

MongooseServerSelectionError: connect ECONNREFUSED 127.0.0.1:27017
mongoose.connect(`mongodb://localhost:27017/database`, {useNewUrlParser: true, useUnifiedTopology: true}).then(console.log(`Database Connected!`)).catch(err => console.log(err));

I am probably just stupid about this, but oh well.

#

the ip is not a leak, it's the localhost reserved ip

delicate shore
#

For those who are facing error on freedom I was also facing I have fixed it
DM me and I'll. You

#

You need to download Parallel Space

golden condor
#

@summer acorn have you opened the mongodb service on your computer?

delicate shore
#

And open chrome there

#

Create a new Gmail id

#

And then go to frenom

lusty quest
#

did you got some sort of authentification running?

summer acorn
#

no I have not.

golden condor
#

That's why

summer acorn
#

I've just set up mongoose.

regal raven
#

Yeah it's definitely broken
@golden condor It has issues with countries so I had to use a vpn and location in us in vpn to acces

summer acorn
#

oh ok then

golden condor
#

You need the mongodb service running

summer acorn
#

Guess I was just stupid after all.

golden condor
#

Or to use an external database

regal raven
#

@earnest phoenix yeah the site seems to have stopped working recently
@golden condor I got one the day before yesterday

lusty quest
#

you can get a free mongo insance

golden condor
#

^^ yep on the atlas website

summer acorn
#

the db will be local on the vps

lusty quest
#

native or docker?

summer acorn
spare mirage
#

super where do I check errors

golden condor
#

I recently moved from a local db to a cluster because it makes it easier to go cross machine and having 200 servers only uses up about 50kb (each with like 15 lines of data in it) so 512mb of storage is tons more than needed.

#

@summer acorn is that on the same machine.

summer acorn
#

yes

spare mirage
#

it just says 2 problems in this file

golden condor
#

Press problems

#

@summer acorn so it is Linux or Windows?

spare mirage
summer acorn
#

windows

viral iris
lusty quest
#

context?

golden condor
viral iris
#
{
  "TOKEN":"",
  "PREFIX":"-"
  "default_prefix":"-"
  
}```
lusty quest
#

remove the " from the Keys

golden condor
#

Add a comma after "-"

lusty quest
#

or that

viral iris
#

ok

golden condor
#

The first one

viral iris
#

prefix or default ?

#

ok ok

golden condor
#

PREFIX

summer acorn
#
{
  "TOKEN":"",
  "PREFIX":"-",
  "default_prefix":"-"
  
}

fixed

viral iris
#

thx

golden condor
#

Download the community edition localhost then it should work

spare mirage
summer acorn
#

alright

golden condor
#

You missed something

#

In your code

#

We can't really help withbthay

spare mirage
#

uhh\

#

what if I send context?

golden condor
#

You just gotta find the thing that you missed and add on the end to it

#

Well then yes ig

earnest phoenix
#

so

#

if i cant get a tk domain

#

and i cant use my ip address

#

and there is no way to bypass the ssl on windows

spare mirage
#
const bot = new Discord.Client(); 
const token = 'no'; 

const cheerio = require('cheerio');
 
const request = require('request');

const PREFIX = ("b!")

bot.on('ready', () =>{ 
    console.log('Im alive! woop woop!'); // do node . to run
    bot.user.setActivity('**b!help**');
})


bot.on('message', message=>{
    if (message.content.startsWith(PREFIX + "ping")) message.channel.send("Pong!");
    if (message.content.startsWith(PREFIX + "youtube")) message.channel.send("Like and Subscribe \n https://www.youtube.com/channel/UCI3uMSDZzJ8T2X_r0PZEzWA?view_as=subscriber ");
    if (message.content.startsWith("@silk moat")) message.channel.send(`Hi! My prefix here is **${PREFIX}**`);
    if (message.content.startsWith(PREFIX + "image" )) image(message); 
    if (message.content.startsWith(PREFIX + "help")) {
        const embed = new MessageEmbed()
          // Set the title of the field
          .setTitle('Help! :clipboard::banana:')
          // Set the color of the embed
          .setColor(0xff0000)
          // Set the main content of the embed
          .setDescription(':banana:About Banana!: \n      Banana is a bot bases on having fun \n      And eating bananas! :banana:\n\nCommands:\n:banana: b!image : shows u a random banana image (will be changed soon)\n:banana: b!ping : Pong! (will show ms soon)\n:banana: b!youtube : Subcribe to me (will be changed to setting your own youtube soon)\n\nThats it for now thanks!');
        // Send the embed to the same channel as the message
        message.channel.send(embed);
      }
    });
}) // commands```
^
error is here
earnest phoenix
delicate shore
golden condor
#

You used botChannel before you defined it

delicate shore
#

Oh

spare mirage
#

who

golden condor
#

@spare mirage would you mind using hastebin

delicate shore
#

How to define Bot channel

golden condor
#

@earnest phoenix if you can get a domain, cloudflare is a good choice since your IP is hidden

earnest phoenix
#

look my bf will get mad at me if i spend any money

#

so i need a free option

delicate shore
#

You used botChannel before you defined it
@golden condor how ?

earnest phoenix
spare mirage
#
if (message.content.startsWith(PREFIX + "help")) message.channel.send```
how do I make this send a embed
#

https://discord.js.org/#/docs/main/stable/general/welcome dont rederect me to this I only get errors

lusty quest
#

could you show your messagehandler again?

#

its possible that you got there a error

spare mirage
#

wdym with messagehandler

lusty quest
#

if (message.content ===`${PREFIX}help`) {message.channel.send(embed)}

#

and the next one chains on it with else if

spare mirage
#
    if (message.content.startsWith(PREFIX + "ping")) message.channel.send("Pong!");
    if (message.content.startsWith(PREFIX + "youtube")) message.channel.send("Like and Subscribe \n https://www.youtube.com/channel/UCI3uMSDZzJ8T2X_r0PZEzWA?view_as=subscriber ");
    if (message.content.startsWith("@silk moat")) message.channel.send(`Hi! My prefix here is **${PREFIX}**`);
    if (message.content.startsWith(PREFIX + "image" )) image(message); 
    if (message.content.startsWith(PREFIX + "help")) message.channel.send(":banana:About Banana!: \n      Banana is a bot based on having fun \n      And eating bananas! :banana:\n\nCommands:\n:banana: b!image : shows u a random banana image (will be changed soon)\n:banana: b!ping : Pong! (will show ms soon)\n:banana: b!youtube : Subcribe to me (will be changed to setting your own youtube soon)\n\nThats it for now") 
}); // commands```
lusty quest
#

does the ping command work?

spare mirage
#

yes

lusty quest
#

its how does your embed looks like?

#

(code wise)

spare mirage
#

{
"embeds": [
{
"title": "Help! ๐Ÿ“‹๐ŸŒ",
"description": "๐ŸŒAbout Banana!: \n Banana is a bot bases on having fun \n And eating bananas! ๐ŸŒ\n\nCommands:\n๐ŸŒ b!image : shows u a random banana image (will be changed soon)\n๐ŸŒ b!ping : Pong! (will show ms soon)\n๐ŸŒ b!youtube : Subcribe to me (will be changed to setting your own youtube soon)\n\nThats it for now",
"color": 7506394,
"author": {
"name": "Banana"
},
"footer": {
"text": "Justii#3473"
}
}
]
}

earnest phoenix
#

how did my problems go from not being able to install pip to being forced to pay

lusty quest
#
{
  "embeds": [
    {
      "title": "Help! :clipboard::banana:",
      "description": ":banana:About Banana!: \n      Banana is a bot bases on having fun \n      And eating bananas! :banana:\n\nCommands:\n:banana: b!image : shows u a random banana image (will be changed soon)\n:banana: b!ping : Pong! (will show ms soon)\n:banana: b!youtube : Subcribe to me (will be changed to setting your own youtube soon)\n\nThats it for now",
      "color": 7506394,
      "author": {
        "name": "Banana"
      },
      "footer": {
        "text": "Justii#3473"
      }
    }
  ]
}

earnest phoenix
#

all you did was put it in a json code block

#

Is there a way to sort MongoDB arrays alphabetically? Or do I need to do it myself using for loops?

spare mirage
#

that makes it easier to see @earnest phoenix

lusty quest
#

i fuckign made it readable

earnest phoenix
#

hm

#

ima take a break from all this shit and just chill and use dbm

lusty quest
#

try to use the embed constructor @spare mirage its usually easyer

earnest phoenix
#

for like a few days

spare mirage
#

wich one xD there are thousands

lusty quest
earnest phoenix
#

i could also learn how to learn discord.js

#

nah

lusty quest
#

with d.js i could help you

earnest phoenix
#

fine

spare mirage
#

@lusty quest so I convert it

lusty quest
#

use the constructor instead of whatever that was what you sended

spare mirage
#

ok

lusty quest
#

the code you sended a few hours ago was also using it but i guess the issue was that the constructor was all over the file

spare mirage
#
    .setColor('#0099ff')
    .setTitle('Help :banana:')
    .setAuthor('Banana')
    .setDescription('\n      Banana is a bot bases on having fun \n      And eating bananas! :banana:\n\nCommands:\n:banana: b!image : shows u a random banana image (will be changed soon)\n:banana: b!ping : Pong! (will show ms soon)\n:banana: b!youtube : Subcribe to me (will be changed to setting your own youtube soon)\n\nThats it for now'
    .addField('Inline field title', 'Some value here', true)
    .setTimestamp()
    .setFooter('Justii :3')

channel.send(exampleEmbed);```
#

so this will work?

lusty quest
#

looks good

spare mirage
#

how do I add this iside my command

lusty quest
#

message.channel.send(exampleEmbed)

viral iris
#

how to add ' ?

lusty quest
#

?

viral iris
#

like Don't

lusty quest
#

add a \ infront

viral iris
#
`\`'`\`t
#

like this ?

lusty quest
#

\ not /

viral iris
#

this ?

spare mirage
#

where do I add this part const exampleEmbed = new Discord.MessageEmbed()
.setColor('#0099ff')
.setTitle('Help ๐ŸŒ')
.setAuthor('Banana')
.setDescription('\n Banana is a bot bases on having fun \n And eating bananas! ๐ŸŒ\n\nCommands:\n๐ŸŒ b!image : shows u a random banana image (will be changed soon)\n๐ŸŒ b!ping : Pong! (will show ms soon)\n๐ŸŒ b!youtube : Subcribe to me (will be changed to setting your own youtube soon)\n\nThats it for now'
.addField('Inline field title', 'Some value here', true)
.setTimestamp()
.setFooter('Justii :3')

lusty quest
#
`this is a exampe don\ยดt you see`
viral iris
#
`\`'`\`t
#

what about this ?

          return message.channel.send("You Don")
lusty quest
#

@spare mirage above the part where you handle your messages

earnest phoenix
#

box

spare mirage
#

like this?

lusty quest
#

yes but handle the errors before starting

viral iris
#

what about this ?

          return message.channel.send("You Don")

how to add Don't ?

#

with '

lusty quest
#
 return message.channel.send("You Don\`t")
spare mirage
#

bruh

#

Or im blind

regal raven
#

Don\'t

#

Like this?

lusty quest
#

yes

viral iris
#

yea

#

thanks

#

is it work ?

#
return message.channel.send("You Don\'t")
lusty quest
#

if i run it in my eval command it works

#

also if you copy/paste it here

spare mirage
#

bruh this is dum

lusty quest
#

message.channel.send("You Don't")

spare mirage
#

b

earnest phoenix
#

oh its this same shit

#

they go from installation and then give me an example of code

#

they never told me these three tthings that i might need to know

lusty quest
#

@spare mirage you probably got somewhere a missing ) or ,

earnest phoenix
#
  1. what is the file named
  2. where does the file go
  3. where do you go after installing
lusty quest
#

bcs most bot tutorials requrire you to know the coding language

spare mirage
#

@lusty quest I dont miss anything

lusty quest
#

you do otherwise there would not be the error

viral iris
#
client.on("message", async message => {
if(!message.guild) return;
  let prefix = db.get(`prefix_${message.guild.id}`)
  if(prefix === null) prefix = default_prefix;
  
  if(!message.content.startsWith(prefix)) return;
  
  //the codes
})
#

why it's not working ?

#

there's no error show in console

golden condor
#

There is no actual code

viral iris
#

so what to do ?

golden condor
#

Put in.. code...?

viral iris
#

i need to change every command to ```js
if (msg.startsWith(prefix + "prefix")) {

earnest phoenix
#

bcs most bot tutorials requrire you to know the coding language
@lusty quest but in this case, i dont

#

do i need to learn javascript, and then node.js, and then discord.js

lusty quest
#

node.js is javascript

earnest phoenix
#

oh

#

well its still learning how to learn a language

lusty quest
#

and discord.js is just a package for node.js

spare mirage
#

@lusty quest can u see a problem?

lusty quest
#

nope, its possible that the error is somewhere above

spare mirage
#

it says its on line 25 and 31

viral iris
lusty quest
#

@spare mirage what happens in line 25

#

@viral iris did you dont have a idea what your bot should do?

spare mirage
#

? u can read the line right?

earnest phoenix
#

@viral iris what theme do you use cuz im sorry but i dont like the way the messages look like that

lusty quest
#

did you opened somewhere earlyer a field with (?

earnest phoenix
#

i just like everything else about it

viral iris
#

@viral iris did you dont have a idea what your bot should do?
@lusty quest change the prefix but not changing only -prefixcommand

lusty quest
#

i dont get what you want to do

spare mirage
#

@lusty quest no

lusty quest
#

there has to

spare mirage
#

thats weird

lusty quest
#

otherwise there would not be this error

viral iris
lusty quest
#

can you show the code above the embed

#

@viral iris so your bot doesnt save the new prefix properly?

viral iris
#

i mean yes

spare mirage
#

yes will do

viral iris
#

@viral iris so your bot doesnt save the new prefix properly?
@lusty quest what should i do now ?

spare mirage
#

oops token

lusty quest
#

generate a new token @spare mirage

#

@viral iris debug your code and see why it fails

spare mirage
#

I did

viral iris
lusty quest
#

looks like an error from the package you get from your host

#

remove the ; in line 31 and see if it helps

#

@spare mirage

spare mirage
viral iris
#

@lusty quest can u come dm ?

spare mirage
#

not really

lusty quest
#

@viral iris i dont to DMs anymore

hoary elm
#

@lusty quest can u come dm ?
@viral iris is that a web server? And Did you forget the โ€œhttp://โ€œ part of the link or is it just not showing it.

lusty quest
#

@spare mirage looks like you have there some errors with your command handling.

#

i guess this makes the errors

#

keep the first command but set the execution in {} the next command then starts with else If and the execution again in {}. repeat this for every command

spare mirage
#

example to make it easier?

#

please

lusty quest
#
if(message.content == `${PREFIX}ping`){ message.chanel.send("Pong")
}else if(message.content == `${PREFIX}hi`){ message.chanel.send("HI")
}
#

as example

spare mirage
#

So it will be
if(message.content == ${PREFIX}ping){ message.chanel.send("Pong")
}else if(message.content == ${PREFIX}hi){ message.chanel.send("HI")
}else if(messgae.content ==
}else if

pale vessel
#

why?

lusty quest
#

yes

hoary elm
pale vessel
#

just remove them

lusty quest
#

but a switch case would be better i guess

pale vessel
#

true but you don't need to use brackets for that

lusty quest
#

ohh wait right

#

but else if should be still in there

spare mirage
#

wait what

lusty quest
#

keep your code

spare mirage
#

ok

pale vessel
#

else if is only needed if you need an invalid command message at the end

spare mirage
#

I ctrl z'ed it

pale vessel
#

otherwise, keeping them would be pointless unless it's somehow faster

#

other part of your code caused that error

lusty quest
#

then there is somewhere a mistake in the code

#

but the top looks alright

#

maybe somewhere in your Embed Constructor

pale vessel
#

it would be nice if you pasted the code in a site like hastebin

#

we can try to help

lusty quest
#

but remove the token this time

spare mirage
#

Ill just dont use 3 lines

pale vessel
#

you didn't close the long setDescription() of that embed

spare mirage
#

ooh thnx

pale vessel
#

remove the semicolon

#

the embed isn't done yet

spare mirage
#

}): look

#

this was wrong

#
    if (message.content.startsWith(PREFIX + "ping")) message.channel.send("Pong!");
    else if (message.content.startsWith(PREFIX + "youtube")) message.channel.send("Like and Subscribe \n https://ww");
    if (message.content.startsWith("@Banana#2028")) message.channel.send(`Hi! My prefix here is **${PREFIX}**`);
    if (message.content.startsWith(PREFIX + "image" )) image(message); 
    if (message.content.startsWith(PREFIX + "help")) channel.send(embedhelp);
}): // commands```
pale vessel
#

can you add it to a codeblock

lusty quest
#

last line should be a ; not :

spare mirage
#

fixed

pale vessel
#

lul

spare mirage
#

lmao

#

is this bad

lusty quest
#

did you changed something?

nova dragon
#

Hmm

spare mirage
#

no

#

I always have that

lusty quest
#

press compare

#

and then see if there where changes

#

if no overwrite

spare mirage
lusty quest
#

you need to have either every command with if or else if (if elseif only the first is only if)

spare mirage
lusty quest
#

keep the old

spare mirage
#

the green one?

lusty quest
#

red

spare mirage
#

ok

lusty quest
#

yes but at the end you need now a event that returns a invalid command message

#

-> else {message.channel.send("invalid Command")}

spare mirage
#

uhh

lusty quest
#

add it after your last command

#

its always at the end incase someone try to run a invalid command

#

ohh wait. it will return on every message

#

just make else return

pale vessel
#

just else if (content.startsWith(prefix)) send("invalid command");

#

at the end

#

i guess you're not planning to add the bot here

spare mirage
#

can I?

pale vessel
#

well it'll be muted

#

but if you want to do unknown command message, you can do that

spare mirage
#

really

#

isnt that weird

#

people can make a nuke bot and add it

#

@pale vessel

pale vessel
#

yes but with the actual send method lul

long yew
#

can someone help me?

pale vessel
#

you had channel.send and send, both won't work

long yew
#
server = client.guilds.keys().next().value;``` how do i make this v12?
pale vessel
#

guilds is a manager that holds the cache

spare mirage
#

what

long yew
#

so what would need changing?

spare mirage
#

@pale vessel

#

how do I make it work

pale vessel
#

@long yew i gave you a clue

#

@spare mirage change channel.send and send to something that you've been doing before

long yew
#

hmm

pale vessel
#

both of them are wrong

#

it's on majority of the commands

#

you can't miss it

spare mirage
#
channel.send(embedhelp); else if (content.startsWith(PREFIX)) message.
channel.send("invalid command");```
pale vessel
#

the first method of sending a message is correct

#

the other two are not

spare mirage
#

what

#

the other two

#

?!?!?

pale vessel
#

do you not see the difference on how you send messages?

#

sorry, the other one

spare mirage
#

I would do It like that

pale vessel
#

yes

long yew
#

server = client.guilds.cache.next().value;

#

?

pale vessel
long yew
#

so is it right?

pale vessel
#

only one way to find out mate

spare mirage
#

lmaoo

#

thanks for that

long yew
#

i

#

think next needs changing

pale vessel
#

it didn't work?

spare mirage
#

do I change it to message.content.startsWith?

pale vessel
#

yes

#

how else is it going to work if you don't define content or use message.content

spare mirage
#

||not||

earnest phoenix
#
/**/(["manchester",["Manchester","Manchester United F.C.","Manchester City F.C.","Manchester Airport","Manchester Arena bombing","Manchester, New Hampshire","Manchester by the Sea (film)","Manchester Piccadilly station","Manchester Metrolink","Manchester derby"],["","","","","","","","","",""],["https://en.wikipedia.org/wiki/Manchester","https://en.wikipedia.org/wiki/Manchester_United_F.C.","https://en.wikipedia.org/wiki/Manchester_City_F.C.","https://en.wikipedia.org/wiki/Manchester_Airport","https://en.wikipedia.org/wiki/Manchester_Arena_bombing","https://en.wikipedia.org/wiki/Manchester,_New_Hampshire","https://en.wikipedia.org/wiki/Manchester_by_the_Sea_(film)","https://en.wikipedia.org/wiki/Manchester_Piccadilly_station","https://en.wikipedia.org/wiki/Manchester_Metrolink","https://en.wikipedia.org/wiki/Manchester_derby"]])
#

How i can transfer this to json

spare mirage
#

not

#

@pale vessel

pale vessel
#

nani

spare mirage
#

it scans PING first

#

only ping works

pale vessel
#

show code

#

wait never mind

spare mirage
pale vessel
#

you have two invalid command

radiant estuary
#

how can i send custom emojis with discord.js?

pale vessel
#

the first one was in the middle of the code, and the second one is on the last

#

first one needs to be removed

#

how did it even manage to get up there lol

spare mirage
#

huh

pale vessel
#

ctrl f for "invalid command"

#

you'll see

spare mirage
#

what no

pale vessel
#

wtf there's more than two

#

remove those, what are you doing

spare mirage
#

all?

pale vessel
#

you only need one at the last part

spare mirage
#

yhuhuh

#

do I delete the else if

#

?

pale vessel
#

delete the whole else if until ;

spare mirage
#

?

pale vessel
#

yes

spare mirage
#

on all 4

#

?

pale vessel
#

yeah

#

keep the last one

#

why did you put those there by the way

spare mirage
#

idk

#

im kinda dumb

#

||or just new to coding and learning a DANG LOT now||

pale vessel
#

did you remove the else if in the picture

#

oh no

#

remove the else if too

spare mirage
#

where?

#

I have more else ifs

pale vessel
#

ye

spare mirage
#

ok

#

I removed them all

#

no more error

#

s

pale vessel
#

i would suggest learning javascript first bloblul

spare mirage
#

Im doing that by doing this xD

earnest phoenix
#

when i use console.log(response.body[0]) it return [

spare mirage
#

first of all

#

never do node . xD

#

use
node NAME.js

earnest phoenix
#

ok

#

what ever

long yew
#

@spare mirage he is using the terminal

#

in vsc

spare mirage
#

I see

#

Dont use that

earnest phoenix
#

so can u help me ?

long yew
#

i don't know that code

spare mirage
#

what are u trying to make

long yew
#

what is RepounceBody? @earnest phoenix

earnest phoenix
#

repounce.body = repunceBody

nocturne grove
#

Hey. If I want to send a dm to a user with my bot, is there a difference between using guild.members.cache.get() and client.users.cache.get() regarding whether the user is cached or not? Or do I have to use .fetch() for that?

pale vessel
#

doesn't matter

#

both has the send method iirc

nocturne grove
#

as long as I'm not using guild.owner it's fine? (It's about a dm to the owner)

pale vessel
#

you only need to fetch if the user isn't cached/is a partial

nocturne grove
#

yes but idk if it's fetched if the dm is sent

pale vessel
#

if guild.owner isn't cached then you need to fetch it

nocturne grove
#

erm cached*

pale vessel
#

guild.owner uses the cache

#

if it's unavailable, then so is in the cache

nocturne grove
#

so like await guild.owner.fetch()?

pale vessel
#

yeah

#

(no)

#

await guild.members.fetch(guild.ownerID)

nocturne grove
#

haha I just thought that

#

okay thanks

spare mirage
#

how does a man

#

add his bot?

#

to this sevrer

long yew
#
trainers[message.author.id].mons.forEach(function (mon) {``` is this out dated?
surreal sage
#
function removeElement(elementId) {
    // Removes an element from the document
    var element = document.getElementById(elementId);
    element.parentNode.removeChild(element);
}
function closePI() {
    let element = document.getElementById("popup-input")
    let div0 = document.getElementById("div0")
    let div1 = document.getElementById("div1")
    removeElement("div0")
    removeElement("div1")
    return element.value;
}
``` doesnt seem to work
pale vessel
#

no

winter basalt
#

@spare mirage get it approved

nocturne grove
#

how does a man
@spare mirage go to the top.gg website and login, then add your bot

long yew
#

@spare mirage go to the developers portal

winter basalt
#

3 pings, nice.

spare mirage
#

:/

long yew
#

he wants to add it to his server

winter basalt
#

all with descending answers

long yew
winter basalt
#

he said 'this server'

long yew
#

ohhhhhhhhhhhh

misty sigil
#

get outplayed

long yew
#

lol

surreal sage
#
function removeElement(elementId) {
    // Removes an element from the document
    var element = document.getElementById(elementId);
    element.parentNode.removeChild(element);
}
function closePI() {
    let element = document.getElementById("popup-input")
    let div0 = document.getElementById("div0")
    let div1 = document.getElementById("div1")
    removeElement("div0")
    removeElement("div1")
    return element.value;
}
``` doesnt seem to work

@surreal sage The property parentNode doesnt exist

pale vessel
#

well, it doesn't exist

surreal sage
#

what use then

#

@pale vessel

spare mirage
#

Can u put all ur embed messages in another document and use that document to list all youre embeds?

surreal sage
#

what

spare mirage
#
    .setColor('#0099ff')
    .setTitle('Help :banana:')
    .setAuthor('Banana')
    .setDescription('\n      Banana is a bot based on having fun \n      And eating bananas! :banana:\n\nCommands:\n:banana: b!image : shows u a random banana image (will be changed soon)\n:banana: b!ping : Pong! (will show ms soon)\n:banana: b!youtube : Subcribe to me (will be changed to setting your own youtube soon)\n\nThats it for now')
    .addField('ur dinner today', 'bananas', true)
    .setTimestamp()
    .setFooter('Justii :3')```
#

can I put this in another document

surreal sage
#

yes

spare mirage
#

and still use it from index.js?

surreal sage
#

no

spare mirage
#

really?

#

oof

surreal sage
#

well

#

all no

spare mirage
#

oof

#

unorganised index.js :/

surreal sage
#

@spare mirage You can put every command in external files, tho.

spare mirage
#

so I can put the commands in there

surreal sage
#

wdym

spare mirage
#

but not the embeds

surreal sage
#

commands

#

no embeds

#

wait nvm

#

its possible

#

and i oop ๐Ÿ‘€

#

i forgot how

spare mirage
#

ok...

#

how

hoary elm
#

@spare mirage ^^

spare mirage
#

thnx

long yew
tight plinth
#

Did you closed the if?

#

if (...) {} else if (...) {} else {}

long yew
#

oh yeah thanks

delicate shore
#
if (command === "slap") {
    if (!args[1])
      return msg.channel.send(
        "**Who You need to slap boi?**"
      );
    msg.reply("just Slapped butt of" +  msg.mentions.users.first());
  };```
#

Here

#

What happens is

#

There is no space between name of person and butt of

#

And second it tells name

#

Instead of pinging

placid iron
#

There is no space, as you said

#

Also to mention add .mention

#

I believe

pale vessel
#

object should be fine in discord.js

placid iron
#

But he wants the mention not the string of it

pale vessel
#

it converts it to mention iirc

delicate shore
#

There is no space, as you said
@placid iron how to add

#

split(' ')

placid iron
#

Literally add a space after butt of in the string

#

@pale vessel oh it's different to discord.py then ;-;

#
msg.reply("just Slapped butt of " + msg.mentions[0].mention);```
#

Would that be correct in js

delicate shore
#
if (command === "slap") {
    if (!args[1])
      return msg.channel.send(
        "**Who You need to slap boi?**"
      );
    msg.reply(`just slapped ${msg.mentions.users.first()}`);
  };```
#

See why does that happens ?

honest perch
#

What js it supposed to do

placid iron
#

@delicate shore try what I sent

spare mirage
#
if (command === "slap") {
    if (!args[1])
      return msg.channel.send(
        "**Who You need to slap boi?**"
      );
    msg.reply(`just slapped ${msg.mentions.users.first()}`);
  };```

@delicate shore this way of making commands is kinda bad...
if u type "hdfsoiafhuoewhoh slap" it will still reply

rustic ridge
#

@spare mirage how???

#

no

spare mirage
#

it did for me

#

using if (message.content.startsWith(PREFIX + "commandname")) COMMAND
works way better

placid iron
#

Eewww

delicate shore
#

@delicate shore this way of making commands is kinda bad...
if u type "hdfsoiafhuoewhoh slap" it will still reply
@spare mirage
No I have command holder

placid iron
#

Why not just use the bot syntax for it and events

delicate shore
#

s!

#

Is prefix

spare mirage
#

didnt know :/

rustic ridge
#

@spare mirage yeah it depends on how he's doing it

delicate shore
#

What should I do then ?

#

Because

rustic ridge
#

@placid iron d.js is different

spare mirage
#

nah keep this

placid iron
#

I assumed so

#

Python >

rustic ridge
#

@delicate shore try getting the users id and creating a mention

delicate shore
#

How ?

#

It does <@hdheoedhush>

rustic ridge
#

yeah but do that urself

delicate shore
#

:(

rustic ridge
#

so do .users.first().id

#

and then do

#

<@id>

#

or if u want you can use the regex expression to get the user mentions in order so u can pick out the first one

spare mirage
#

if u want the bot to reply to a mention in a server use

rustic ridge
#

wait actually

spare mirage
#

if (message.content.startsWith(@BOTID)) message.channel.send("message");

placid iron
#

@rustic ridge does js not have events

#

I forgot what they are actually called

delicate shore
#

so do .users.first().id
@rustic ridge what

rustic ridge
#

@placid iron discord.js has on message events

placid iron
#

F

delicate shore
#

do i have to take it has a const

#

or variabl

rustic ridge
#

@delicate shore wait theres a better way give me a ec

delicate shore
#

ok

rustic ridge
#

@delicate shore .users.first().toString()

delicate shore
#

then???

rustic ridge
#

just that

#

add the toString function to the end

delicate shore
#

what

tight plinth
#

@delicate shore if your bot can't mentions users with <@id> you probably have enabled disableMentions: "all" in your client settings

delicate shore
#

me not gettig it

rustic ridge
#

@placid iron but discord.js has this thing called commando which handles commands in events

delicate shore
#

@delicate shore if your bot can't mentions users with <@id> you probably have enabled disableMentions: "all" in your client settings
@tight plinth indeed i have

tight plinth
#

Set disableMentions to everyone

#

And it will be fixed

delicate shore
#

why

tight plinth
#

Because that's how it works

delicate shore
#

it's a music bot

#

it needs it

tight plinth
#

Erm no

delicate shore
#

see

#

like if a song id

#

or youutbe link

#

contains <@9u9583548?then?

tight plinth
#

What the fuck

#

They can't lol

#

YouTube links / ever I'd on earth can only contain numbers & letters

#

There is a 1 chance out of a billion that a id can mention someone

earnest phoenix
#

How can i show all flags of a user? (V12)

rustic ridge
#

ids dont mention someone anyway

#

you need the @

tight plinth
#

<user>.flags

earnest phoenix
#

I want with name

quartz kindle
#

you can set per-message mention options

delicate shore
tight plinth
#

U can't

earnest phoenix
#

Sad

tight plinth
#

Yes

quartz kindle
#

the disableMentions option is for sending messages, not for receiving

#

are you sending messages that contain possible mentions?

rustic ridge
#

@quartz kindle yeah he be tryna ping someone

quartz kindle
#

you can set per-message disableMentions if you want

#

for example .send("bla",{disableMentions:"none"})

#

the message option should override the global option set in the client, so you can use any combination you want

#

you can make mentions enabled for specific commands only

#

there is also the allowedMentions option for further control, for example to mention only a specific user but disable mentions for other users

spare mirage
#

can I make commands for a bot

#

that only work for me

#

?

#

not only admin

#

but only ME

#

as in @spare mirage

misty sigil
#

Use owner ID

spare mirage
#

how?

#
else if (message.content.startsWith("hmm"))```
misty sigil
#

if(message.author.id != โ€œyour discord id)return

#

idk Iโ€™m on mobile

#

Smthng like that

golden condor
#

if(<user>.id != "Your id") return;

spare mirage
#

ok

#

and how do I add the command

#

if(<user>.id != "Your id") return;

misty sigil
#

Just put it inside the command block

#

and user would be <message>.author

spare mirage
#

message.channel.startsWith("banana") message.channel.send(" ๐ŸŒ ")

misty sigil
#

<message> refers to the message define

spare mirage
#

uhh

long yew
golden condor
#

.nex

long yew
golden condor
#

Wha ???

#

What is .next()?

misty sigil
#

next? What

long yew
#

do i remove next?

lusty quest
#

what did you want to archive?

spare mirage
misty sigil
#

user isnโ€™t literally that

lusty quest
#

bcs copy/paste doesnt work

long yew
#

@spare mirage are you new to js?

misty sigil
#

Itโ€™s the user object

spare mirage
#

yes

long yew
#

oh that explains it

misty sigil
#

message.author, not <user>, read the docs.

long yew
#

all that code needs fixing and cleaning

spare mirage
#

I fixed it

lusty quest
#

dont create a new event listener for every command you make. maybe try to find a tutorial for creating a message handler

spare mirage
#

but now it works for everyone

misty sigil
#

THat else if and then a new listener

#

cringe

spare mirage
#

dont create a new event listener for every command you make. maybe try to find a tutorial for creating a message handler
I dont

lusty quest
#

you have already 2 for the same event

misty sigil
#

too much can cause a memory leak

long yew
#

is it outdated?

spare mirage
#

but then how do I make it me only?

lusty quest
#

learn how to debug your code. we are not here to do it for you

misty sigil
#

justii, you just put another if statement

long yew
#

can anyone help me?

earnest phoenix
#

?

tight plinth
#

@long yew i already asked you yesterday what is spawns and you didn't replied. So I'll ask again: what is spawns

long yew
#

it is a variable

valid flicker
#

@earnest phoenix yaraaaaaaaaaaaaa

#

naptฤฑn lan dayฤฑ

earnest phoenix
long yew
#
var spawns = require("./spawns.json");
tight plinth
#

Console.log it and show what it returns

earnest phoenix
valid flicker
#

@earnest phoenix ingilizcem yok aqi

earnest phoenix
tight plinth
#

Turkish in development aaaaa

long yew
#

@tight plinth how?

tight plinth
#

You don't know how to console.log something?

long yew
#

console.log(spawns)

#

?

tight plinth
#

Yes

long yew
#

ok

spare mirage
tight plinth
#

@spare mirage no

spare mirage
#

how will it?

tight plinth
#

Please guys

#

Read the docs

#

And learn how js works

#

Please

long yew
#

that is it logged

tight plinth
#

You can't start developing discord bots with discord.js if you don't know how to use Javascript

long yew
#

when pokemon spawn

#

they log there

tight plinth
#

Well it's empty

#

That's why it don't work lol

long yew
#

but

#

when pokemon spawn

#

they fill there

tight plinth
#

You can't do object.includes

#

And don't use json as databases please

long yew
#

i will change later

tight plinth
#

No

#

Change now

long yew
#

after i get the code done

#

i will later

placid iron
#

No, change now

long yew
#

i will later

earnest phoenix
#

No,now.

long yew
#

what do i need

#

to change though

spare mirage
#

How do i make this command author only


if (message.content.startsWith("hi!")) message.channel.send("Hi");
misty sigil
#

How do i make this command author only

if (message.content.startsWith("hi!") && message.author.id = โ€œIDhereโ€)message.channel.send("Hi");
#

there

spare mirage
#

thanks! I lowkey didnt know && was a thing

earnest phoenix
#

yep i'm here

misty sigil
#

What on Earth is a bitfield error

#

itโ€™s on my prefix command

#

btw

pure lion
#

ok

#

i gotta eat then ill look at badges

spare mirage
earnest phoenix
#

put ) after "banana"

#

learn js please

spare mirage
#

nah that just gives more

#

lmao

earnest phoenix
#

just learn js.

spare mirage
#

||best way to learn is by asking||

still merlin
#

Nah

#

go learn js please

earnest phoenix
#

you will learn nothing by asking others. They'll just give you the answer, and they won't explain why and how

surreal sage
#
function popupInput(title, placeholder) {
    let divOverylay = document.createElement("div")
    let div = document.createElement("div")
    divOverylay.style.cssText = "position: absolute; top: 0%; left: 0%; background: rgba(0,0,0,0.6); z-index: 4; width: 100%; height: 100%;"
    div.style.cssText = 'position: absolute; margin: auto; left: 0; top: 0; right: 0; bottom: 0; background-color: #303030; z-index: 5; width: 45%; height: 25%; border-radius: 25px; text-align: center;'
    div.innerHTML = `<br><span style="padding-top: 100px;font-size:30px;color: white;font-family: 'Source Code Pro'">${title}</span><br><br><input id="popup-input" class="creatPr-input" placeholder="${placeholder}"><br><br><button onclick="closePI()" class="submit-proj">Next</button>`
    document.body.appendChild(divOverylay);  
    document.body.appendChild(div);  
    
    
    
}
function closeIt() {
    let element = document.getElementById("popup-input")
    divOverylay.style.display = 'none'
    div.style.display = 'none'
    div.innerHTML = ''
    return element.value;
}

```i have this script but the button when pressed wont change these elements
#

i tried some stuff but all not found

earnest phoenix
#

is the button have closeit function on clicked ?

surreal sage
#

Whats that lol

#

wait

#

yes it did

#

i removed it atm

#

i test with dev console atm

earnest phoenix
#

Channel for chatting about (bot) development.

#

it's html (and js) ?

surreal sage
#

yes

#

this isnt only for bot development

earnest phoenix
#

but look topic

surreal sage
#

are you kidding me

#

do you know where these () stands for

misty sigil
#

It was just me being dumb

winter basalt
#

simon, this is open for all kinds of development help

misty sigil
#

I forgot my !

pure lion
#

@earnest phoenix can you help me with profile badges?

earnest phoenix
#

yep

pure lion
#

:D

#

i believe i just need images of all of the badges and then draw them in?

#

or is there something else

earnest phoenix
#

yep

pure lion
#

ok

#

pray tell?

earnest phoenix
#

Can anyone help me with web scraping ? Dm please

misty sigil
#

Whatโ€™s a range error

quartz kindle
#

an error that suggests a given value is out of range

#

ie a number that is too big or too small

shy turret
#

I'm trying to translate my Discord bot to eris.js (because it's faster) but I just want to be lazy and work quickly I tried this:
console.log({ embed: embed})

But it shows something like

{
  embed: MessageEmbed {
    (stuff here)
  }
}
#

I want embed: MessageEmbed { to be embed: { instead

#

how is this possible'

quartz kindle
#

eris doesnt have embed builders

#

unless you're using some extra package

#

how did you build that embed?

shy turret
#

discord.js

#

console.log({ embed: JSON.parse(JSON.stringify(embed)) })
ok this works..

quartz kindle
#

but... why

#

you're trying to use discord.js and eris at the same time?

#

like using discord.js's embed builder on eris?

shy turret
#

yep

quartz kindle
#

in that case you can do embed.toJSON()

shy turret
#

... ok

#

im surprised this actually works

#

but .toJSON() is a bit slower than.. JSON.parse(JSON.stringify()) but i dont really care

#

(I do really care)

quartz kindle
#

a bit slower? really lmao

#

how did you measure it?

spare mirage
#
function image(message){
    var options = {
        url: "http://results.dogpile.com/serp?qc=images&q=" + "bananas",
        method: "GET",
        headers: {
            "Accept": "text/html",
            "User-Agent": "Chrome"
        }
    };

^ this belong to my search function is there any way I can change what I search "bananas" with a command: !image WhatUwantToSearch
example:
if I do "!image Cheese"
"bananas"
will become "Cheese"
and run image(message)

wooden ember
#

is there a way to make a bot reply the same message to several different words rather than doing this:

    msg.channel.send('deus vault');
    }

    if (msg.content === 'lord') {
    msg.channel.send('deus vault');
    }
    
    if (msg.content === 'God') {
    msg.channel.send('deus vault');
    }

    if (msg.content === 'Lord') {
    msg.channel.send('deus vault');
    }

    if (msg.content === 'Jesus christ') {
    msg.channel.send('deus vault');
    }
    
    if (msg.content === 'Jesus') {
    msg.channel.send('deus vault');
    }
    ```
spare mirage
#

lemme try smtng

#
if (msg.content === 'Lord', 'god') msg.channel.send('deus vault');
    ```
#

@earnest phoenix is this posible too?

digital ibex
#

no

warm marsh
#

no like that

#

You'd require to use an array

spare mirage
#

would make sense though

warm marsh
#

['a', 'b'].includes(msg.content)

digital ibex
#

u can just use js' or

warm marsh
#

Makes that if very long winded

#

if (msg.content == 'a' || msg.content == 'b') {

digital ibex
#

well yeh, but i do that when theres loads so it goes down and looks nice

slender thistle
#

Preferences

wooden ember
#

oh ok

#

thx guys

earnest phoenix
#

How do i store variables in files so i can access them later even if my bot goes down
I use discord.js

#

Dm me

#

Imma go sleeep

placid iron
#

Look up a tutorial on JSON I guess

earnest phoenix
#

i domt know json

placid iron
#

Yeah, look up a tutorial on it

#

But basically it does exactly what you want

earnest phoenix
#

can you link me a tutorial

placid iron
#

Sorry I've never looked at one

#

I'm sure a quick Google would surfice

earnest phoenix
#

ok

#

but is there any database thingy i can use on glitch.com

#

How can I pass a variable from a forEach function outside of the function?

pale vessel
#

add to array?

#

it's vague

#

what are you trying to do?

peak venture
#

anyone here can tell me why my sleepdelay isnt working?
https://hasteb.in/koyuyeta.js

The thing is that the limit for requests exceeds. I thought of putting the delay inbetween asking pages.

earnest phoenix
#

I know I can pass it to an array or a DB, but won't it repeat itself? (because of the forEach function)

pale vessel
earnest phoenix
#

Did you get the question?

pale vessel
#

no

#

sorry

earnest phoenix
#

I have 4 users on the server and I use forEach for example, won't pushing it into an array happen 4 times?

placid iron
#

Just don't use for each?

earnest phoenix
#

But I have to?

placid iron
#

Hmmmm

#

Use the for each to get what you want

#

Then push after the for each

#

?

earnest phoenix
#

But the variable is in the forEach

digital ibex
#

what r u trying to do, theres most likely an easier way to do it

placid iron
#

^

#

Give a code example pleaee

earnest phoenix
#

Get a variable outside of the forEach function

#
message.guild.members.cache.forEach(member => {
      let variableIneed = something inside the foreach function
      })
then i want it here
mystic ice
#

anyone have a muted role create code?

earnest phoenix
#

We don't just spoonfeed code

mystic ice
#

didnt ask for it

#

just asked if anyone has it

#

so i can ask how to deny perms

earnest phoenix
#

Then ask it

winter basalt
cinder patio
#

Itay, that variable gets created for every member, you cannot do that

#

Depending on what you want, you could use map

earnest phoenix
#

At least I tried

#

Using map will help how exactly?

cinder patio
#

What are you trying to do?

earnest phoenix
#

Get that variable outside the function too

pale vessel
#

what are you doing on the outside specifically?

earnest phoenix
#

Something that is supposed to happen once and not a few times

misty sigil
#

is there any way I can not cache users

cinder patio
#

Then why are you using a loop?

misty sigil
#

discord.js btw

earnest phoenix
#

Let me explain:
First time I check for some stuff on each user, and then I want the result of it outside the function for a one time use

cinder patio
#

Then map would be ideal

earnest phoenix
#

hey guys i seem to keep getting this error after trying loads of things and just wondered if anyone knew why its making this error thanks in advance

Error [SyntaxError]: missing ) after argument list

https://hastebin.com/asijejazub.cs

#

Can map get the function result?

cinder patio
#

yes

#
users.map(user => user.someFn());

That returns an array with the result for each user

earnest phoenix
#

Oh

#

Ill try

cinder patio
#

Though, why not do that one time thing inside the forEach loop? When you use map, you'll still have to loop through the results

wooden ember
#

ok hi its me again i tryed this but now it replys to every message sent: ``` if (msg.content === 'Lord', 'god'){
msg.channel.send('deus vault');
}

earnest phoenix
#

Because then it will do it a few times and I really don't need it to repeat

#

Can i store variables in a database file on glitch? (and i dont even know how databases work)

cinder patio
#

firenado that's not how it works

wooden ember
#

idk

earnest phoenix
wooden ember
#

I started js yesterday

cinder patio
#

use the OR operator

#

msg.content === "Lord" || nsg.content === "god"

wooden ember
#

|| meaning or?

earnest phoenix
#

Yes

wooden ember
#

oh ok

earnest phoenix
#

|| means or
&& means and

spare mirage
#

oh didnt know

wooden ember
#

nice thx again

tight plinth
#

This is basic js lol

#

Learn js before learning discord.js

wooden ember
#

as I said I started with js yesterday

misty sigil
#

uhh, lumap, I didnโ€™t do that

wooden ember
#

lol

tight plinth
#

Two works: f*ck u

misty sigil
#

works

earnest phoenix
#

Can i store variables in a database file on glitch? (and i dont even know how databases work)
can someone help (not spoonfeed)

tight plinth
#

Learn how database works

#

Please guys

cinder patio
#

Well "variables" not exactly, but data

tight plinth
#

Variables contains data

earnest phoenix
#

seems like alot of people trying to make bot for getting the badge ._.

tight plinth
#

Lol it is

earnest phoenix
#

and in hurry, they are neglecting BASICS

#

._.

tight plinth
#

If you're here only to get the badge, then get the fuck out of here except if you already know how to program

earnest phoenix
#

exactly xd

tight plinth
#

This message should be sent to everyone talking here for a simple problem like "how to put bot online" or things like that

viral iris
#

I got custom prefix code but where can I put my bot command?

#
const db = require('quick.db')

client.on('message', async message => {
  if (message.author.bot) return; // Ignore if the user is a bot.
  
  let pref = db.get(`prefix.${message.guild.id}`);
  let prefix;
  
  if (!pref) {
    prefix = ";"; // If the server doesn't have any custom prefix, return default.
  } else {
    prefix = pref;
  }
  
  if (!message.content.startsWith(prefix)) return; // use this. so your bot will be only executed with prefix.
  
  let args = message.content.slice(prefix.length).trim().split(/ +/g);
  let msg = message.content.toLowerCase();
  let cmd = args.shift().toLowerCase();
  
  message.flags = [];
  while (args[0] && args[0][0] === "-") {
    message.flags.push(args.shift().slice(1)); // Message Flags: -default, -ban, -parameter
  }
  
  if (msg.startsWith(prefix + "prefix")) {
    if (!message.member.hasPermission("MANAGE_GUILD")) return message.channel.send("You don't have any permissions to do this!");
    let data = db.get(`prefix.${message.guild.id}`);
    if (message.flags[0] === "default") {
      await db.delete(`prefix.${message.guild.id}`);
      return message.channel.send("The server prefix has been changed into default.");
    }
    
    let symbol = args.join(" ");
    if (!symbol) return message.channel.send("Please input the prefix.");
    
    db.set(`prefix.${message.guild.id}`, symbol);
    return message.channel.send(`The server prefix has been changed to **${symbol}**`);
  }
 });
earnest phoenix
#

To get the badge you must :-
1). Learn basics of JS
2). Get pretty more well with JS
3). Read documentation of discord.js
4). Try watching tutorials of discord.js
5). Finally you can now make ur own bot without any problem i suppose...

misty sigil
#

I should implement top.gg api and widgets

#

brb

tight plinth
#

@earnest phoenix you're not forced to use js lol

earnest phoenix
#

ik but many ppl use it xd

tight plinth
#

@viral iris learn fucking js

earnest phoenix
#

it is kinda easy tbh xd

#

most of the people i saw here use only js... GWossuKannaSip

tight plinth
#

True

pale vessel
#

not just js and discord.js for the badge smh

tight plinth
#

Some people use py too

lusty quest
#

the largest part use JS or py. a few Go but i havent seen one using c or rust in a while

pale vessel
#

some use cpp like brain

#

brain's a genius

tight plinth
#

But people using other programming languages knows how to program and read docs, they don't need to ask here tips on "how to do x"

lusty quest
#

learn js. other languages like C work similar

#

makes it easyer to get started there

pure lion
#

poobis

earnest phoenix
#

true Lumap

burnt elm
#

Does anyone know how to avoid the ratelimits of Youtube ? Because due to that my bot can't play music anymore when i got ratelimited ๐Ÿ˜ฆ

pale vessel
#

proxies

earnest phoenix
#

How do i make a variable named yolo, assign it the value ["yolo1","yolo2"] and save it to a file through quick.db?

#

Basically create an array and save it to quick.db so i can access it later

digital ibex
#

the way u would store anything in a db? i've never used quick.db but i believe its something like db.set

earnest phoenix
#

so can i put db.set(variablename)

digital ibex
#

db.set(whatever, ['hi', 'bye']

#

no

earnest phoenix
#

so

#

nvm

digital ibex
#

whatever is usually what people put as the guild id

#

i think

slender thistle
#

A variable stores data in RAM. You want to store the data, not the variable.
Judging from the examples,

// Pushing an element to an array (that doesn't exist yet) in an object:
db.push('userInfo.items', 'Sword')
digital ibex
#

he's trying to store it in the db tho

#

not the ram

slender thistle
#

And does .push store it in RAM

pale vessel
#

no

earnest phoenix
#

No?

pale vessel
#

no, it doesn't store it in RAM

earnest phoenix
#

whats the problemmmm!

misty sigil
#

the back of ur documents are not seen

earnest phoenix
#

lel

#

man i retake it 251255 time

delicate shore
#

Can anyone tell me

#

That

#

That is code to see member couny ?

#

Count

misty sigil
#

have you checked the docs

#

and what library

delicate shore
#

like
if(command === "MemberCount") {

}

#

What comes in between that

#

have you checked the docs
@misty sigil nope

misty sigil
#

check it

#

for your library

delicate shore
#

Pls send me link

misty sigil
#
delicate shore
#

Who is this ^

misty sigil
#

oliy, the owner

earnest phoenix
#

Thanks for telling me about this cool quickdb thingy, now i can get economy system off my NTBF list (Never To Be Finished list)

misty sigil
#

like
if(command === "MemberCount") {

}
@delicate shore i think its
<message>.guild.memberCount

earnest phoenix
#

maybe

delicate shore
#

Oh ok

earnest phoenix
#

why incase message in <>

misty sigil
#

<message> is the message object

#

so it could be msg

#

or message

#

or mssg

#

or whatever it's defined as

pale vessel
#

i define it as m

misty sigil
#

ooh, thats new

restive furnace
pale vessel
#

short and easy to use

restive furnace
#

i wonder should i rewrite my old bot, or start fresh bot?

wooden ember
#

start a fresh bot but copy the code you want over from it

#

from the old one

restive furnace
#

okay then i guess

radiant estuary
#

hello,
i have a express server (node.js) on my raspberry pi 3. how can i make it public and not only localhost?

solemn latch
#

Port forward the port

radiant estuary
#

i did it

solemn latch
#

At that point it should be public then.
If you need a domain, get a domain

radiant estuary
#

ok thx

earnest phoenix
#

how do i check if "userBalance" array (or whatever you call it) in quickdb contains a key with the ID of the user? and how do i set keys with the name as the member's ID anyways? first step towards dank memer ripoff ๐Ÿคฃ

#

hello

#

any one there?

surreal sage
#
function popupInput(title, placeholder) {
    let divOverylay = document.createElement("div")
    let div = document.createElement("div")
    divOverylay.style.cssText = "position: absolute; top: 0%; left: 0%; background: rgba(0,0,0,0.6); z-index: 4; width: 100%; height: 100%;"
    div.style.cssText = 'position: absolute; margin: auto; left: 0; top: 0; right: 0; bottom: 0; background-color: #303030; z-index: 5; width: 45%; height: 25%; border-radius: 25px; text-align: center;'
    div.innerHTML = `<br><span style="padding-top: 100px;font-size:30px;color: white;font-family: 'Source Code Pro'">${title}</span><br><br><input id="popup-input" class="creatPr-input" placeholder="${placeholder}"><br><br><button onclick="closePI()" class="submit-proj">Next</button>`
    document.body.appendChild(divOverylay);  
    document.body.appendChild(div);  
    
    
    
}
function closeIt() {
    let element = document.getElementById("popup-input")
    divOverylay.style.display = 'none'
    div.style.display = 'none'
    div.innerHTML = ''
    return element.value;
}

``` I cant set the id's from div and divOverlay, so i have to use javascript to call them, but when the button is clicked, how do i include it in the event?
prime cliff
#

Maybe learn how do use a database first instead of trying to go straight for a dank memer ripoff lol

torn ravine
#

Use a db properly

surreal sage
#

@earnest phoenix

earnest phoenix
#

Maybe learn how do use a database first instead of trying to go straight for a dank memer ripoff lol
@prime cliff thats literally what i asked help with a database

#

quick.db

quartz kindle
#

@surreal sage newly created elements do not have any events attached to them

surreal sage
#

onclick event in the innerHTML

quartz kindle
#

the closePI() function doesnt work?

earnest phoenix
#

can someone help me with my problemo

surreal sage
#

wait

earnest phoenix
#

scroll up

quartz kindle
#

also, you cant access the div and divOverlay variables across functions like that

#

you need to find and declare them again

earnest phoenix
#

yeah tell me too

slender thistle
earnest phoenix
#

i use RichEmbed() not MessageEmbed()

#

and discord.guide doesn't have a guide on rich ones

quartz kindle
#

@earnest phoenix RichEmbed is the same as MessageEmbed

radiant estuary
#

@solemn latch doesn't work :/

quartz kindle
#

the only difference is that RichEmbed is in discord.js v11, which is the old version

earnest phoenix
#

oh

#

i dont care

quartz kindle
#

MessageEmbed is in the new version, v12

#

otherwise, they are exactly the same

earnest phoenix
#

why does quick.db not keep stuff when i restart my bot

quartz kindle
#

it should

#

where is your bot hosted?

earnest phoenix
#

i typed refresh in the terminal

#

@quartz kindle p i n g

surreal sage
#

@quartz kindle ```js
function closePI() {
let element = document.getElementById("popup-input");document.getElementById("div0").style.display = 'none';document.getElementById("div1").style.display = 'none';document.getElementById("div1").innerHTML = '';return element.value;
}

function popupInput(title, placeholder) {
let divOverylay = document.createElement("div")
let div = document.createElement("div")
divOverylay.style.cssText = "position: absolute; top: 0%; left: 0%; background: rgba(0,0,0,0.6); z-index: 4; width: 100%; height: 100%;"
div.style.cssText = 'position: absolute; margin: auto; left: 0; top: 0; right: 0; bottom: 0; background-color: #303030; z-index: 5; width: 45%; height: 25%; border-radius: 25px; text-align: center;'
div.innerHTML = <br><span style="padding-top: 100px;font-size:30px;color: white;font-family: 'Source Code Pro'">${title}</span><br><br><input id="popup-input" class="creatPr-input" placeholder="${placeholder}"><br><br><button onclick="closePI()" class="submit-proj">Next</button>
document.body.appendChild(divOverylay);
document.body.appendChild(div);
div.id = "div1"
divOverylay.id = 'div0'
}

#

i ran it in the console and it worked

#

returned at hid it

earnest phoenix
#

you looking at my source code nasty lol

surreal sage
#

who

quartz kindle
#

@surreal sage try this then: div.querySelector("#popup-input").addEventListener("click",closePI)

earnest phoenix
#

tim

surreal sage
#

thanks il try in a mind

quartz kindle
#

@earnest phoenix all i can see is that you're using some very outdated stuff

regal raven
#

What should my bot have in a bot info command? I don't need codes rn

earnest phoenix
#

@earnest phoenix all i can see is that you're using some very outdated stuff
@quartz kindle i dont care