#development

1 messages · Page 1028 of 1

sudden geyser
#

what library

hidden lynx
#

discord js

blazing ravine
#

bot.users.cache.size not show correct number

hazy girder
#

rly

sudden geyser
#

<Client>.user for the client user, then use the .avatarURL method. Make sure you're logged in before trying to use it.

hazy girder
#

@blazing ravine orası sadce insanlari gösterir

#

botları göstermez

opal plank
#

while i have solutions, they'd be like this

  1. Get index after filter ->> and use #- method to delete it(would be optimal)
  2. Return the whole array with one call, parse in code, do another call with new array
  3. Destroy array, loop filter, remove/edit unwanted obj, reassemble array, save it
    @quartz kindle
blazing ravine
#

@hazy girder hepsini gostermesi icin ne yapmamiz gerekiyor

opal plank
#

those are the only 3 things i can figure out, the first would be ideal, but without index position im stuck, thought there might eb a hacky way around it

hazy girder
#

onu hatırlamıyorm

hidden lynx
#

omg thats a function xD. Thanks bro

hazy girder
#

@blazing ravine
client.guilds.reduce((a, b) => a + b.memberCount, 0).toLocaleString()

opal plank
#

pastebin

digital ibex
#

mb

hazy girder
#

bu 12de çalşr mi idk

digital ibex
#

ik

blazing ravine
#

thanks

digital ibex
restive willow
#

is this a bot ?

digital ibex
#

no

quartz kindle
#

@opal plank so you want to delete an item, but you dont have its index?

#

you want to delete it by item content?

pale vessel
#

@digital ibex something could be overriding it

opal plank
#

basically, yeah

digital ibex
#

oh

pale vessel
#

use inspect element

digital ibex
#

thats all the html code for that page

#

kk

opal plank
#

doing it with relation tables might be easier, but i kinda wanna learn how to mess with jsonb tables too

digital ibex
earnest phoenix
#
const question3 = () => {
    return new Promise((resolve, reject) => {
        rl.question("What will your bot be doing?", async function (activity) {
            bottxt = bottxt + '\nclient.on("ready", function(){\nclient.user.setActivity("' + activity + '");\n});\nclient.on("message", async message => {\nvar command = message.content.toLowerCase().slice(settings.prefix.length).split(' ')[0];\nvar args = message.content.split(' ').slice(1);\nif (!message.content.startsWith(settings.prefix) || message.author.bot) return;\n'
            resolve()
        })
    })
}
```for some reason i get the error: SyntaxError: Unexpected string at line 31 witch is the part with the rly long string
hazy girder
#

My bot is hosting on Heroku. But my bot is doing the transactions 2 times. It shows Uptimes differently in the Stats command. Why is it How can I solve it

opal plank
#

dont use heroku

#

¯_(ツ)_/¯

earnest phoenix
#

use glitch :Dab:

opal plank
#

neither

earnest phoenix
#

ik

hazy girder
#

rly

opal plank
#

nor heroku nor glitch are bot hosting websites

earnest phoenix
#

glitch is only good for webpages

blazing ravine
#

@hazy girder

opal plank
#

they agressively go against bots being hosted

digital ibex
#

hm, @pale vessel any ideas?

blazing ravine
opal plank
#

reduce()

#

its a method

hazy girder
#

idk

pale vessel
#

can't really help unless i have access to the live site, sorry

digital ibex
#

oh rip

pale vessel
#

you might need to add .cache

earnest phoenix
#

oh well

marble geode
#

i want ask DBL user is 100k+ why in my bot status only 20k?

earnest phoenix
opal plank
pale vessel
#

@marble geode your bot does not cache all users

earnest phoenix
#

tf

#

im making a bot genrator rn

marble geode
#

@pale vessel how to do it i use client.users.cache.size

pale vessel
#

@earnest phoenix canvas + gifencoder, alternatively, if you're lazy, use canvacord

#

why would you cache all users?

#

well, you can enable that option in client options

opal plank
#

status for what?

pale vessel
#

but it might eat up your memory

split hazel
#

If you just want to cache all users for a status, you'd be better off adding all guilds member count together

earnest phoenix
opal plank
#

^^

#

you defining args in the midle of txt

pale vessel
#

duplicates is one thing but it's way better than caching 100k users

marble geode
#

ty for info :)

earnest phoenix
#

you definding args in the midle of txt
@opal plank im making a bot generator and im puting in script for a js file

pale vessel
#

go on...

earnest phoenix
#

:?

#

bottxt isnt a txt file there it gets added to one later

opal plank
#

use ``im pretty sure the next ' breaks the string

earnest phoenix
#

ok

opal plank
#

pretty sure those 2 are the culprit

earnest phoenix
#

yeah thnx it worked

opal plank
#

👍

earnest phoenix
#

well it can make very basic bots now

quartz kindle
#

@opal plank i gave it a little research and it seems you're right, there is no easy way to delete array items by value

opal plank
#

thats why i needed a hacky code lol

blazing ravine
#

@hazy girder

#

thanks

opal plank
#

i'll probably return the whole array instead and parse it in the code

marble geode
#

@opal plank ty for info :) but i only 12 years kid 😄

hazy girder
#

np

blazing ravine
opal plank
#

minor in discord

marble geode
#

@blazing ravine how to do that?

opal plank
#

also, you need to be 18+ to use api @marble geode

digital ibex
#

wut

opal plank
#

13+ to use discord, 18+ to use API

digital ibex
#

no you dont need to be

#

no

opal plank
#

you do

slender thistle
#

????????

#

??????????????

opal plank
#

legally bind

digital ibex
#

where u getting this info

opal plank
#

accepting terms of service

#

from their updated tos

digital ibex
#

im under 18, ik so many bot devs under 18 "breaking tos" then

marble geode
#

my friend is 9 years but he bot is very good

earnest phoenix
#

wtf

marble geode
#

ya

slender thistle
#

The developer ToS?

marble geode
#

he corder to

earnest phoenix
#

im guessing you're too

marble geode
#

he know c++, html, js, java, pyton, css

earnest phoenix
digital ibex
#

if ur 12, doubt

#

lmao

pure lion
#

heya im trying to make my ss command not be retarded but

      if (!msg.author.id === '528229753258246145' && !msg.channel.nsfw) {
        return msg.channel.send('Warning: you must be in an `nsfw` channel to run this command')
      } 

not woerkinegrwger

#

ill brb feel free to shit on my code or whatever

marble geode
#

i am lie abt my age lol

earnest phoenix
#

umm

slender thistle
sudden geyser
#

!msg.author.id === "someid" would become false === "someid"

#

You're probably looking for msg.author.id !== "someid"

opal plank
#

im getting source @slender thistle

#

one sec

pure lion
#

a

earnest phoenix
#

yay the bot generator works

hazy girder
#

My bot is hosting on Heroku. But my bot is doing the transactions 2 times. It shows Uptimes differently in the Stats command. Why is it How can I solve it

sudden geyser
#

speaking of Discord, in their redesigned homepage, they show their UI with a dark blue but we're still using plain old boring grey 😔

hazy girder
#

don say "dont use heroku"

digital ibex
#

how're u getting the uptime?

marble geode
#

i use panel lol

earnest phoenix
#

btw is there a way i can run cd in a batch file to cd to the batch files location

#

how're u getting the uptime?
@digital ibex <Client>.uptime

digital ibex
#

?

earnest phoenix
#

you asked

digital ibex
#

im asking the guy a question, he's saying the uptime is different lmao

earnest phoenix
#

oh mb

#

bruh I should read more

digital ibex
#

i've used it a bit

earnest phoenix
#

what do you need help with?

#

bulk delete

opal plank
digital ibex
#

wanna make a purge command or log it when the event fires?

#

u dont need to be 18+ for verification either

slender thistle
#

of messages? @earnest phoenix

earnest phoenix
#

yes

slender thistle
#

channel.prune time

#

@opal plank Not related to Discord

#

Went through Discord ToS, developer ToS, and privacy policy

#

doesn't say that anywhere

opal plank
#

i'll double check where thats from, but it was being said in DAPI for quite some time under new changes in policy

earnest phoenix
#

do u know how to make a kick ban mute for your bot

digital ibex
#

what language?

earnest phoenix
#

java script

digital ibex
#

Member.ban, Member.kick

#

and mute u do urself

earnest phoenix
#

@earnest phoenix i was trying that too it kind of didnt work out

#

and mute u do urself
@digital ibex wdym?

digital ibex
#

mute has nothing to do with any js libraries

#

like, theres nothing called Member.mute or anything

earnest phoenix
#

uh

#

no issue i made mute command now

#

@digital ibex can u help me make kick and ban command for my bot

digital ibex
#

I just told u how to do it

earnest phoenix
#

How do I make a help command for python

#

i do java

#

not python

delicate shore
#
 .addField("Emoji Count", `This server has ${msg.guild.emojis.size} emojis`)
            .addField("Roles Count", `This server has ${msg.guild.roles.size} roles`)```
