#development

1 messages ยท Page 1018 of 1

delicate shore
#

without taking my prefix

#

like

#

wtf

restive pebble
#

it is in config

delicate shore
#

@restive pebble i dont have root

#

i use env

spare mirage
#

questoin how do u execute/run it?

restive pebble
#

bruh

delicate shore
#

wot

#

d

#

like

earnest phoenix
#

bruh

delicate shore
#

i found this code online

#

so idk

#

anything

restive pebble
#

simply set prefix

delicate shore
#

where

#

like

#

e

earnest phoenix
#

@restive pebble proweirdsip

delicate shore
#

@restive pebble i mean in ths code he is not asking for prefix anywhere how is he doing if(command === "plau")?

earnest phoenix
#

Op

#

Meme

delicate shore
#

oop

earnest phoenix
#

@restive pebble boeing oppandasad

#

Wt

restive pebble
#

0Gom.gif

#

best gif

earnest phoenix
#

I am dead

spare mirage
#

how do people make currency systems?

restive pebble
#

db

earnest phoenix
#

What

spare mirage
#

datebases? hmm how does that work

delicate shore
#
const { PlayerManager, Player } = require("../dist/index.js");
#

what does this mean

restive pebble
#

@delicate shore he has defined prefix inside config.js

spare mirage
#

what is dist

restive pebble
#

require lol

delicate shore
#

@delicate shore he has defined prefix inside config.js
@restive pebble but i have in env

#

so

restive pebble
#

replace lol

delicate shore
#

require lol
@restive pebble what is it requiring

earnest phoenix
#

Replace name

spare mirage
#

bruh

earnest phoenix
restive pebble
#

bruh moment

spare mirage
#

@delicate shore this is copy pasted

#

๐Ÿคฆโ€โ™‚๏ธ

earnest phoenix
#

KEKW
@restive pebble pandasad

delicate shore
#

i told earlier

#

only

restive pebble
#

imagine not knowing require

spare mirage
#

^

restive pebble
delicate shore
#
const PREFIX = process.env.PREFIX;```
#

this right

restive pebble
delicate shore
#

imagine not knowing require
@restive pebble i know but

restive pebble
#

yes lol

delicate shore
#

you are not getting it

#

like

#

i am saying something else

restive pebble
#

hmmm

delicate shore
#

that where the f is he asking for prefix

#

without declaring it

#

in the code

spare mirage
#

If u dont know about require then why do u have the bot working?
const Discord = require("/discord.js")

restive pebble
#

config.prefix

delicate shore
#

If u dont know about require then why do u have the bot working?
const Discord = require("/discord.js")
@spare mirage bruh i know it

#

brubhrurbhrhrhrhrhr

#

r

spare mirage
#

@restive pebble what is it requiring

#

bruh

#

bruh

delicate shore
#

i mena

restive pebble
delicate shore
#

for fuck sake

#

listen me

#

i was

#

a

spare mirage
#

was a what

#

?

restive pebble
#

mistake

#

lol

delicate shore
#
const { PlayerManager, Player } = require("../dist/index.js");```
spare mirage
#

lmaoo

restive pebble
#

brain.exe stopped

delicate shore
#

what to do of this

a

spare mirage
#

?

#

a

#

thats the first letter in the alphabet

restive pebble
#

const { PlayerManager, Player } = require("../dist/index.js");

#

this file is in root of the directory

delicate shore
#

const { PlayerManager, Player } = require("../dist/index.js");
@restive pebble i don't have any file named

restive pebble
#

so make lol

spare mirage
#

what the heck is /dist/

restive pebble
#

why expect spoon food

delicate shore
#

i have a file called index.js

#

but i never declared Player or Player Manager there

spare mirage
#

ok imma stay out of this

#

good luck

restive pebble
#

@spare mirage most people compile typescript projects in folder named dist

spare mirage
#

ok...

delicate shore
#

@pure lion dm

restive pebble
#

shit dev here

#

lol

delicate shore
#

he again went

#

brvh

pure lion
#

@earnest phoenix use var not let

#

Ew lavalink

#

Never used it

#

But why use it over ytdl

delicate shore
#

But why use it over ytdl
@pure lion rate limit

pure lion
#

Ball

delicate shore
#

but check dms

#

pslpslpslpslpslpsl

sinful belfry
#

-checkdms

gilded plankBOT
spare mirage
#

wth is a rate limit

#

lmao

restive pebble
#

imagine not knowing the difference between ytdl and yt-search services

delicate shore
#

imagine not knowing the difference between ytdl and yt-search services
@restive pebble Don't bully me
and i know

sinful belfry
#

@pure lion the spam isn't necessary

pure lion
#

Rate is the amount of shit you can send to/get from a server

#

Apologies @sinful belfry

delicate shore
#

Quota of Youtube API

#

that is rate limit^

restive pebble
#

and ytdl

#

ok listen carefully what is ytdl

pure lion
#

I'm cofucuous

delicate shore
#

ok

quartz kindle
#

did i get ghost pinged? lmao

restive pebble
#

ytdl is basically a downloader of youtube videos in pure node js

pure lion
#

By me Tim :E

quartz kindle
#

oh hi shit dev

#

lmao

pure lion
#

:c

restive pebble
#

arbitary format

delicate shore
#

ok

pure lion
#

I'm changing back to dice

restive pebble
#

so u can play with discord.js's .play

delicate shore
#

ok

#

but

#

how

pure lion
#

.play(ytdl(url))

delicate shore
#

what if person has a query

#

like

#

s!play depsacito

#

not a url

pure lion
#

Then you use something that will affect rate cough and get the URL from yt

spare mirage
#

what are some fun fun games on discordjs

pure lion
#

Uh

#

What is a fun game

restive pebble
#

logic

delicate shore
#

@pure lion pls

#

check

#

dms

pure lion
#

Also @delicate shore basically what I'm saying is we're gonna get rate limited unless we use a screen scraper

delicate shore
#

f

#

what is a screen scraper

#

lol

#

x

#

dd

pale vessel
restive pebble
#

see it and chill