earnest phoenix
#

I figured it out @slender thistle

delicate shore
#

it keeps saying undefined to both of them

#

do i need cahce

#

cache

earnest phoenix
#

@delicate shore what ru making??

delicate shore
#

serverstats

#

command

digital ibex
#

Member.ban(messages to delete:Number, reason:String)
Member.kick(reason:String)

earnest phoenix
#

oh

digital ibex
#

night hyper ^

solemn latch
#

You know how to check if you need cache @delicate shore
Docs

earnest phoenix
#

okk

#

@delicate shore my project is a fun and moderation bot

#

idk about server stats

quartz kindle
#

btw java and javascript are two completely different things

earnest phoenix
#

yeah

#

when i convert to an exe fs stops working ffs

#

so annoying

digital ibex
#

oh, i've been coding in java this whole time 😳

earnest phoenix
#

xd

#

im doing java script

#

javascript

#

yeah

#

hence the name discord.js @digital ibex

quartz kindle
#

so you should always say javascript

#

and never java

opal plank
#

its not yet in place

quartz kindle
#

because java is a completely different programming language

opal plank
#

though i was correct, they are changing the policy

earnest phoenix
#

oh

digital ibex
#

tbh, I wanna move away from js

slender thistle
#

oh God

earnest phoenix
#

why

digital ibex
#

and move to a language like c or something

delicate shore
#

@solemn latch i am not

#

able to find\

opal plank
digital ibex
#

well uh

opal plank
#

i was indeed correct, though it only applies in august

digital ibex
#

long story lmao, just some reasons

#

lmao

delicate shore
#

@solemn latch nvm

#

got it

solemn latch
slender thistle
#

But what exactly is defined as "legal age to form a binding contract with Discord"

earnest phoenix
#

13

#

7

#

0

quartz kindle
slender thistle
#

to sign a contract
so under 18

earnest phoenix
opal plank
#

i remember this convo on dapi a while ago but i didnt have the source on hands

slender thistle
#

so you can still use the API but only under your guardian's approval

delicate shore
earnest phoenix
#

:dab:

digital ibex
#

thats actually a rip

earnest phoenix
#

no

#

thats epic

quartz kindle
#

the problem is, nobody actually asks their parents anything lol

opal plank
#

^^

earnest phoenix
#

no the problem is who has parents

#

:dab:

digital ibex
#

yeah lmao, i dont even have a credit card so ye

opal plank
earnest phoenix
#

well im 13

opal plank
#

¯_(ツ)_/¯

earnest phoenix
#

i was in the roblox discord for some reason and the amount of people who came and where like 7 and got banned

#

but im a better boi cause i have a green name

digital ibex
#

ur 14, not that old.

earnest phoenix
#

actually 4

digital ibex
#

most of the people with the bot dev role dont even class as beginners

sudden geyser
#

I'm 16 but feel ancient.

earnest phoenix
#

you are

#

were all hip cool zoomers

#

and ur old

lusty quest
#

the reason you need to be atleast 14 is COPPA

slender thistle
#

the problem is, nobody actually asks their parents anything lol
@quartz kindle totally not relatable

solemn latch
#

^

quartz kindle
#

did you ask your parents to use things on the internet?

slender thistle
#

never

solemn latch
#

I always asked my parents
\s

earnest phoenix
#

like why ask ur parents for vbucks just buy em

quartz kindle
#

same

#

lmao

opal plank
digital ibex
#

lmao

opal plank
#

lol

pale vessel
#

freedom

sudden geyser
#

person: mom can I have 5 dollars for this game
mom: no
person: dad can I have 5 dollars for this game
dad: yeah sure

lusty quest
#

ma give me you creditcard this gamergirl on Twitch wants a new PC

earnest phoenix
#

fs commits no when i run it in an exe

slender thistle
#

One time I got a winlock and managed to get rid of it by myself but my mom knew about it

quartz kindle
#

lmao

earnest phoenix
#

commit help pls

slender thistle
#

other than that, not a single time

sudden geyser
#

What's a winlock

weary ridge
#

lol

slender thistle
#

A program essentially at the top of all windows that doesn't let you do anything

earnest phoenix
#

in my school work today i have a task saying try to convince somebody to give you £5

slender thistle
#

and it runs on OS startup too so it's quiet hard to get rid of it if you have no idea what you're doing

sudden geyser
#

ah so it locks you out of everything

slender thistle
#

yeah

lusty quest
#

back when i was 12 we only had a dial up connection, so pretty much everything on the internet was annoying to load

weary ridge
#

lol

#

still is

lusty quest
#

also the parental thing was easy to exploit in windows XP 2003

sudden geyser
#

the dumbest thing that's happened to our computer is my little brother falling for one of those fake "your computer has a virus" popups

quartz kindle
#

my parents never learned how to use any sort of parental thing, i was always the one having to teach them how to do things

weary ridge
#

tf lol

earnest phoenix
#

this is so frustrating rn

#

fs

stark vault
#

I have a question
Is it possible to code a bot using a mac?

quartz kindle
#

yes

sudden geyser
#

yes

opal plank
#

teaching your parents how to parenting

earnest phoenix
#

no macs suck to much

digital ibex
#

yes

sudden geyser
#

why wouldn't it be

opal plank
#

tim is a legend

lusty quest
#

i made one fake popup any my mom went crazy and wanted to get a new pc

weary ridge
#

bruh i had to teach an entire school how to use a computer lol

digital ibex
#

tf

solemn latch
#

then .size

quartz kindle
#

my dad got a fake fbi virus warning that locked his pc

#

and i removed it for him lmao

weary ridge
#

lol

pure lion
#

*pray to tim*