#

hmmm....

pure lion
#

Screen scraper = ๐Ÿ”ช ๐Ÿ“ฑ

quartz kindle
#

@delicate shore pls watch the video that starman posted

delicate shore
#

@sinful belfry

#

@delicate shore pls watch the video that starman posted
@quartz kindle where

quartz kindle
#

smh

pure lion
#

Lolmao also hi Tim also is there a way to use ytdl for audio only because apparently it downloads the vid by default

delicate shore
#

^^^^^^

quartz kindle
restive pebble
#

lol

quartz kindle
#

literally scroll up a bit

pure lion
#

Bit

#

Maybe you should use your

restive pebble
#

yes

pure lion
#

๐Ÿ”ช ๐Ÿ“ฑ

#

He's gonna scrape the screen

delicate shore
#

๐Ÿ˜ฆ

pure lion
delicate shore
#

never thought

#

that

#

i will get

#

bullied

restive pebble
#

@pure lion filter lol

delicate shore
#

๐Ÿ˜ญ

pure lion
#

Ik

#

That's what I said in dms

restive pebble
#

.play(ytdl(url,{format:'audioonly'}))

pure lion
#

format: 'opus'

spare mirage
#

how do I give out welcome roles?

pure lion
#

No

restive pebble
#

bruh

pure lion
#

Very hard

#

Need a db

restive pebble
#

that thing is removed

pure lion
#

And some pliers

thin bolt
#

can someone help with rank card lol

restive pebble
#

lol

#

canvas lol

pure lion
#

Yeah lol canvas lol

restive pebble
#

that thing is removed
@restive pebble @pure lion

pure lion
#

Oh

#

Epic

thin bolt
#

my problem is with progress bar

restive pebble
#

opus is not needed

thin bolt
#

lol

restive pebble
#

and if u put it wont play anything

pure lion
#

Fill (percentage)

odd grotto
#

Lol

thin bolt
#

._.

odd grotto
#

Akowwkwko

restive pebble
#

fillRect(x,y,width.height)

thin bolt
#

...

pure lion
#

But with width

#

Put a x % 100

delicate shore
#

shit

thin bolt
#

ohh

delicate shore
#

dev

odd grotto
#

Rame

pure lion
#

Yeah

thin bolt
#

okayyy

#

WoW

earnest phoenix
#

I'm resolving it already

pure lion
#

@earnest phoenix you gotta map them

earnest phoenix
#

map the flags?

pure lion
#

Yeah

earnest phoenix
#

I'm talking about the Pending Promise though

restive pebble
#

lmfao

earnest phoenix
#

shit :/

restive pebble
#

await Promise.resolve()

earnest phoenix
#

Any way to bypass it

#

it is being awaited, Boeing

restive pebble
#

i aswered

delicate shore
#

@pure lion what to do

pure lion
#

SCROLL UP LMA9

restive pebble
#

u cannot resolve promises with eval lol

earnest phoenix
#

Oh?

restive pebble
#

either put this code in your eval

#

await Promise.resolve(eval(code))

quartz kindle
#

you dont need promise resolve? just await fetchFlags directly

#

also you dont need to assign it to a var

pure lion
#

:o

quartz kindle
#

just output it directly as an expression

pure lion
#

Or map th-

restive pebble
#

message.author.flags

#

why use fetchFlags lol

quartz kindle
#

flags is not populated by default i believe

restive pebble
earnest phoenix
#

so i don't rely on cache

restive pebble
#

hmmm

pure lion
#

Sometimes the flags are buried too deep in the floor cache

restive pebble
#

user.flags enough

#

no promise

pure lion
#