delicate shore
#

  if(command === "serverstats"){

    if(!msg.member.hasPermission("MANAGE MESSAGES"))
      return msg.reply("**You need atleast `Manage Messages` perms to use this command**")
    
        const embed4 = new Discord.MessageEmbed()
            .setColor("RANDOM")
            .setTitle("Server Info")
            .setImage(msg.guild.iconURL)
            .setDescription(`${msg.guild}'s information`)
            .addField("Owner", `The owner of this server is ${msg.guild.owner}`)
            .addField("Member Count", `This server has ${msg.guild.memberCount} members`)
            .addField("Emoji Count", `This server has ${msg.guild.emojis.cache.size} emojis`)
            .addField("Roles Count", `This server has ${msg.guild.roles.cache.size} roles`)

        msg.channel.send(embed4)
        
}```
quartz kindle
#

fake fbi thingy demanding a bitcoin payment in exchange for not arresting you for supposed illegal activities found on your pc

delicate shore
#

it works

#

but if person doesn't have perms

opal plank
#

'dont worry dad, i'll hack em'

delicate shore
#

it does not reply

digital ibex
#

ogod, theres a person under 13 here

earnest phoenix
#

fake fbi thingy demanding a bitcoin payment in exchange for not arresting you for supposed illegal activities found on your pc
@quartz kindle when you hop on pirate bay and get fbi virus

delicate shore
#

@pure lion

weary ridge
#

um

#

lol

delicate shore
#

help pls

pure lion
#

dont ping

opal plank
#

@digital ibex 'a'? prob a bunch

sudden geyser
#

MANAGE MESSAGES is not a permission.

delicate shore
#

why

lusty quest
#

MANAGE_MESSAGES

opal plank
#

anyhow, getting offtopic

earnest phoenix
#

sweden made pirate bay

digital ibex
#

yeah, true

earnest phoenix
#

pewdipie told me

#

Anyone use python?

#

no

digital ibex
#

yes

#

what do u need?

quartz kindle
#

some people

earnest phoenix
#

no

pure lion
#

some

earnest phoenix
#

How do I make a help command for python

#

they dont

pure lion
#

they dont
shut

earnest phoenix
#

nope

#

they dont use it

digital ibex
#

marine, the defualt help command?

earnest phoenix
#

there fake

pure lion
#

aight im out

earnest phoenix
#

@Home_Spice

slender thistle
#

How do I make a help command for python
How do you create your commands?

earnest phoenix
#

Idk

#

he doesnt he asking how

slender thistle
opal plank
#

¯_(ツ)_/¯

earnest phoenix
#

I have a bot that has some commands but idk how to make em

quartz kindle
#

so you've never made a command before?

opal plank
slender thistle
#

How did you code the bot

earnest phoenix
#

Only on the template ones what do it for you

opal plank
#

show us a bit of the code

solemn latch
#

Help command should come after you make some commands imo

earnest phoenix
opal plank
#

if its too big put it on pastebin

pale vessel
earnest phoenix
#

I have a bot that's it

weary ridge
#

whats those webs again i forgot

earnest phoenix
#

he dont have code

#

a\h

#

I have a bot that's it
@earnest phoenix u wot m8

opal plank
#

'help command should be dynamic so you can do it any stage of your deployment'

earnest phoenix
#

id u dont have code yet i recommend discord.js

slender thistle
#

Welp many people helping at once is a clusterfuck

oak moat
#

I got a ping

pale vessel
#

so you only made a bot account?

earnest phoenix
#

I used one of the discord bot maker apps that's how I did some

digital ibex
#

he's not using javascript

#

he's using python

earnest phoenix
#

ffs

opal plank
#

Lots of people helping = good i guess?

slender thistle
#

no

digital ibex
#

no lmaoo

quartz kindle
#

theres a discord bot maker for python?

earnest phoenix
#

he's not using javascript
@digital ibex he hasnt wrote any code yet

oak moat
#

but who pinged me in here tho

earnest phoenix
#

nobody

weary ridge
#

i hate hava

earnest phoenix
#

@home_spice

#

theres a discord bot maker for python?
@quartz kindle ew

slender thistle
#

It becomes a total fuckery that one moderator can't manage and it causes a ton of misunderstandings and confusion

earnest phoenix
#

I have python

digital ibex
#

well he asked how to do it in python shrug

slender thistle
#

So can we tone it down with the amount of people trying to help

earnest phoenix
#

he asked does anybody use python

opal plank
#

i'll remove myself for that sake of that

earnest phoenix
#

To help

opal plank
#

back to postgres fuckery

earnest phoenix
#

and nobody does

weary ridge
#

i do

#

muahahhahaah

#

lol

earnest phoenix
#

your fake

weary ridge
#

bruh

earnest phoenix
#

your not real

#

your a scam

#

it's a help channel

digital ibex
#

this is development

earnest phoenix
#

:dab:

pale vessel
#

shivaco does

quartz kindle
#

@earnest phoenix if you made a bot in a bot maker, then keep using the bot maker. if you want to start using python, then you need to start from scratch, you need to learn a bit about the python programming language and how to write a basic python program, before you can even start making a bot in python

pure lion
#

dev elopment

quartz kindle
#

python is a general purpose programming language, its not specifically made for discord bots, so it requires some general programming knowledge

weary ridge
#

python is a general purpose programming language, its not specifically made for discord bots, so it requires some general programming knowledge
@quartz kindle sad

marble juniper
#

@quartz kindle when I try to send an embed with discord.js-light with message.reply it won't work lol

earnest phoenix
#

umm

pure lion
#

because embeds are embedded

quartz kindle
#

.reply("",embed) @marble juniper

pure lion
#

ah

digital ibex
#

why do I feel like if a programming language is made for discord would be shit

marble juniper
#

cuz it would just convert the json object to text

#

k

slender thistle
#

discord.py has a commands extension that you can use. It makes managing commands simpler than it is and there's a default help command that most users use

weary ridge
#

lol i removed that default help command yuck

#

lol

marble juniper
pure lion
#

why do I feel like if a programming language made for discordwould be shit
$addRole(user)
$deleteTheBot()

marble juniper
#

ok im stupid

earnest phoenix
#

does anybody know why fs dont work when compiled to an exe

pure lion
#

i-

#

no i dont

#

:)

earnest phoenix
lusty quest
#

now i think about learning GO and write a bot with it

digital ibex
#

@earnest phoenix why are you trying to compile a nodejs module?

marble juniper
#

@earnest phoenix no ik how to fix the issue thanks to tim lol

earnest phoenix
#

ok

pure lion
#

poll time
make a bot in java
make a bot in c
make an esolang and try not to die

#

yes

#

ever met ascencia

earnest phoenix
#

@earnest phoenix why are you trying to compile a nodejs module?
@digital ibex im running a js file that uses fs

#

not exciting

weary ridge
earnest phoenix
#

ew

#

ikr

pure lion
weary ridge
#

PYTHON IS THE BEST

digital ibex
#

ok just so u know, ur not compiling fs

earnest phoenix
#

its fake noody uses it

digital ibex
#

python is good

slender thistle
#

-langwars

earnest phoenix
#

ok just so u know, ur not compiling fs
@digital ibex yes

slender thistle
#

k

earnest phoenix
#

im compiling the script

#

and everything else works

digital ibex
#

send ur code

earnest phoenix
#

send ur code
@digital ibex it works when i use it in a bat file

pure lion
#

how to make wanted with canvacord?
npm uninstall canvacord
npm i canvas

earnest phoenix
pure lion
#

-bins

#

aw

digital ibex
#

why aren't these trolls getting muted yet? sad

delicate shore
#

i wanna make a command

#

like

pure lion
#

:O

lusty quest
#

train a AI to detect Trolls. then add this AI to a bot

delicate shore
#

if perosn does s!emote bruh

earnest phoenix
delicate shore
#

and the bot replies with the emoji

pure lion
#

get the bruh emoji and its ID

earnest phoenix
pure lion
#

then do <channel>.send(<:bruh:<ID>>)

weary ridge
#

gtg

earnest phoenix
#

good

#

py user

weary ridge
#

fuk off non gaming fish

delicate shore
#

get the bruh emoji and its ID
@pure lion no i want the emoji which person

#

says

earnest phoenix
#

im so scared

slender thistle
#

Can we not

earnest phoenix
#

^

weary ridge
#

ikr

#

bruhhhhh

slender thistle
#

This channel has already been a clusterfuck for the past few minutes and if anyone starts language wars or pointless arguments, I'll start muting

earnest phoenix
#

shivaco do u know why fs doesnt work when i compile my js file and bat file to an exe?

slender thistle
#

Because it doesn't want to. I don't know JS

earnest phoenix
#

ok

slender thistle
#

yes

#

and if it keeps on going it's a definite mute

earnest phoenix
#

epic

digital ibex
#

gaming fish, "doesn't work" is very broad. explain more

earnest phoenix
#

so nothing happens and i get no error

digital ibex
#

do u know where its breaking?

earnest phoenix
#

its not breaking everything works fine even the stuff after

#

and it works as a .bat file

digital ibex
#

then whats not working?

earnest phoenix
#

the part where it suposed to make a new .js file

digital ibex
#

afaik, you can't create a file with nodejs

earnest phoenix
#

you can with fs

#

ik u can because it works until i make it an exe

lusty quest
#

its possible that there is some wired permission issue in the filesystem

earnest phoenix
#

maybe

digital ibex
#

idk then, ive never heard of it so i can't really help

lusty quest
#

create one for Linux and see if it works there

earnest phoenix
#

idk how to do that

#

wait ik what the issue is

#

fs makes a file in the same location as the js file wich dont is inside the exe so i need to change the output

#
Collection [Map] {
  'ban' => { run: [AsyncFunction] },
  'btc' => { run: [AsyncFunction] },
  'check' => { run: [AsyncFunction] },
  'close' => { run: [AsyncFunction] },
  'create' => { run: [AsyncFunction] },
  'eth' => { run: [AsyncFunction] },
  'help' => { run: [AsyncFunction] },
  'invoice' => { run: [AsyncFunction] },
  'mute' => { run: [AsyncFunction] },
  'tax' => { run: [AsyncFunction] },
  'unmute' => { run: [AsyncFunction] }
}
#

How could I forEach a map like this?

#

And get all the command names.

#

@earnest phoenix Collection.forEach

#

That just gives me the objects.

sudden geyser
#

You can use .keys() to return an Iterator of all the keys.

#

Then use the spread operator to get only an array of strings

#

which will be the command names

earnest phoenix
#

Thank you!

#

@sudden geyser Why can't I map it? It's an array.

quartz kindle
#

you can

earnest phoenix
#

How would I do that? Because it's not working

#

It says .keys().map() is not a function.

#
(node:34236) UnhandledPromiseRejectionWarning: TypeError: client.commands.keys(...).map is not a function```
pure lion
#

message.react('™️')

pale vessel
#

mapping a key? interesting

#

but why

earnest phoenix
#

I got it haha

quartz kindle
#

Map.keys() returns a key iterator, so you cant map it directly, you'd need to use either [...] or Array.from()

pale vessel
#

[...keys]

quartz kindle
#

but you can do collection.map((item,key) => {})

#

you dont need to do .keys().map()

pale vessel
#

\🚫

pure lion
#

\👍

pale vessel
#

use default:

solemn latch
#

Also, ideally that's user disableable
Since bots can share prefixes, having it react to a command that your bot doesn't have, may be annoying if they are doing commands another bot has.

delicate shore
#
const otherg = new Discord.MessageEmbed()
      .setTitle("Gay-o-Meter")
      .setColor("RANDOM")
      .setThumbnail(`https://cdn.glitch.com/38b33121-f779-43cc-a95d-c99a7cf7a9d4%2FLGBT_Rainbow_Flag.png?v=1594052534262`)
      .setDescription(`**${check} ${finallolgg} % gay**`)
      .setFooter(`** Bruh That's Gay**`);
msg.channel.send(otherg)
}```
#

this is my code

#

but

#

this is result

#
let check = args.slice(2).join(" ")```
#

this is how i define check

sudden geyser
#

you need to tell us what's wrong

delicate shore
#

i dunno

sudden geyser
#

not just throw us some code and say "this doesn't work". is the issue the field description?

delicate shore
#

i sent evertyhgin

#

yes

#

it's description

#

@sudden geyser

sudden geyser
#

Okay, now what's wrong with it exactly. Is it the **Bruh that's Gay** part? If so, that's the footer, and you can't use markdown there.

delicate shore
#

no

#

description

#

is wrong

#

it is not telling check var

unreal perch
#

i think you must write let check = args.slice(0).join(' ')

solemn latch
#

I'm not quite sure what check is even doing

earnest phoenix
#

AAAAAAAAH

#

i hate this

#

does anybody have experience with fs and exe files

sudden geyser
#

Sadly I still don't understand. You're explaining this quite vaguely. check is args.slice(2).join(" ") and assumed to be an array of strings split by a space, but that would likely end with an empty array. So, you then have finallolgg, which we don't even know what it's doing.

#

gaming fish can you explain the issue you're having with it.

solemn latch
#

I would use pkg to make exes

earnest phoenix
#

basicly, when i run my js file with a bat it creates the file im trying to create, but when i turn it into an exe it doesnt make the file

delicate shore
#

ok wait

#

i will send whole code

#
if(command === "howgay"){
      
    var randomgg = [
      `69`,
      `0`,
      `1`,
      `2`,
      `39`,
      `100`,
      `50`,
      `46`,
      `72`,
      `37`,
      `40`,
      `4`,
      `99.99`
      
    ];
    let finallolgg = Math.floor(Math.random() * randomgg.length);
  
    var check = args.slice(2).join(" ")
  
    if(!check){
      const youg = new Discord.MessageEmbed()
      .setTitle("Gay-o-Meter")
      .setColor("RANDOM")
      .setThumbnail(`https://cdn.glitch.com/38b33121-f779-43cc-a95d-c99a7cf7a9d4%2FLGBT_Rainbow_Flag.png?v=1594052534262`)
      .setDescription(`You are ${finallolgg} % gay`)
      .setFooter(`Brvh that's gay`);
    } else{
const otherg = new Discord.MessageEmbed()
      .setTitle("Gay-o-Meter")
      .setColor("RANDOM")
      .setThumbnail(`https://cdn.glitch.com/38b33121-f779-43cc-a95d-c99a7cf7a9d4%2FLGBT_Rainbow_Flag.png?v=1594052534262`)
      .setDescription(`${check} is ${finallolgg} % gay`)
      .setFooter(`Brvh that's gay`);
msg.channel.send(otherg)
}
  
  }``` @sudden geyser
solemn latch
#

If your just trying to get the second arg, just get the second arg

#

🤔

#

Or first arg?

earnest phoenix
#

gay-o-meter sounds so wrong

delicate shore
#

but

#

wot is error

earnest phoenix
#

idk

solemn latch
#

Your slicing 2 things off args

#

So nothing is there

#

Just get the arg itself

delicate shore
#

hm

#

howow

#

ow

earnest phoenix
#

args[1]

delicate shore
#

but

hazy girder
#

My bot is hosting on Heroku. But my bot is doing the transactions 2 times. It shows Uptimes differently in the Stats command. Why is it How can I solve it

earnest phoenix
#

dont use heroku

delicate shore
#

it can be more than 2 letters

hazy girder
#

no

solemn latch
#

Args are words, without spaces

earnest phoenix
#

heroku isnt designed for hosting bots is super funky

solemn latch
#

^

#

Heroku isn't designed for bots.

spare mirage
#

@delicate shore just make a randomizer

#

:/

delicate shore
#

how

#

w

spare mirage
#

a function

delicate shore
#

????
?
?
?

spare mirage
#
            min = Math.ceil(min);
            max = Math.floor(max);
            return Math.floor(Math.random() * (max - min + 1)) + min; 
          }```
solemn latch
#

He already is randomizing that part correctly isn't he?

#

🤔

sudden geyser
#

sort of, but it can use improvements

earnest phoenix
#