<uwuser>.flwags.mop(f => f).join(

spare mirage
#

how does a man create levels/xp systems

pure lion
#

Wait how do I index shit

restive pebble
#

no promise

thin bolt
#

how can i use fillRect with percentage

#

:D?

restive pebble
#

maths lol

spare mirage
#

xD

restive pebble
thin bolt
#

ROFL

#

ded

earnest phoenix
#

why did that not work the time I tried it

thin bolt
#

maths lol
what do u mean

earnest phoenix
#

How do I filter an array of strings alphabetically? Iโ€™m using JavaScript.

#

say I add await Promise.resolve(evalcode) would it work

#

alr thx

restive pebble
#

yes

#

now wait

#

@earnest phoenix

#

await Promise.resolve(eval(code))

earnest phoenix
#

say I eval message.channel.send('test') shouldnt show promise pending right?

#

Yep, amazing!

restive pebble
#

yees

cobalt spruce
#

ik that i did it good

pure lion
#

Uh

cobalt spruce
#

SHIT DEV

#

help me

pure lion
#

Avatarurl is a fu-

restive pebble
#

send error lol

cobalt spruce
#

@restive pebble np error

restive pebble
#

displayAvatarURL()

pure lion
#

And do displayAvatarURL()

cobalt spruce
#

no*

restive pebble
#

lol

#

displayAvatarURL()

pure lion
#

Nnnnn

cobalt spruce
restive pebble
#

{size:2048} lol

cobalt spruce
#

...

pure lion
#

how can i use fillRect with percentage
@thin bolt (X, Y, {value here} % 100, height)

thin bolt
#

let me tryy

restive pebble
#

change the 100 to ur width lol

quartz kindle
#

that wont work, you have to transform the percentage to pixels

pure lion
#

๐Ÿ‘๏ธ

restive pebble
#

bruh moment

pure saddle
#

oh

#

sry

restive pebble
#

np

cobalt spruce
#

Tim is alive

#

Good

spare mirage
#
if(message.content.startsWith(PREFIX + "ping")) {
        bot.commands.get('ping').execute(Discord, bot, message, args);
    }else if(message.content.startsWith(PREFIX + "image")) {
        bot.commands.get('image').execute(Discord, bot, message, args);
    }else if(message.content.startsWith(PREFIX + "stats")) {
        bot.commands.get('stats').execute(Discord, bot, message, args);
    }else if(message.content.startsWith(PREFIX + "purge")) {
        bot.commands.get('purge').execute(Discord, bot, message, args);
    }else if(message.content.startsWith(PREFIX + "ban")) {
        bot.commands.get('ban').execute(Discord, bot, message, args);
    }else if(message.content.startsWith(PREFIX + "unban")) {
        bot.commands.get('unban').execute(Discord, bot, message, args);
    }else if(message.content.startsWith(PREFIX + "kick")) {
        bot.commands.get('kick').execute(Discord, bot, message, args);
    }else if(message.content.startsWith(PREFIX + "say")) {
        bot.commands.get('say').execute(Discord, bot, message, args);
    }else if(message.content.startsWith(PREFIX + "size")) {
        bot.commands.get('size').execute(Discord, bot, message, args);
    }
``` I want to make a command called "banana" but that will break because it has "**BAN**ana" it runs the ban command :3 how do I fix
delicate shore
restive pebble
#

ur not dming bot?

delicate shore
#

wot?

restive pebble
#

are u dming bot?

delicate shore
#

no

thin bolt
#

it's not dm mess bot

spare mirage
#

can u make bots reply on dms?

thin bolt
#

yes you can

spare mirage
#

:o

delicate shore
restive pebble
#

message.reply lol

#

@spare mirage

spare mirage
#

if (channel.type === "dm") {

} like this?

#

if u want it only to reply on dms

restive pebble
quartz kindle
#

@delicate shore processArticle returns an embed

#

so you're doing embed.channel.send()

restive pebble
spare mirage
#
if(message.content.startsWith(PREFIX + "ping")) {
        bot.commands.get('ping').execute(Discord, bot, message, args);
    }else if(message.content.startsWith(PREFIX + "image")) {
        bot.commands.get('image').execute(Discord, bot, message, args);
    }else if(message.content.startsWith(PREFIX + "stats")) {
        bot.commands.get('stats').execute(Discord, bot, message, args);
    }else if(message.content.startsWith(PREFIX + "purge")) {
        bot.commands.get('purge').execute(Discord, bot, message, args);
    }else if(message.content.startsWith(PREFIX + "ban")) {
        bot.commands.get('ban').execute(Discord, bot, message, args);
    }else if(message.content.startsWith(PREFIX + "unban")) {
        bot.commands.get('unban').execute(Discord, bot, message, args);
    }else if(message.content.startsWith(PREFIX + "kick")) {
        bot.commands.get('kick').execute(Discord, bot, message, args);
    }else if(message.content.startsWith(PREFIX + "say")) {
        bot.commands.get('say').execute(Discord, bot, message, args);
    }else if(message.content.startsWith(PREFIX + "size")) {
        bot.commands.get('size').execute(Discord, bot, message, args);
    }
``` I want to make a command called "banana" but that will break because it has "**BAN**ana" it runs the ban command :3 how do I fix

@spare mirage

restive pebble
#

make simple command handeler lol

#

imagine writing that

spare mirage
thin bolt
restive pebble
#

split commandname

digital ibex
#

dot

thin bolt
restive pebble
#

and execute

spare mirage
#

ok

#

lemme try

restive pebble
#

and do try catch

thin bolt
delicate shore
#

so you're doing embed.channel.send()
@quartz kindle what

spare mirage
#

const command = args.shift(); do I just add something like this

digital ibex
#

thats not what he said

quartz kindle
digital ibex
#

he said split the args

spare mirage
#

yesx...

#

I already have this

restive pebble
#

const commandname = message.content.slice(prefix.length).split(' ')[0]

delicate shore
#

oh

spare mirage
#

`
const args = message.content.slice(prefix.length).split(/ +/);

restive pebble
#

anything use

#

dosent matter lol

spare mirage
#

wait wich one do I use xD

restive pebble
#

const commandname = message.content.slice(prefix.length).split(' ')[0]
command name

#

use try and catch

quartz kindle
#

you can also replace your entire if else wall with this lol ```js
if(...startsWith(PREFIX) && bot.commands.has(cmd)) { bot.commands.get(cmd).execute(...) }

restive pebble
#

that is a big brain idea

#

i use try {
cmd.run(message,args,Discord)
}catch {return}

quartz kindle
#

if run is an async function, you need to await it

restive pebble
#

yea

#

i run async

quartz kindle
#

then await cmd.run()

spare mirage
#

wouldnt

const args = message.content.slice(prefix.length).split(/ +/)
const command = args.shift();

if (command === 'ping') {
  bot.commands.get('commandname').execute(BLABLABLA); 



#

I would use stng like this

restive pebble
quartz kindle
#

the idea is that instead of manually typing every single command, you use the command itself to see if it exists and execute it

#

@restive pebble yes but if cmd.run() is an async function, that try catch will not work

restive pebble
#

yeah i was thinking

#

thx

spare mirage
#

eww async

#

I hate it

quartz kindle
#

async is awesome lol

restive pebble
#

lol

quartz kindle
#

you cant do shit without it

restive pebble
#

easy

spare mirage
#

:3

quartz kindle
#

unless you wanna go back to the era of callback hell

earnest phoenix
#

ik im being annoying

restive pebble
#

callbacks shit

earnest phoenix
#
(async()=>{let flags = await message.author.fetchFlags()
flags.toArray()})()

this i a valid way to use async right

restive pebble
#

bruh

#

i told u a better method

spare mirage
#

eww async

restive pebble
#

which dosent give promise

earnest phoenix
#

the await Promise.resolve() ?

spare mirage
#

wouldnt

const args = message.content.slice(prefix.length).split(/ +/)
const command = args.shift();

if (command === 'ping') {
  bot.commands.get('commandname').execute(BLABLABLA); 



will this work

restive pebble
#

message.author.flags.toArray() lol

#

no lol

quartz kindle
#

why overcomplicate it tho

restive pebble
#

make a event

earnest phoenix
#

I don't want to use tat property

#

if user isnt cached it basically breaks

quartz kindle
#

@earnest phoenix why not just await message.author.fetchFlags()

spare mirage
#

no lol
who ya talking to

restive pebble
#

const cmd = client.commands.get(args.shift().toLowerCase())
if(!cmd)fuckoff
cmd.execute(arguments)

quartz kindle
earnest phoenix
#

Ye but then I need to run .toArray() on it

restive pebble
#

lol

#

come i ping u

quartz kindle
earnest phoenix
#

Ohh you added () to the first thing

restive pebble
#

hmmm

#

why do fetchFlags

#

message.author.flags.toArray() ok

earnest phoenix
#

Incase user isnt in cache

restive pebble
#

and no promises

#

oh k

#

then go on

earnest phoenix
#

uhh how did u make ur eval accept await :/

restive pebble
#

lol

quartz kindle
#

fetchFlags returns user.flags if it exists

restive pebble
#

ah

quartz kindle
#

if not, it falls back to the api

earnest phoenix
restive pebble
#

okk

spare mirage
#
if(!cmd)fuckoff
cmd.execute(arguments)``` why (!cmd)
restive pebble
#

it means if someone

#

uses a invalid command

#

it wont throw some fking error

#

lol

quartz kindle
#

my eval function is different

earnest phoenix
#

mind showing it or is it private

spare mirage
#

ahh

#

ok

restive pebble
#

lol

spare mirage
#

and how do I use normal commands

restive pebble
#

u can try this tho

digital ibex
#

big dev man!!

#

lmao

restive pebble
#

await Promise.resolve(eval(async()=>{code})()))

quartz kindle
#

this is my eval function lmao

restive pebble
#

big brains

earnest phoenix
#

erm..

restive pebble
#

await Promise.resolve(eval((async()=>{code})()))
i do like this lol

spare mirage
#

and how do I use normal commands
@spare mirage

quartz kindle
#

yeah thats my 4th form

spare mirage
#

@restive pebble

restive pebble
#

wut normal commands

spare mirage
#

normal commands

#

xD

#

!ban

#

!this

#

!that

#

!so

#

!no

#

!yes

#

!say

#

!maybe

restive pebble
earnest phoenix
#

stop...

quartz kindle
#

wtf

restive pebble
#

make different files

spare mirage
#

I have those

earnest phoenix
#

Yo @quartz kindle mind sending me that on hastebin or smth

restive pebble
#

fs.readdir

spare mirage
#

how do I execute them

earnest phoenix
#

jesus christ

restive pebble
#

bruh

spare mirage
#

lmaoo

earnest phoenix
#

go read that

spare mirage
#

xD

quartz kindle
restive pebble
#

hmm

#

anti cache?

#

seems good

spare mirage
#

hmm

#

do I use if(!cmd === "BLABLABLA")

quartz kindle
#

do you want to make a command handler or not?

spare mirage
#

uhh

#

I just need to change the part that executes it

restive pebble
spare mirage
#

I HAVE THAT SHIT

quartz kindle
#

because you dont need to explicitly type every single command in a giant if-else

restive pebble
quartz kindle
#

you can literally use the command string and check if it exists

restive pebble
#

like that lol

#

i use pretier to format

#

lol

earnest phoenix
spare mirage
#

so I dony need bot.on('message', message+>{
})

restive pebble
#

bruh moment

earnest phoenix
#

just renamed the function to evaluate and I use like this evaluate(code);

spare mirage
#

yall out here screaming NOOOOOOOO

quartz kindle
earnest phoenix
#

ow

#

right

#

Ayyyy works

#

Thanks ๐Ÿ™‚

quartz kindle
#

@spare mirage you cant remove bot.on("message") lol

earnest phoenix
#

can I ask why you have empty catch statements

digital ibex
restive pebble
#

i like to sort

quartz kindle
#

@earnest phoenix i have 4 different evals, each handles a different situation if the previous errors out

restive pebble
#

help category like this

#

u cannot play like that

earnest phoenix
#

So if they all error out it returns with which error?

quartz kindle
#

the last one

restive pebble
#

u need arbitary audio source

digital ibex
#

how can I play it then?

restive pebble
#

ytdl

earnest phoenix
#

ok

digital ibex
#

wut

#

with html?

#

wym

restive pebble
#

arbitary sources look likes this

tulip ledge
#

message.mentions.channels.first() does this not work anymore?

digital ibex
earnest phoenix
digital ibex
#

shut up

quartz kindle
#

@earnest phoenix the reason i did it that way is so i can preview promises, like this

earnest phoenix
#

Ohh

#

So that you can do both with and without await

#

i get it

#

nice

quartz kindle
#

and also use complex code like returning and assigning vars without breaking the eval

restive pebble
#

dude u cannot play yt audios like that

earnest phoenix
#

That's amazing!

digital ibex
#

and im asking how...

restive pebble
#

u need to them to be in pure node js form

#

use ytdl-core

tulip ledge
#

Does anyone knows what I have to use instead of message.mentions.channels.first()?

#

Shut up

spare mirage
#

how am I this dumb

quartz kindle
#

it does work chicken

restive pebble
#

yeah

#

u didnt mentioned

#

probably

earnest phoenix
quartz kindle
spare mirage
#

stop

tulip ledge
#
                let channel = message.mentions.channels.first();
                message.channel.send(channel)

Cannot send an empty message

restive pebble
#

pls

#

stop

#

lol

#

or name

tulip ledge
#

channel should return the channel object

quartz kindle
#

was a channel actually mentioned?

tulip ledge
#

Yes

earnest phoenix
#

omg stop

digital ibex
#

how can i use ytdl in html....

#

im using html, not nodejs

quartz kindle
#

you're trying to send the entire channel object

spare mirage
#

im stuck

#

how

#

idk

quartz kindle
#

what part of that channel do you want to send?

tulip ledge
#

Isn't that possible?

#

Like that

quartz kindle
#

then send the channel mention

tulip ledge
#

Isn't that what I'm doing?

#

Or do I have to do <#id>

quartz kindle
#

i'd do it like that ^

#

but there are probably shortcuts in djs

tulip ledge
#

Alright

quartz kindle
#

like channel.toString()

tulip ledge
#

Oh

quartz kindle
#

or channel.mention if it exists

spare mirage
restive pebble
#

tim

tulip ledge
#

Alright ty verry much

restive pebble
#

see this

#

lol

#

if u use .name or .id

#

it works

tulip ledge
#

But I don't want the name lol

#

I want the channel mentioned

digital ibex
#

does anyone know how i can play music then?

quartz kindle
#

you want to play music in a browser?

#

like in the background?

digital ibex
#

yeah

spare mirage
#

@restive pebble ****why dont I understand this?
? can I get some more code to see where exactly u added it

quartz kindle
#

pls dont

earnest phoenix
restive pebble
#

hmmm

quartz kindle
#

websites who play music in the backgroudn are annoying af

#

insta-close for me

earnest phoenix
#

the link i sent is using your eval

digital ibex
#

yeah, im making a button to toggle

restive pebble
#

i cannot show personal codes for reason

spare mirage
#

@earnest phoenix just use a lever :p

#

:/

earnest phoenix
#

lever?

plucky harness
#

how do i access the getprefix function in cog

earnest phoenix
#

@quartz kindle Seems like ur eval hates comments

digital ibex
#

whats wrong with it?

spare mirage
#

@restive pebble where did u put that code

restive pebble
#

yeah wait

digital ibex
#

dude.. im not using js, im using html

earnest phoenix
#

@digital ibex How about you check google

quartz kindle
#

yup, apparently doesnt work with comments

earnest phoenix
#

Hmm...

digital ibex
#

i've checked google, and im asking why its not playing after i used the example i gave

earnest phoenix
#

What can be done about that

quartz kindle
#

i'll see if i can do anything about that

earnest phoenix
#

kk

quartz kindle
earnest phoenix
#

Oh ok

restive pebble
digital ibex
#

tim, any ideas why its not playing?

restive pebble
spare mirage
#

ok thanks

restive pebble
#

tho that catch wont work

#

tim said

spare mirage
#

:/

restive pebble
#

rest all works lol

spare mirage
#

imma try smtng else

#

xD

restive pebble
#

cmd.execute change

#

ok

earnest phoenix
#

this.client wow!!1!11!!11!1

mild flower
earnest phoenix
#

?

mild flower
#

My bot responds to every prefix

#

it shoould only respond to ;

earnest phoenix
#

if (!message.content.startsWith(PREFIX)) return;

mild flower
#

ok thanks

earnest phoenix
#

np ๐Ÿ‘Œ

mild flower
#

do i have to put this before every case?

digital ibex
#

no

mild flower
#

...

#

where then?

digital ibex
#

above the switch

mild flower
#

oh okie

#

thanks a bunch

digital ibex
#

with html

restive pebble
#

i told

#

u

#

u need audio in pure node js

digital ibex
#

u told me how to do it in js

#

not html

quartz kindle
#

@earnest phoenix you can add an additional eval test at the end of the 4 evals, one without any function wrapped around it, that will fix both comments and displaying the last value without needing to return

restive pebble
#

<script>

digital ibex
restive pebble
#

:/

digital ibex
#

this is what im following, it doesn't say anything about using js

restive pebble
#

promise lol

earnest phoenix
#

lol

digital ibex
#

and i dont want to use js

restive pebble
#

its promise lol u have to resolve

earnest phoenix
#

if(message.author.id == 354896888626937856){

#

use string

restive pebble
#

stop pasting big codes

#

oh it was u

#

u started using js

#

lol

#

okk

earnest phoenix
#

??

#

That is unfortunate

digital ibex
#

theres no need to be rude

earnest phoenix
#

Ask again

digital ibex
#

marcos, whats your question?

earnest phoenix
#

That's not being rude lmao

weary anchor
#

still no one has answered my question
@earnest phoenix do you get any error in console?

digital ibex
#

you can use JSON.stringify(whatever)) to get whatever is inside the object

#

then whats ur problem?

pure saddle
#

how can i kick a user in voice channel

spare mirage
#
bot.commands = new Discord.Collection(); 
bot.aliases = new Discord.Collection(); 
const modules = ['fun', 'moderation', 'others']; 
const fs = require('fs'); 

modules.forEach(c => {
fs.readdir(`./commands/${c}/`, (err, files) => { 
if (err) throw err; 
console.log(`[Commandlogs] Loaded ${files.length} commands of module ${c}`); 

files.forEach(f => { 
const props = require(`./commands/${c}/${f}`); 
bot.commands.set(props.help.name, props); 
props.conf.aliases.forEach(alias => { 
bot.aliases.set(alias, props.name); 
});
});
});
});```
bot.commands.set(props.help.name, props);
TypeError: Cannot read property 'name' of undefined
digital ibex
#

what are you talking about.. i dont know what ur code is

weary anchor
#

@earnest phoenix what if you log result to console before sending?

digital ibex
#

this channel is cancer sometimes

weary anchor
#

xd

spare mirage
#

bruh

earnest phoenix
#
{ MongoError: Topology is closed, please connect
#

help me

restive pebble
#

wut error

earnest phoenix
#

why

#

turns out embed fields only allow 1024 characters smh

restive pebble
#

lol only tim can help

#

yea

weary anchor
#
{ MongoError: Topology is closed, please connect

@earnest phoenix maybe you need to connect to mongodb?

earnest phoenix
#

yes

#

i did

weary anchor
#

nothing appears in the console
@earnest phoenix that's weird

restive pebble
#

whats the error lol

delicate shore
#

hey i need someone's help pls

digital ibex
#

no its not, maybe because it has no value?

delicate shore
#

it cannot be xplained here

#

pls dms

#

๐Ÿ˜ญ

spare mirage
#
bot.commands = new Discord.Collection(); 
bot.aliases = new Discord.Collection(); 
const modules = ['fun', 'moderation', 'others']; 
const fs = require('fs'); 

modules.forEach(c => {
fs.readdir(`./commands/${c}/`, (err, files) => { 
if (err) throw err; 
console.log(`[Commandlogs] Loaded ${files.length} commands of module ${c}`); 

files.forEach(f => { 
const props = require(`./commands/${c}/${f}`); 
bot.commands.set(props.help.name, props); 
props.conf.aliases.forEach(alias => { 
bot.aliases.set(alias, props.name); 
});
});
});
});```
bot.commands.set(props.help.name, props);
TypeError: Cannot read property 'name' of undefined

reeeeeeeeeeeeeeeeeeeeeee my friend told me this would work :3

digital ibex
#

this channellllll

delicate shore
#

i am not aksing for spoonfeed

hasty sparrow
#

If you can explain it in DMs, you should be able to explain it here as well

digital ibex
#

cancer

weary anchor
#

before trying the embed i had a normal message and it sent Result: [object Promise] or something like that
@earnest phoenix I see. So its a promise. You need to await it then you can get the result

delicate shore
#

If you can explain it in DMs, you should be able to explain it here as well
@hasty sparrow ok listen my new code was not working so i went to my old command and copied that but it is not working

spare mirage
#

cancer
@digital ibex if this channel really is "cancer" then dont talk here lmao

hasty sparrow
#

@spare mirage props doesn't have a property help

spare mirage
#

what does that mean

digital ibex
#

like im going to listen to you mmLol

spare mirage
#

Uhh

#

can I remove help

#

?

hasty sparrow
#

Describe what isn't working, show the error and hastebin the code

spare mirage
#

u talking to me?

hasty sparrow
#

No

weary anchor
#

That's why I ping the person I am replying to. LOL

delicate shore
#

Describe what isn't working, show the error and hastebin the code
@hasty sparrow nothing my whole code

hasty sparrow
#

Learn the JS basics before creating a bot

earnest phoenix
hasty sparrow
#

?

earnest phoenix
#

I mean that's the best I could do considering the field limit

delicate shore
#

Learn the JS basics before creating a bot
@hasty sparrow bruh i made a whole bot and left that becasue of one command but now i copied pasted from my old poject and it's not working https://hatebin.com/pwdnhnkoba

hasty sparrow
#

What is the error message?

delicate shore
#

What is the error message?
@hasty sparrow no error msg

#

none of the music commadn is working

spare mirage
delicate shore
#

i sent you the music command

#

rest are in other folders

hasty sparrow
#

@spare mirage Log props and check what properties it has

weary anchor
#

@weary anchor but, before, using azul eval message.author.flags.toArray() made it send Result: HOUSE_BRAVERY now that doesnt work either
@earnest phoenix you can check if result is a Promise or not. then await only if it is a promise.

spare mirage
#

how

hasty sparrow
#

console.log?

delicate shore
#

console.log?
@hasty sparrow i did but nothig

spare mirage
#

oh ye lmao

hasty sparrow
#

Not you, I meant Justii

weary anchor
#

hmm

spare mirage
#

I always forget console

#

xD

weary anchor
#

weird

rose talon
outer tulip
#

I'm using Firebase for db. So guildCreate is used to put data of a new guild. How would I put data of a guild that was there before
I tried guildUpdate but didn't work I don't even think it is guildUpdate

spare mirage
#
[Commandlogs] Loaded 3 commands of module fun
{
  name: 'size',
  description: 'this is a fun command!',
  execute: [Function: execute]
}
F:\Users\Edwin\Desktop\Banana\index.js:28
props.conf.aliases.forEach(alias => {
           ^

TypeError: Cannot read property 'aliases' of undefined``` it loaded the commands in my fun folder
hasty sparrow
#

@delicate shore Debug your bot, simple as that

#

@spare mirage Check the other commands, they are clearly missing properties that are present in the fun commands

earnest phoenix
digital ibex
#

@spare mirage , you really need to learn javascript, you've been here asking the simplest of issues you'd know if you even spent an hour trying to learn.

earnest phoenix
#

idk why

hasty sparrow
#

@earnest phoenix Tried googling?

earnest phoenix
#

tried

#

nothing

weary anchor
#

@earnest phoenix I have an eval command, you can yoink it if you want LOL

earnest phoenix
#

went to stackoverflow

spare mirage
#

@digital ibex im learning it while doing this stuff ยฏ_(ใƒ„)_/ยฏ

earnest phoenix
#

but they are not helpfull

digital ibex
#

it explicitly says on the d.js docs to learn then make a bot

spare mirage
#

ยฏ_(ใƒ„)_/ยฏ

#

fk the rules!

digital ibex
earnest phoenix
#

smh no help

weary anchor
#

you're gonna have to suffer a lot during development if you think like that @spare mirage

indigo folio
#

i think its ok either way but u should prolly google it before asking in here

#

this place can get kinda toxic

spare mirage
#

@weary anchor that obviously was a joke

weary anchor
#

mine too

#

xD

spare mirage
#

xD

earnest phoenix
weary anchor
#

edits for the win

earnest phoenix
#

inspect?

digital ibex
#

@earnest phoenix I just googled your error and find something related to that catshrug

weary anchor
earnest phoenix
#

yep

#

Should I only do e.name + e.message

weary anchor
#

use error.name and error.message

#

yea

spare mirage
#

@spare mirage Check the other commands, they are clearly missing properties that are present in the fun commands
@hasty sparrow I dont think they do... they all work the same

hasty sparrow
#

Clearly they don't or you wouldn't have the error

#

You either forgot the property, forgot to export it, have a typo or are looking in the wrong directories

digital ibex
#

How can I move the stuff to the middle and not keep it on the left?

weary anchor
#

align them to the center?

digital ibex
#

my html: html <div class="tabs is-boxed"> <ul class="tab"> <li> <a> <span class="icon is-small"><i class="fas fa-film" aria-hidden="true"></i></span> <span>Online Chat</span> </a> </li> <li> <a> <span class="icon is-small"><i class="far fa-file-alt" aria-hidden="true"></i></span> <span>URL Shortener</span> </a> </li> </ul> </div>

#

my css: css .tabs { background-color: rgba(235, 233, 233, 0.253); text-align: center; } .tab { display: inline-block; } and yes @weary anchor

onyx minnow
weary anchor
#

I mean, align them lol

hasty sparrow
#

Bulma?

weary anchor
#

@digital ibex hm I'm not so good with frontend design. but I'd probably use flexbox to align them

spare mirage
#

@hasty sparrow what if I declare props outside of the forEach

hasty sparrow
#

What about it?

spare mirage
#

nvm

thin bolt
#

I'm trying to make progress bar:

User Earned:180

It's working with this correctly, because i set width 250, but Needed XP is always changing. When i change width to that then Progress bar is going out of canvas!!

spare mirage
#

canvas is hard

thin bolt
#

yep

spare mirage
#

const Discord = require('discord.js')

module.exports = {
name: 'stats',
description: "this is a stats command!",
execute(Discord, bot, message, args){
}
}
is there anything wrong with this @hasty sparrow

digital ibex
#

wym @weary anchor

indigo folio
#

shouldn't the progress bar stay the same size though? and just scale the earned xp based on the required xp?

hasty sparrow
#

^

indigo folio
#

like why would the progress bar get wider over time

digital ibex
#

@spare mirage just ๐Ÿ‘ learn ๐Ÿ‘ javascript ๐Ÿ‘ please ๐Ÿ‘ then ๐Ÿ‘ make ๐Ÿ‘ a ๐Ÿ‘ bot

hasty sparrow
#

Cause you set it to <xp count>pixels, duh /s

restive pebble
#

lol

hasty sparrow
#

@spare mirage Regarding your error, yes, otherwise no

indigo folio
#

@spare mirage why are you taking in a variable called Discord in the execute function?

hasty sparrow
#

Cause he hasn't learned JS yet

spare mirage
#

uhh in m index.js file I have the standard require shit

#

ohh

#

I see

indigo folio
#

if you stop taking in a variable called Discord then it should work fine

#

either that or don't create a const at the top

spare mirage
#

I seee

#

imma delete the const :PPPPp

indigo folio
#

justii

#

if you have no experience with javascript, making a bot along the way is cool and all

#

but might i suggest maybe starting with just if/else statements rather than command handlers and such

spare mirage
#

Ree people told me this would work better than an endless if else :3

indigo folio
#

it does work better, but it takes more knowledge to understand

hasty sparrow
#

It does, but it also requires above base-level (Node)JS knowledge

spare mirage
#

:/

indigo folio
#

whereas if/else statements can be understood very easily

spare mirage
#

kinda annoying how I am just wasting my time

digital ibex
#

if else?? switch is for cool kids only ๐Ÿ˜Ž

hasty sparrow
#

Learning is wasting time?

indigo folio
#

get used to it

hasty sparrow
#

You're wasting more time trying to force things to work rn

indigo folio
#

as a developer, you don't even know the amount of projects you create and then scrap

#

i've wasted countless hours on projects i've just recycled

spare mirage
#

@hasty sparrow nah making this command handler im about to delete because it doesnt work

hasty sparrow
#

Your call, d.js guide has examples on how to create your own handler ยฏ_(ใƒ„)_/ยฏ

indigo folio
#

either switch to if/else or correct your command handler

spare mirage
#

on a not "super duper" advanced one yes

indigo folio
#

error messages are very useful by the way

spare mirage
#

They have tutorials on a command handler u use if else for

indigo folio
#

they generally tell you exactly what the issue is

spare mirage
#

but also different files

hasty sparrow
#

Exactly

digital ibex
#

you shouldn't use if/else for stuff like that

spare mirage
#

:/

#

:?

#

what the hecking duck in the name of god do I do

digital ibex
#

learn js

indigo folio
#

run bot
read error
fix error

digital ibex
spare mirage
#
           Everyone starts somewhere and asking questions is smart. Do not attack people for not knowing how to code. Point them to great learning sources and help them with problems.```
#

Do not attack people for not knowing how to code.

indigo folio
#

@earnest phoenix what is the error

spare mirage
#

:3

digital ibex
#

who is attacking/ spoonfeeding u?

spare mirage
#

u xD

indigo folio
#

you probably just don't have a proper message variable

spare mirage
#

learn js

indigo folio
#

"learn js" is not an attack

digital ibex
#

report them immediately!

pure saddle
#

learn js is not attack

indigo folio
#

its an actual statement

#

you literally need to learn js

#

you're not a beginner if you don't even start

#

so "don't attack beginners" doesn't apply to you

pure saddle
#

^^^

digital ibex
#

lmao thats great

earnest phoenix
#

guys how can I replace every record of 'SOMETHING' with 'EDITED'

indigo folio
#

str.replace()

spare mirage
#

-_-

pure saddle
#

send code

earnest phoenix
#

update node

#

@indigo folio What about objects

spare mirage
#

xD

hasty sparrow
#

@earnest phoenix You need node v12

weary anchor
#

guys how can I replace every record of 'SOMETHING' with 'EDITED'
@earnest phoenix str.replace(/SOMETHING/g, "EDITED") try this

digital ibex
#

idk, i didn't complete all of it

indigo folio
#

he said he is referring to objects

weary anchor
earnest phoenix
#

I'm talking about objects

digital ibex
#

i spent like 2 months on it

spare mirage
#

:3

#

imma just do this

#

lol

#

is it free??!??

digital ibex
#

yes

#

imo, its much better than codecademy

indigo folio
#

SoloLearn: Learn to Code for Free
is it free??!??

weary anchor
#

yes

restive pebble
#

yes lol

indigo folio
#

did u do npm i nodejs

restive pebble
#

lol

hasty sparrow
#

Mhh no

pure lion
#

CurSed

restive pebble
#

imagine installing nodejs with npm

pure lion
#

^

#

Head my shake

restive pebble
indigo folio
#

i was asking to ask, it was a legitimate issue someone had before

digital ibex
#

does anyone know how I can centre the things on the right of the page?

indigo folio
digital ibex
restive pebble
#

bruh momento

#

that wont update node js

#

lol

earnest phoenix
#

How i can discord the mongoose

digital ibex
#

my html: html <div class="tabs is-boxed"> <ul class="tab"> <li> <a> <span class="icon is-small"><i class="fas fa-film" aria-hidden="true"></i></span> <span>Online Chat</span> </a> </li> <li> <a> <span class="icon is-small"><i class="far fa-file-alt" aria-hidden="true"></i></span> <span>URL Shortener</span> </a> </li> </ul> </div>

#

u wot

earnest phoenix
#

disconnect

#

i mean

#

not discord

restive pebble
#

lol

hasty sparrow
#

@digital ibex Are you using a CSS library?

earnest phoenix
#

:))

#

How i can disconnect the mongoose

digital ibex
#

a framework

hasty sparrow
#

Which one?

restive pebble
#

center tags are depreacated

#

tho

digital ibex
#

this is my css: css .tabs { background-color: rgba(235, 233, 233, 0.253); text-align: center; } .tab { display: inline-block; } a framework for flexbox btw, so css > flexbox > bulma

#

im using bulma

hasty sparrow
#

Tried googling? There are a bunch of answers that provide the CSS

digital ibex
#

yeah, it says: parent - text-align: center; child -display: inline-block;

#

but it still doesn't centre so im kinda confused

hasty sparrow
digital ibex
#

1 sec

hasty sparrow
#

Uninstall the old one first

digital ibex
#

the cdn

hasty sparrow
digital ibex
#

oH, i didn't see that thanks :D

hasty sparrow
#

Did you follow the installation instructions?

earnest phoenix
#

I'm gonna make my bot able to execute python even though it's coded in nodejs

pure lion
#

Wait you can do that?

earnest phoenix
#

You can

pure lion
#

:o

earnest phoenix
#

maybe I should allow multiple languages

#

ill ping u when i make the py eval

#

what is 1+1

#

Hello, I have already made the join logs, How do I have my bot send me an invite to the server it joined?

slender thistle
#

0

earnest phoenix
#
module.exports = {
    async execute(Bot, guild) {
 
        Bot.config.logChannels.map(ch => {
let userSend = bot.users.cache.get("694367588464984095")
              channel = Bot.channels.cache.get(ch)
              channel.send(`Joined Guild - ${guild.name} With ${guild.memberCount} Members!`)
    userSend.send(`Joined Guild - ${guild.name} With ${guild.memberCount} Members!`)
          })

    }
}```
#

What I have^

wise loom
#

eat my fat buuttt

earnest phoenix
#

I want it to include the server invite link it joins.

#

@wise loom Nah

wise loom
#

pls

earnest phoenix
#

Nope.

wise loom
#

pretty pls

#

poopoo diareah i have diareah

modest maple
#

๐Ÿค”

#

@flat pelican 12yr old alert

earnest phoenix
#

yh he's defo underage

#

no excuse for acting like that

vale garden
#
const Discord = require('discord.js')
const db = require('quick.db')

module.exports = {
    name: 'add',
    description: "adds money into someone's balance if you have perms",
    execute(message, args) {

      let ownerID = '@vale garden'

      if (!(message.author.id === ownerID)) {
        return message.channel.send(`Only ${ownerID} (Bot Owner) can use this command lol.`)
    }

    if (!args[1]) return message.reply('Please specify an amount to add.')
    if (isNaN(args[1])) return message.reply('That was not a valid number!')

    let user = message.mentions.users.first() || message.author
    message.channel.send('Successfully added ' + args[1] + ' to ' + user)
    db.add(`money_${message.guild.id}_${message.author.id}`, args[1])


    }
    }

#

this is my code but it isnt working even for me

#

lol

solemn latch
#

Whats not working

ebon kelp
#

error?

earnest phoenix
ebon kelp
#

What is says

wary flame
#

@vale garden your user id is 394320584089010179 so when you run the command msg.author.id would be 394320584089010179, since you have included the <@> in your ownerid let (required for mentioning) that will never match an id that consists of just numbers. 394320584089010179 is not equal too <@394320584089010179.> . is to prevent mention

earnest phoenix
#

What is says
@ebon kelp that's not the best way to do that

ebon kelp
#

Ikr

#

But if he/she prefers it that way, be my guest

earnest phoenix
#

if (message.author.id !== ownerID) easily could do that

mild flower
#

How to make an IF statement that only runs a case if the person has admin rights?

#

Please @ me if u want to help

solemn latch
#

Depends on the library

ebon kelp
#

if (!message.member.hasPermission("ADMINISTRATOR")) return;

#

That's what I use

wary flame
#

@mild flower ^

solemn latch
#

Also, if you google it, its like the first result

mild flower
#

hmm

#

sorry

#

Im just new to javascript

ebon kelp
#

People ask too much before using ๐ŸŒŸ The Internet ๐ŸŒŸ

lyric mountain
#

thx cry

earnest phoenix
#

๐Ÿงš: ๐ŸŒŸ people here don't like doing stuff for themselves and instead act like children depending on mommy ๐Ÿงšโœจ

ebon kelp
#

asking > tutorials > learning javascript 1head

delicate shore
#

wot

#

how to unban

#

anyone

earnest phoenix
#

stop making up your own methods and properties and read the docs

ebon kelp
delicate shore
#
if(command === "unabn"){
    let reason = args.slice(1).join(' ');
  
  let user = args[0];
    
  if (!reason) return msg.reply('You must supply a reason for the unban.');
  if (!user) return msg.reply('You must supply a User Resolvable, such as a user id.').catch(console.error);
    if(msg.member.hasPermission("BAN_MEMBERS")) return msg.reply("**Bruh You don't have perms to Ban Members so technically you can't unban them either**")
 .guild.members.unban(user);
      
    const unban = new Discord.MessageEmbed()
    .setColor("#7289DA")
    .setAuthor(user.author.tag, user.author.displayAvatarURL())
    .setDescription(`Member Succesfull Unbanned!`)
    .addField(`Member Unabnned : ${user}`)
    .addField(`By : ${msg.author}`)
    .addField(`Reason : ${reason}`)
  .setFooter(`s!help`);
      msg.channel.send(unban)
    console.log();
    };
#

pls help it's not working

ebon kelp
#

unabn

still merlin
#

we cant help you without a error