i spilt juce on my laptop and now the key presses are not satisfying

sudden geyser
#

it's as simple as multiplying the result of Math.ranodm() by the maximum

solemn latch
#

Which is what he is doing

spare mirage
#

@solemn latch it only has 10 awnsers :/

sudden geyser
#

the length of the array

delicate shore
#

how to let

solemn latch
#

I think that's what he wants

delicate shore
#

min

#

and max?

sudden geyser
#

hmm

spare mirage
#

u dont have to

#

lmaoo

delicate shore
#

wot

#

i want it to randomise

#

from 0 to 100

#

d

spare mirage
#

-_-

#

message.channel.send(BLABLABLA(1, 100))

solemn latch
#

Then use your existing randomizer, but do it with 100 instead of array size

#

And feed that number in

delicate shore
#

message.channel.send(BLABLABLA(1, 100))
@spare mirage i wanna let it a const and set it as description

spare mirage
#

:/

#

why

#

u can just

#

.setDescription(BLABLABLA(1, 100) + 'text stuff')

solemn latch
#

Math.floor(Math.random() * 100)
Will give you a number from 0 to 100

#

100 would be super rare tho

#

Math.round would be better

spare mirage
#

no it would be equal

solemn latch
#

Floor rounds down

strange trout
solemn latch
#

So if the number was 99.99 it would come up as 99

blazing ravine
#

why setstatus not work

spare mirage
#

``

blazing ravine
tight plinth
blazing ravine
spare mirage
#

its

#

bot.user.setActivity('');

quartz kindle
#

@tight plinth if you're using .members.fetch(id), do .members.fetch({id:id}) instead

hazy girder
#

@spare mirage no?

tight plinth
#

ok

spare mirage
#

it is on v12

tight plinth
#

thx @marble juniper for providing code that dont work

spare mirage
#

ah nvm

hazy girder
#

oh

spare mirage
#

hmm

marble juniper
#

@tight plinth smh im using discord.js-light for like 10 minutes

quartz kindle
#

i'll update it to accept a plain id too

#

soon

blazing ravine
#

not work

#

@spare mirage

spare mirage
#

nah that is for activitys

#

U want to get the yellow idle color

#

right?

blazing ravine
#

i need

#

dnd

#

red

#

color

spare mirage
#

hmm

digital ibex
#

just put dnd

pale vessel
#

provide twitch url

summer torrent
#

^

pale vessel
#

in the options

hazy girder
#

@earnest phoenix whats library

solemn latch
#

Thats language

#

Not library

pale vessel
pure lion
#

Thats language
japOS?

spare mirage
#
        status: "online",  //You can show online, idle....
        }); ``` @blazing ravine
#

maybe

summer torrent
#

no

solemn latch
#

Spotify doesn't allow that

summer torrent
#

bots can't use rpc

blazing ravine
#

thanks

spare mirage
#

np

earnest phoenix
#

how do i give higher permsions to an exe file

blazing ravine
#

@spare mirage again not work

#

xd

spare mirage
#

hmm

#

weird

tight plinth
spare mirage
#

without the comma @blazing ravine

blazing ravine
spare mirage
#

weird

tight plinth
#

bot.user is null

sudden geyser
#

It's self-explanatory: bot.user is null. Are you logged in

tight plinth
#

put this code in the ready event

spare mirage
#

^

tight plinth
blazing ravine
#

ok

strange trout
#

That's another library

blazing ravine
pure lion
#

where are you getting that info

#

send code

blazing ravine
#

.catch

ebon kelp
#

@tight plinth .fetch(id) instead of .fetch({id: id})

solemn latch
#

He is on a different library

#

Not discordjs

#

But discordjs-lite

ebon kelp
#

Ohhh

elfin flower
#

how do i make my bot message on another specific server i want?

solemn latch
#

Get that guild, get a channel in that guild

#

Send the message

spare mirage
#

more code @blazing ravine

elfin flower
#

no like

#

im trying to make a log server for my bot

#

like

#

when my bot joins a server it notifies me on that log server

#

wait that needs webhooks right

solemn latch
#

No

#

It can use webhooks if you want

blazing ravine
#

not work

#

bot.user.setPresence({ status: 'dnd' })
.then(console.log)
.catch(console.error);

solemn latch
#

Its still pretty much the same way @elfin flower you can get the channels once on startup, and send the messages each time

elfin flower
#

i dont wanna use webhooks since my brain malfunctioned the first 10 seconds of a webhook tutorial @solemn latch

summer torrent
#

wait a bit and try again @blazing ravine

spare mirage
#

@blazing ravine maybe setStatus will work now

blazing ravine
#

ok

#

nop

spare mirage
#

hmm

#

weird

#

@blazing ravine maybe DND doesnt work try idle

blazing ravine
#

not work all

#

xd

#

my bot bugged status system ;ddd

elfin flower
#

dnd still works

#

well

#

for

#

discord py it still does

#

lol

spare mirage
#

client.user.setPresence({ status: 'idle' }) @blazing ravine try this idk

blazing ravine
#

i try not work

#

xd

spare mirage
#

show code

pale vessel
#

@blazing ravine show code

blazing ravine
#

bot.user.setPresence({ status: 'dnd' })
.then(console.log)
.catch(console.error);

pale vessel
#

where did you put the code?

blazing ravine
#

ready

pale vessel
#

show the surrounding code

blazing ravine
summer torrent
#

"dnd"

#

remove {} and status:

pale vessel
#

that's for setStatus()

blazing ravine
#

mhm

earnest phoenix
#

how do i make a bot react using a custom emoji ?

blazing ravine
#

// const reactmessage = await msg.channel.send(embedw)

 //  await     reactmessage.react('🇩')
 //       reactmessage.react('3⃣')
  //      reactmessage.react('🇼')
   //     reactmessage.react('🇦')
   //     reactmessage.react('🇲')
   //     reactmessage.react('🇰')
   //     reactmessage.react('🇪')
  //      reactmessage.react('✅')
summer torrent
#

use ID

blazing ravine
#

liek this

earnest phoenix
#

custom one

#

like

pale vessel
#

name:id

earnest phoenix
#

a

#

Thx

summer torrent
#

react("emoji id")

earnest phoenix
#

id of emoji ?

#

or server

pale vessel
#

didn't it need name and id?

#

not sure

summer torrent
#

doesnt matter

pale vessel
#

ic

summer torrent
#

both works

pale vessel
lime cypress
#

one sec

#
<:emojiname:emojiid>

ANIMATED EMOJIS:

<a:emojiname:emojiid>

pale vessel
#

anything works i guess

#

something that represents an emoji

earnest phoenix
#

how do i get an emoji id? xd

pale vessel
#

you can use a bot or right click the emoji with developer option on or use inspect element

spare mirage
#

@blazing ravine A bot doesnt update his status until it goes offline

#

just happend to me

blazing ravine
#

😭

#

what i need to make

elfin flower
#

how do i make my bot DM Direct Message

solemn latch
#

Send the message to a user

spare mirage
#

@elfin flower docs -_-

zenith gazelle
#

or for emojis you can do \{emojiname} \🍆

#

like that

elfin flower
#

@spare mirage well guess what buckaroo
docs didnt help

spare mirage
#

lmaooo

opaque seal
#

What are the advantages of JDA over discord.js?

earnest phoenix
digital ibex
#

well d.js is bad anyways

opaque seal
#

why do you think that

earnest phoenix
#

pog

sudden geyser
#

The advantage is JDA is written in Java, and the advantage of Discord.js is it's written in JavaScript.

spare mirage
#

client.sendMessage("");

#

@elfin flower

opaque seal
#

Thank you so much @sudden geyser

elfin flower
#

discord py

#

but ty

opaque seal
#

docs

regal raven
#

Hm

elfin flower
#

might us

#

stop

pastel briar
#

hello

digital ibex
#

I'm having this small issue with something... this works perfectly fine, but my issue is that when theres multiple messages it looks something like this:

opaque seal
sudden geyser
#

It's not that Discord.js is bad. It's that in case scenarios, it'll be more preferable to choose something else. For example, a lot of people use Python for math.

digital ibex
pastel briar
#

im a bot creator too

opaque seal
#

This is for coding help

digital ibex
#

does anyone know how I can fix this and make the messages go up instead of down?

#

im using node.js btw

regal raven
#

This is bot developing help

digital ibex
#

the reason why I feel discord.js is bad is because it gives u everything

spare mirage
#

@elfin flower what library do u use

elfin flower
#

isnt that good

#

@spare mirage discord py

digital ibex
#

wasi, you can still ask other questions here, mods have helped me with my website before which doesn't have anything to do with discord

elfin flower
#

bruh

digital ibex
#

and you're not actually doing the coding urself in d.js

#

blout, its just message.channel.send('message')

opaque seal
#

Yes but you need to share what you have tried, what do youthink is the problem and what you want to do exactly

elfin flower
#

Thats probably not how direct messages work lol

digital ibex
#

and you're not actually doing the coding urself in d.js

#

what are u trying to do then?

opaque seal
elfin flower
#

direct message

spare mirage
#

https://stackoverflow.com/questions/49098057/how-to-make-a-discord-py-bot-private-direct-message-someone-whos-not-the-author

#

GOOGLE

#

exists

#

omg

digital ibex
#

chill

regal raven
#

This should work

slender thistle
#

user = bot.get_user(some_id)
user.send

#

simple

elfin flower
#

okay

slender thistle
#

get_user returns a User object that inherits abc.Messageable so you can use User.send where User is some instance of an user

regal raven
#
client.send_message(ctx.message.author, "Text") ```
sudden geyser
#

the reason why I feel discord.js is bad is because it gives u everything
@digital ibex that's not necessarily an issue. What's an issue is how the library works. People run into the issue of Discord.js caching everything and how big the resource usage is.

spare mirage
#

chill
Im still right xD

opaque seal
#

and is JDA better in that?

digital ibex
#

its an issue for me

opaque seal
#

I feel like java is much ram heavier

sudden geyser
#

It is

elfin flower
#

Ive gotten enough help

regal raven
#

Ok

spring tulip
#

hey small question guys, i got my bot up and running (for the most part) and i managed to play mp3 files, yet i cant find any documentations (or really bad ones) on youtube-dl or wavelink, can anyone help me or reccomend me something?

strange trout
#

I like discord.js. Don't see myself moving to eris even if my bot gets big

modest maple
#

aha

#

just wait lmao

solemn latch
#

no

#

if you cant answer these questions yourself

delicate shore
#

:(

solemn latch
#

you shouldnt submit

#

🤔

delicate shore
#

Lol

modest maple
#

^^

delicate shore
#

I only have one query

strange trout
#

And if i do have to move it'll be easy. I don't rely on too many discord.js utility stuff like embeds and such

delicate shore
#

That is caching data called storing ?

#

Like I get the user name nickname roles a date o joining

#

So is it data storing ?

opaque seal
#

just mentione it

solemn latch
#

you should answer the questions to the best of your ability

delicate shore
#

hmm

#

Lul

spare mirage
#

How can U add 2 fields next to eachother (embeds)

solemn latch
#

put inline to true

spare mirage
#

Umm

#

addField('blablbalb', 'blablalb', true)?

solemn latch
#

ye

strange trout
#
fields: [
  {
    name: '',
    value: '',
    inline: true
  },
  {
    name: '',
    value: '',
    inline: true
  },
];
solemn latch
#

you can have up to three fields inline

spare mirage
#
fields: [
  {
    name: '',
    value: '',
    inline: true
  },
  {
    name: '',
    value: '',
    inline: true
  },
];

@strange trout imagine making embeds like that tbh

#

no offense <3

solemn latch
#

its technically faster that way from what i heard

#

not using the embed builder

spare mirage
#

embed builder?

strange trout
solemn latch
#

new MessageEmbed()
.setTitle()

thats using the builder

#

you can just build the object yourself

#

i use the builder, but mainly because i hate micro optimization

spare mirage
#

whats the builder :/

solemn latch
#

what you do

strange trout
#

Imagine discord.js devs decide to change the syntax of some part of the embed builder and then you have to go and fix all your embeds

spare mirage
#

:?

opal plank
#

nothing wrong with manually building embed

#

its actually better code wise

#

{embed: {/fields here/},}

spare mirage
#

:o

strange trout
spare mirage
#

?

misty sigil
#

Hey, is there any way I can take the top.gg server count and add it to my own site

solemn latch
#

why not just add it directly to your site?

summer torrent
misty sigil
#

wai shi thats right

restive furnace
#

This is the main reason I don't want to switch to eris
what are you pointing to with this pic?

solemn latch
#

file count

#

11,202 lines

restive furnace
#

in a bot?

#

well it isnt actually much (in my opinion), i have written applications over 100k lines

#

and some bots over 5k lines

strange trout
#

That's just the main bot

#

Still got the framework

#

API

#

And a couple other things

#

My point is that it would be a pain to port over

earnest phoenix
#

does anybody know how to change the output dircetory on fs

sudden geyser
#

Imagine discord.js devs decide to change the syntax of some part of the embed builder and then you have to go and fix all your embeds
@strange trout that's why versions exist (major versions).

#

The documentation outlining every single change and what it's been changed to is super helpful.

spare mirage
#

what are the main categories for commands
fun, moderation. is all I have now where do I put purge and ping

strange trout
#

Wherever you want them

spare mirage
#

what would sound good and make sense

strange trout
#

purge is moderation

#

Ping I'd count as utility

sudden geyser
#

It's your choice to decide where it goes. I'd put Ping under a Bot or General category, while putting purge (if it does what I think it does) under Moderation.

spare mirage
#

ill go with utility

#

thanks

earnest phoenix
#

how can i get the current directory in js?

strange trout
#

__dirname

earnest phoenix
#

ok

robust moth
#
    let languages =  message.guild ? require (`../../assets/languages/${message.client.data.guild.Languages}`) : require("../../assets/languages/english");
    message.language =  languages;```
1st time Command Run and 2nd time Command Run
spare mirage
strange trout
#

Code

spare mirage
#

const embedhelp = new Discord.MessageEmbed()

.setTitle("Help!")
.setDescription(`Help commands to help u out!`)
.addField("Fun : ", "`image \n size \n 8ball \n tts \n say`", true)
.addField("Moderation : ", "`ban \n kick \n mute \n purge`", true)
.addField("Utility : ", "`ping \n stats`", true)
.setColor("#d29e04")
.setFooter(`Justii#3473`);```
stable grail
#

Command raised an exception: IndexError: list index out of range

solemn latch
#

your putting spaces everywhere

#

no need for spaces

stable grail
#

im trying to fix the search thing but i found nothing which could help me

spare mirage
#

still looks like shit lmaoo

delicate merlin
#

why is bot ping 1k

tulip ledge
#

@spare mirage Cuz u apparently can't code

stable grail
#

put infront of image also a \n

tulip ledge
#

Why put spaces before and after \n

spare mirage
#

It wouldnt matter lmao

delicate merlin
#

it does

tulip ledge
#

Yes it will

spare mirage
#

yes ik

delicate merlin
#

kick has a space before it

#

kick

spare mirage
#

FIXED IT

stable grail
#
.setDescription(`Help commands to help u out!`)
.addField("Fun : ", "`\nimage\nsize\n8ball \ntts\nsay`", true)
.addField("Moderation : ", "`\nban\nkick\nmute\npurge`", true)
.addField("Utility : ", "`\nping\nstats`", true)
.setColor("#d29e04")
.setFooter(`Justii#3473`);```
#

here

#

do it like this

spare mirage
#

🤦‍♂️

#

why would u do \n before any letter

delicate merlin
#

are you stupid\

#

it is a break line

#

if you add a space the text under will too

stable grail
#

lmao

#

it has a reason

#

u wont see the first text without adding the \n

spare mirage
delicate merlin
#

\n ligma is a breakline and then ligma

#

remove the first

#

n

#

\n

#

in image

#

and ban

#

and ping

#

because field moves it down anyways

strange trout
#

Don't you have a command handler Justii?

spare mirage
#

I have one

#

lol

stable grail
#

in python you have to add them

strange trout
#

Why are you manually writing the help command

spare mirage
#

uhh what!

marble juniper
#

imagine not just using fs and reading all the file names in the command folder

#

also when you use \n that much you would rather wanna use backticks

tulip ledge
#

Cuz he doesn't know what a command handler does apparently

spare mirage
#

@tulip ledge Maybe I just dont want to now

#

shrugs and laughs

marble juniper
#

ok then

tulip ledge
#

Like u don't want to know anything

marble juniper
#

do it the hard way

stable grail
#
Command raised an exception: IndexError: list index out of range```
tulip ledge
#

We need to spoon feed you every time

#

You can filter through your commands object and sort them by catagory

marble juniper
#

maybe he wants to spoon feed

#

yes

tulip ledge
#

And then put them in ur help cmd

spare mirage
#

bruh wtf

marble juniper
#

we are gonna give him instructions

#

but no code

spare mirage
#

I dont ask for spoonfeed

marble juniper
#

for anti spoon feed

spare mirage
#

I asked for advice

marble juniper
trim burrow
marble juniper
#

just use fs and filter through the commands folder to find files that end with js

tulip ledge
#

Every time we give you advice u "don't know what to do with it"

marble juniper
#

from the modules.exports you can get name etc.

earnest phoenix
#

ffs

marble juniper
#

and map it

tulip ledge
#

@trim burrow setFooter takes 2 parameters "TEXT", image (url)

marble juniper
#

and use .join

earnest phoenix
#

my thing just deletad all my desktop shortcuts

marble juniper
#

so it makes a linebreak

spare mirage
#

aight Im out

earnest phoenix
#

is there a way i can revert that

trim burrow
#

@tulip ledge can you write the full code plz ?

marble juniper
#

@earnest phoenix ever knew trash can existed

tulip ledge
#

No

spare mirage
#

lmao

tulip ledge
#

I'm not spoonfeeding

#

I literally told u wat to do

spare mirage
#

and u say I ask for spoonfeed

tulip ledge
#

You do

earnest phoenix
#

@earnest phoenix ever knew trash can existed
@marble juniper yes but there shortcuts not actual files

marble juniper
#

THEY STILL LAND IN THE TRASH CAN

#

SHORTCUTS OR NOT