#development

1 messages · Page 860 of 1

earnest phoenix
#

i didnt put "public class"

#

thanks anyway

#

its working

modest crane
#

well

#

remember to save your token in a safe place, not in the code lol

earnest phoenix
#

@earnest phoenix your bot's token matters more than all your bot does inside it...
So make sure to keep it in a extremely safe place...

#

okay sorry i didnt knew it

#

It's ok...

#

its working now

#

Nice

#

how to get bot developer rank

#

You mean the role?

#

yes

mossy vine
#

have a bot approved on the site

earnest phoenix
#

You need to make a good functioning bot and submit it to top.gg and then wait 2 weeks for the bot to be reviewed and approved... Then you'll get the role @earnest phoenix

#

i have question

mossy vine
#

ask

spice pier
earnest phoenix
#

ok

#

so i can leave sereve?

#

server

copper cradle
#

no, you're trapped in here

earnest phoenix
#

seht

#

How do I make it so that the shard respawns if it died out? I’m using d.js v12

tired nimbus
#

In java Most classes need to be imported before they can be used in an app. Why is every app allowed to use classes System and String without first importing them?

regal saddle
#

if you using Shardmanager if does already by itself

#

i guess

turbid bough
#

anyone know what exactly "Server Member Intent" is?

amber fractal
#

it includes those events

#

for event intents

regal saddle
#

steven

#

how i can i show a pfp again in .setThumbnail?

turbid bough
#

so, for example when a user joins, and i track that in-code, i would have to specify i have server member intent?

amber fractal
#

use displayAvatarURL() on the user object in v12

regal saddle
#

kk, thx

amber fractal
#

@turbid bough Yes because that'd be a GUILD_MEMBER_ADD event

turbid bough
#

but if i track users that use the command, then its fine?

#

ok i just realized i did something very stupid

amber fractal
earnest phoenix
#

I accidentally did !prefix level

#

and then levelprefix or smth

#

and i can't use my commands

idle mountain
#

which bot?

earnest phoenix
#

betterantispam

idle mountain
#

this bot? @toxic bramble

earnest phoenix
#

obv

idle mountain
#

welp. that invite is invalid

earnest phoenix
#

yeah

idle mountain
#

well, here's the website, it might answer your question: https://antispambot.io/
people here can't really help you though

#

this is a general server for top.gg, not the support server for any specific bot

gritty bolt
#

I want to make a command that makes a voice channel or text channel with embed, then changes/renames it every minute (its a world clock) indefinitely. Where would be some good resources for this?

crimson vapor
#

Umm

#

I dont know if that is API abuse

gritty bolt
#

thats actually a good point

#

i've seen bots that do that for new members thoigh

#

though*

#

if I did it every 30/60 minutes would that be an issue?

earnest phoenix
#

Idk if it might be an issue if it's between 30 to 60 minutes in every change but i think every 2 hours wouldn't be a problem at all

crimson vapor
#

new members are not as often

sudden geyser
gritty bolt
#

hmm

#

i think I might gonna consult discord on this one

#

or think of a better idea

ember atlas
#

Having a bit of trouble with VSC version control wondered if someone can help. It will not let me merge my branches together, it says they are up to date, but I am looking at it and they are not

#

Just in general, via command line i get the same thing

modest maple
#

@gritty bolt we run a bot that does that, ratelimit is generally fine we have a 3 second min cool down between renaming but often longer cuz loops

#

Just btw

#

it is no small feat

gritty bolt
#

alrighty cool then

#

i think I'm gonna go with a "server time" idea instead

#

updates every 30 minutes and i've gone ahead and asked for discord's approval just in case

#

wdym edit commands?

earnest phoenix
#

@earnest phoenix like an auto censoring function?

#

Hmm idk how to do that one tho lmao...

gritty bolt
#

you could just make a filter

#

and if theres an exact match give them a mute role

#

i actually tried this with an AI lol

#

didnt go so well

earnest phoenix
#

Or maybe bulkDelete the message that matches the stored words

gritty bolt
#

if your bot is online then yes

#

but you have to put code in and host it/run it before it'll go online

earnest phoenix
#

If your bot is being hosted and online and doesn't exit the hosting process it will stay online

#

Hmm Pc or mobile?

#

Hmm you can use glitch.com or...
Visual studio code...

gritty bolt
#

i'd just look up a hosting tutorial

#

on youtube

earnest phoenix
#

Hmm a new dev you're? @earnest phoenix

#

@earnest phoenix also making and hosting a bot in PC will be much easier than doing it on a phone...
I'm doing it on android using Termux but it's harder than hell so yeah...
If you want to start up with the coding process just watch a tutorial on YouTube...

gritty bolt
#

ok this is really random but does anyone know how to reset the code formatting on IntelleJ IDEA

#

it's being dumb and i cant find out how to reset it

earnest phoenix
#

(I literally have no idea)

gritty bolt
#

its literally forcing wrong indentation

#

lol

#

its not too bad

#

just keep trying

#

😄

#

to host your bot?

#

or code it?

earnest phoenix
#

@earnest phoenix you want to code on which library?

#

discord.js, Eris, etc etc

crimson vapor
#

ah yes

#

node is the best language

earnest phoenix
#

@woven sundial i mean... (I said discord bot library)

crimson vapor
#

well

#

not exactly

earnest phoenix
#

@woven sundial also you need a library to build your bot with lmao...

crimson vapor
#

well

#

not really

earnest phoenix
crimson vapor
#

but as tim said, using websockets directly it not fun

earnest phoenix
#

Yea... discord.js is the best in my opinion

crimson vapor
#

your bot has been through a lot of mutes

earnest phoenix
#

@crimson vapor whos bot lmao?

crimson vapor
#

Icero's

earnest phoenix
#

Hmm i see

earnest phoenix
#

So... Did you decide to use glitch.com or visual studio code? @earnest phoenix

#

@earnest phoenix so you'll need the following:
discord.js
nodejs

#

Hmm nice

elder vine
#

VPS is not all too expensive

earnest phoenix
#

Now do you have a folder for your bot? @earnest phoenix

#

Do you see a folder inside that that's named Node_modules?

#

Now we can get to work...

#

@earnest phoenix nah that would take way too long lmao

#

So do you have these following files in that folder:?
package.json
package-lock.json
index.js
@earnest phoenix

#

Well you have to create that file yourself and store your code inside it and initiate it with nodejs so anyways

#

So did you name the index.js something else or it's the same as index.js? @earnest phoenix

#

Hmm can you show me an screenshot of your bot folder? @earnest phoenix

crimson vapor
#

here is fine tbh

earnest phoenix
#

Hmm k let's do this in DMs because this is gonna be way too long @earnest phoenix

warm marsh
#

Would using CRON for an automatic daily command be a good idea?

#

For lets say premium users/voters.

west raptor
#

huh?

#

cron is for timed system commands

warm marsh
#

CRON is a scheduling 'thing'.

west raptor
#

yes I'm aware

warm marsh
#

So there literally isn't nothing stopping me from making it run a script that does as I said.

#

Just wondering if it's a good idea.

west raptor
#

unless you're updating your databases through system commands

#

it seems super redundant

warm marsh
#

I've not thought of it full yet but it's templated.

graceful mantle
#

I need some help, I just started my own discord server for me and my friends

#

And I'm super confused with this library thing

#

I can't find good sources either it's really hard

west raptor
#

library is something that basically helps you do something

#

in terms of a discord library it wraps around the discord api

earnest phoenix
#

you need to have programming knowledge and you need to know a programming language if you want to get started out with those

graceful mantle
#

yeh I got quite a bit xp in programing

west raptor
#

what language?

graceful mantle
#

sorry new keyboard

#

c#, java, webdev, serverbased

warm marsh
#

Use the .NET wrapper or JDA.

graceful mantle
#

It's just I'm so confused over some spesific's in JS

warm marsh
#

.NET for C# and JDA for Java.

#

Using JS. oof

earnest phoenix
#

c# is a part of .net by the way

west raptor
#

@graceful mantle if you already have experience in Java why not just use that

#

or c#

graceful mantle
#

sorry i'm lagging a bit

#

Oh no I feel I'm done

#

I wanna learn JS it seems fun

#

but painful

crimson vapor
#

it is tbh

west raptor
#

ah

#

there's discord.js and eris

#

eris is slightly more advanced

graceful mantle
#

yeh so I got a js code I don't know... what it is?

#

maybe it's eris then...

earnest phoenix
#

you know any sane logic from c# and java? scrap that lol javascript is the total opposite, full of dumb concepts

crimson vapor
#

most js reads out in english well

warm marsh
#

The code shouldn't need to be read out well, That's the whole point of commenting.

graceful mantle
#

what kind of code is this? ```js
var Discord = require('discord.io');

west raptor
#

that's a variable

graceful mantle
#

I mean it's not discord.js

west raptor
#

don't use it

graceful mantle
#

oh no

#

o h oh no

#

thats why it so hard to get data

west raptor
#

I really recommend learning JavaScript and nodejs first tbh

#

before starting this

crimson vapor
#

I mean

#

I would yes

west raptor
#

since you're coming from c# and Java background it's gonna be hell

crimson vapor
#

I didnt

west raptor
#

I didn't either

#

but it's not like.. ideal

crimson vapor
#

it was hard tbh

#

wait

#

when did you start js Dream?

west raptor
#

first programming language I learned

#

early 2018 maybe?

crimson vapor
#

so you were 13 or 12?

earnest phoenix
#

I'm working on a music player for my bot, And I keep getting a "Could not extract html5player key:" error, Anyone know how to fix this?

west raptor
#

13 yes

crimson vapor
#

same

#

I think

west raptor
#

I'm 14 now tho, I mostly code in rust now

#

JavaScript bad

#

@earnest phoenix language? where's the error coming from? code?

crimson vapor
#

I want to learn more about it just as a first language

earnest phoenix
#

js, and its happening when I start the song

west raptor
#

yes but like

earnest phoenix
west raptor
#

what line of code is causing it

earnest phoenix
#

IDK

crimson vapor
#

what lib are you using for getting the yt music?

earnest phoenix
#

simple yt

crimson vapor
#

Dream do you know what that is?

west raptor
#

no

#

I've never made like a legitimate music bot

crimson vapor
#

I am working on my own atm

west raptor
#

@earnest phoenix use ytdl

crimson vapor
#

but I use ytdl

earnest phoenix
#

ok, Thanks!

crimson vapor
#

and im just doing it as a joke

#

there are so many thing I should do to make it better

west raptor
#

@crimson vapor since you seem atleast somewhat experienced I would recommend using like lavalink

earnest phoenix
#

disgOStANG

crimson vapor
#

I dont think I will tbh

earnest phoenix
#

lavalink is bloated

#

and it's java

crimson vapor
#

ytdl just gets exactly what I need

west raptor
#

fair

crimson vapor
#

and I have a small bot

#

so I will be fine

#

by small I mean 34 guilds

west raptor
#

I kinda wanna make something similar to lavalink actually

#

would be fun

#

but also not in Java :>

crimson vapor
#

Roki is woking on a node

#

im not sure how its gonna work

earnest phoenix
#

i made something like lavaplayer in c#

#

lavalink is just a web wrapper around lavaplayer

crimson vapor
#

so you can do requests?

earnest phoenix
#

yup

crimson vapor
#

hmm

earnest phoenix
#

i still don't like using lavalink because you have to install a java runtime to run it

#

and it hogs ram

crimson vapor
#

what do you think about ytdl? if you use js

earnest phoenix
#

i don't use it

crimson vapor
#

what do you use?

earnest phoenix
#

YoutubeExplode; tldr ytdl is a scraper for the public youtube api that you use when you watch videos etc etc, YoutubeExplode does the same like ytdl except it's a library in c#

#

so i don't have to depend on another binary file for my code to run

crimson vapor
#

oh

earnest phoenix
#

the only binaries i depend on are opus, sodium and ffmpeg

crimson vapor
#

what does sodium do?

earnest phoenix
#

it's what discord requires to encrypt voice packets

crimson vapor
#

oh

graceful mantle
#

@west raptor so u been at it since 2018?

#

is that when u got your degree or just hobby

crimson vapor
#

he is 14 rn

west raptor
#

well I'm 14 so

#

also she*

crimson vapor
#

O

#

my bad

graceful mantle
#

lol

west raptor
#

all good lol

graceful mantle
#

wait yall are below 20?

crimson vapor
#

ye

graceful mantle
#

bruh i'm more certified then half the chat wtf... thats a new one

#

guess i'm getting old

#

yall kids like vine right?

#

jk jk

crimson vapor
#

Lol

#

one sec ima paste my code in here I want to know what people think

graceful mantle
#

okay wanna be apart of the cool kids club?

#

don't use pastebin

#

use hatebin

crimson vapor
#

we know

#

I use code blocks when I can

earnest phoenix
#

i feel like people who buy pastebin pro eat dollar bills for breakfast

crimson vapor
#

why do you need pastebin pro?

#

you can create your own at that rate

earnest phoenix
#

exactly

sudden geyser
#

pastebin has more buttons so people click on that site instead when the paste fails on hastebin

crimson vapor
#

how does a paste fail?

graceful mantle
#

bruh

earnest phoenix
#

hastebin is often down

#

but that's why there are forks of it

graceful mantle
sudden geyser
crimson vapor
#

bro wut

#

I dont use strict

west raptor
#

hastebin always felt slow for me tbh

crimson vapor
#

it is a bit slow

sudden geyser
#

half the time the paste button doesn't work for me

crimson vapor
#

just ctrl v

pine bear
sudden geyser
#

where did you repeat it

earnest phoenix
#

do you expect us to use our superbrain to know your code

west raptor
#

yes, we read minds here at dbl

pine bear
#

XD

crimson vapor
#

probably a message.channel.send(message.channel.content)

pine bear
#

no

crimson vapor
#

with no if (message.author.bot) return

pine bear
#

something like this.

module.exports = {
    name: '^',
    description: '^',
    execute(message, args){
        message.channel.send("^");
    }
}
crimson vapor
#

ok I see

sudden geyser
#

can you show your message event

crimson vapor
#

you dont have a if (message.author.bot) return

#

you need that

pine bear
#

oh, that makes it not reply to other bots.

crimson vapor
#

yes

#

message is the message
message.author is the author
message.author.bot is a boolean if it is a bot, true

pine bear
#

oh, I see

cinder oxide
#

Alright, I'm using Eris and I just started sharding.
I have this piece of code below.

client.on("shardPreReady", (id) => {
  console.log(`Shard ${id} booted.`);
  client.createMessage('697814432637517855', { embed: {
    color: 0x000,
    title: "Shard Booted",
    description: `Shard ${id} containing ${client.guilds.filter((g) => g.shard.id = id).length} guilds         booted.`
  }})
})```
The description will always give an output of ``Shard idHere containing 0 guilds``.
When I eval ``client.guilds.filter((g) => g.shard.id = 0).length``, it returns 57.
#

So I'm confused as to why it always outputs 0 guilds in the shardPreReady event but 57 in eval

crimson vapor
#

none of the guilds are saved

#

I think

#

if its preReady, guilds would not be cached. is this d.js?

cinder oxide
#

eris

west raptor
#

client.guilds will only return that shards guilds

#

filtering it is useless

cinder oxide
#

I'd like to find the number of guilds in a shard though

crimson vapor
#

also, I think if its like d.js, it will return 0

#

is there no "shardReady"?

cinder oxide
#

there is

#

ah, Imma try doing that in the shardReady event

analog junco
#

How to clean all messages sent by bot in my dm? (Discord.js)
can you send the code to DM?
I have tried a lot, but all of them fail and ask.

earnest phoenix
#

you can't without constantly spamming requests - which will eventually lead to an api ban

#

also no

#

nobody will spoonfeed you

west raptor
#

how to get API banned 101

crimson vapor
#

when ever someone asks a question expecting code, just explain it in broken english

west raptor
#

why

cinder oxide
crimson vapor
#

so they have to fix the english then figure out the code

cinder oxide
#

I put the guilds count per shard into the shardReady event and it gave the number of guilds in the shard successfully. Thanks y'all!

pine bear
#

I think I put if (message.author.bot) return; in the wrong place.

crimson vapor
#

maybe

sudden geyser
#

@cinder oxide by the way, you're doing assignment in that filter.

cinder oxide
#

uh wot?

crimson vapor
#

What api should I use to search the youtube site?

lyric mountain
#

What api should I use to search the youtube site?
@crimson vapor youtube api

#

there's actually one

crimson vapor
#

thats a lot of work to use the youtube api

#

is there any wrappers that are good?

#

are*

lyric mountain
#

or google search api, in which you can specify websites to search in

#

google api has a wrapper iirc

#

maybe youtube has one too

#

but it isn't too much work to use raw youtube api

#

like

#

you'll just have to deal with json

#

which are quite straightforward

crimson vapor
#

hmm

#

ill look into it

lyric mountain
#

are you using js?

crimson vapor
#

yeah

lyric mountain
#

then it's trivially easy to work with google apis

#

including youtube's

crimson vapor
#

shh im small brain

lyric mountain
crimson vapor
#

still searching on an explanation on this

lyric mountain
#

there

crimson vapor
#

lol

valid gyro
#

Is this the right place to ask for help?

lyric mountain
#

depends

#

just ask

valid gyro
lyric mountain
#

is your procfile configured correctly?

#

also, is the index file placed in the right place?

valid gyro
#

index is in the folder i commited with git so yes

lyric mountain
#

no, I mean

#

index should be in the root folder

valid gyro
#

oh yee

#

procfile is web: echo "I don't want a web process" service: npm start

lyric mountain
#

do you have a log that we can read?

valid gyro
#

log error string from heroku

lyric mountain
#

can you run your bot locally?

valid gyro
#

yes

#

runs fine locally

lyric mountain
#

may I see your project tree?

#

I guess it's something with your path

valid gyro
#

Sure, I just have no idea how to show that lol

lyric mountain
#

the IDE you're using has a file browser to the left

#

print that

valid gyro
#

I did this in notepad 😆 im new to this

lyric mountain
#

you.....

#

programmed in notepad?

valid gyro
#

yes....I have sinned

lyric mountain
#

lol

#

you said your project was uploaded to github, right?

#

is it public?

valid gyro
#

not public and not all of it on github, only bits and pieces

icy crane
#

im trying to make my bot get CPU usage with os and os-utils, and im not really sure which seems more reasonable, i have a r 5 3600 for context

0.8% CPU Usage.
CPU Usage (%): 0.03363023391326059
valid gyro
#

and the files that are there are super outdated

lyric mountain
#

lol that's not how it works

#

you gotta upload EVERYTHING to github

valid gyro
#

im not running off of github per say

lyric mountain
#

ik

#

but you're using github to upload to heroku, right?

valid gyro
#

heroku git

#

using the heroku client

lyric mountain
#

and your whole project was uploaded to heroku?

valid gyro
#

as far as I know

lyric mountain
#

ok, then it must be something else

#

everything the log says is that it couldn't find the module named 'app/index.js'

#

try ./app/index.js

#

im trying to make my bot get CPU usage with os and os-utils, and im not really sure which seems more reasonable, i have a r 5 3600 for context

0.8% CPU Usage.
CPU Usage (%): 0.03363023391326059

@icy crane language?

icy crane
#

Js

#

os and os-utils are part of node

#

well os is

#

had to install os-utils

valid gyro
#

in command prompt?

#

or with git?

#

im confused af

lyric mountain
#

in command prompt?
@valid gyro in your code

valid gyro
#

so change the name of my index file to that...

lyric mountain
#

download this please

#

with an IDE you might be able to find the error

#

so change the name of my index file to that...
@valid gyro no

#

change where it's being called

#

search for 'app/index.js' in your files

#

@icy crane and the issue is that both give different values?

valid gyro
#

no results.....

icy crane
#

well theyre different methods that i have tried so far, and idk which to believe lol

lyric mountain
#

@valid gyro download that ide, it'll let you search in all files

valid gyro
#

ok

lyric mountain
#

well theyre different methods that i have tried so far, and idk which to believe lol
@icy crane maybe one is giving you the total CPU usage, while the other is giving a single core usage

valid gyro
#

ight installed

icy crane
#
const os2 = require('os-utils')

os2.cpuUsage(function(v) {
  console.log( 'CPU Usage (%): ' + v);
});

This is one function that im using

lyric mountain
#

I'd believe the first output is correct

#

the other is too low to be true

icy crane
#

alright, so 0.8 seems more accurate

crimson vapor
#

well not exactly

valid gyro
#

Now....

#

hiw do i search in the IDE

lyric mountain
#

open your project in vs code

#

then go to the upper menu

#

and click search

crimson vapor
#

0.8 could be cpu usage out of 100 where 0.03 could be per thread

lyric mountain
#

0.8 could be cpu usage out of 100 where 0.03 could be per thread
@crimson vapor js is mono thread

crimson vapor
#

hmm

icy crane
#

yeah

crimson vapor
#

what is the function is uses to get cpu usage

icy crane
#

is pm2 list's values accurate or do you know?

#

and I got the first one off of the interwebs

#

here 1 sec

#

ill show you

valid gyro
lyric mountain
icy crane
#
const cpuusg = `\`${(process.cpuUsage().system / 1000000).toFixed(2)}%\`` + " CPU Usage";
lyric mountain
#

The native module os can give you some memory and cpu usage statistics.

var os = require('os');

console.log(os.cpus());
console.log(os.totalmem());
console.log(os.freemem())

The cpus() function gives you an average, but you can calculate the current usage by using a formula and an interval, as mentioned in this answer.

#

so I guess 0.8% is the average usage

#

which I'd stick with

#

since cpu usage isn't smooth at all

icy crane
#

alright

#

Went down to 0.45

#

seems pretty reasonable

valid gyro
#

Wow the IDE does make everything look cleaner

lyric mountain
#

it sure does

summer torrent
#

that's why notepad is bad

lyric mountain
#

I'd go even further and say that vs code isn't an actual IDE

earnest phoenix
#

vscode isn't a IDE but it's still really good for coding

lyric mountain
#

yes, i mean

#

if that looks a lot better

#

it can still get way better

#

but webstorm is paid, so....

valid gyro
#

now, how is it gonna help me figure out what is wrong

lyric mountain
#

unless you get an open-source dev license

earnest phoenix
#

Bruh just don't use thonny

#

probably my least favorite editor

lyric mountain
#

in which case you'll get it for free

cinder oxide
#

I've searched google and I don't see a solution to my simple question so here it is.
How would I get the first mentioned member in a message? (eris)
I tried message.mentions.members.first() but it cannot read property 'first' of undefined.

#

I just moved from d.js to eris so I'm not too familiar with eris just yet

valid gyro
#

theres a tutorial for that somewhere on the dicord.js site

#

oh nvmnd

cinder oxide
#

Mine is eris

valid gyro
#

yeah read that late

cinder oxide
sudden geyser
#

@cinder oxide mentions is an array of users (Array<User>).

#

You'd need to access the first element of the array. Even if you do, that could possibly not be the "first" mention of the message.

cinder oxide
#

[0] it then, and get the user ID, the members.get(id)

#

somehow solved it

earnest phoenix
#

how can i slice the message args?
it doesnt seem to be working
i want args[0] which is the user to not be part of the reason

cinder oxide
#

How does your command usage look like?

earnest phoenix
#

let user = message.mentions.users.first()
let reason = args.join(" ").slice(0)

crimson vapor
#

how does js cache stuff, lets say you make a new class, does it get cached until there is no way to call it or what?

cinder oxide
#

Change the reason's argument count then

earnest phoenix
#

idk how

#

it would slice some of the user id

#

but not all of it

cinder oxide
#

You can slice the first argument and join the rest for reason

crimson vapor
#

args.slice(1).join(" ")

#

is what you are looking for iirc

cinder oxide
#

Yep

pine bear
#

is there like an easy way to set up a "help" command?

cinder oxide
#

Define "easy way"?

crimson vapor
#

get all of the commands and make an array out of the commands with name - desc

#

giant list

earnest phoenix
#

Thanks, worked!

pine bear
#

like not typing down all the commands and what they do in a single string.

crimson vapor
#

np

earnest phoenix
#

I didn't use it in a long time lmao

crimson vapor
#

do you use client.commands as a map?

#

or collection

pine bear
#

collection

crimson vapor
#

because if so, you can do client.commands.map(c => ${c.name + c.description}).join('\n')

#

which takes them all

#

creates a string

#

and joins it with the new line syntax

cinder gulch
#

can also query parameters.

pine bear
#

would that be inside a message event?

cinder gulch
#

yeah? I mean you could construct it ahead of time

#

and even if you dont you should probably cache it.

#

I currently build an embed, and I'm pretty sure those are safe to cache.

crimson vapor
#

you can also send embed objects

#

which is microseconds faster

cinder gulch
#

embeds are neat, but I wish I could make the section titles bigger.

golden condor
#

With discord.js and node, how can I lower memory usage

#

I am worried as it has gone up to 1.2GB for only 154 servers

cinder patio
#

best solution would be to not cache any discord objects like Channels, Users, Members etc..

summer torrent
#

what can be cause of creating multiple processes. After pm2 restart 0, my bot starting to reply with multiple responses

pine bear
#

what is the color hex for message embed red?

cinder patio
#

sharding

golden condor
#

@cinder patio how do I stop it caching in discord.js

#

@pine bear full red is #FF0000

#

Or you could just type

#

'Red'

pine bear
#

ok

cinder patio
#

I guess you have to modify the library itself, you can only stop the caching of messages

#

have you done that?

golden condor
#

Like?

#

Wdym by that

cinder patio
#

In the client options you can do messageCacheMaxSize: 0 to stop the caching of messages

#

Every text channel stores the last 200 messages by default

#

if you don't need em disable it

golden condor
#

Oh I don't need that

#

I could also turn off fetchAllMembers right?

#

And only pull them when I need them

cinder patio
#

It's false by default

golden condor
#

Oh

crimson vapor
#

thats actually so useful tbh

golden condor
#

What else could be using up memory

crimson vapor
#

because not many bots use messages

golden condor
#

I should make a voice channel disconnect event for timeout

cinder patio
#

Well.. discord.js also caches all emojis and presences

golden condor
#

Not have it check when we a message is sent

cinder patio
#

there's no way to disable them though

golden condor
#

Every time a message is sent

#

I check if any guild has a vc with only my bot in it

cinder gulch
#

cant you just replace the calls that ca he the things with functions that do nothing?

cinder patio
#

That's not a good idea imo

golden condor
#

Which one

cinder gulch
#

sure. Its a terrible idea. but it would disable the cache :P

cinder patio
#

I check if any guild has a vc with only my bot in it

golden condor
#

Yeah ik

#

That's probably using up a lot of ram

cinder patio
#

I'm sure there is an event where the user disconnects from the voice channel.. you should check if the voice channel is empty there

golden condor
#

Yeah but idk

#

I could make it when a song ends

#

It checks if anyone is in the vc

#

And if not

#

It leaves

crimson vapor
#

O

golden condor
#

Since a song can't be a livestream

crimson vapor
#

I should add that

golden condor
#

No you shouldn't

crimson vapor
#

the check for users

cinder patio
#

I mean sure but still you are streaming a song that nobody is listening to and just wasting resources

golden condor
#

Ok

#

I mean the max song time is an hour

#

So the voice channel disconnect event

#

That exists right?

#

What is it called

#

like

#

And also, how do I make the event folder like run it as if it is an event?

cinder patio
#

voiceStateUpdate you have to check if there is a channel in the oldState and no channel in the newState1

golden condor
#

Oh

cinder patio
#

or connection, not entirely sure I've never used voice stuff

golden condor
#

And also, how do I make the event folder like run it as if it is an event?

#

I think I have the function there

#

Cos of the message.js event

cinder patio
#

Just add the code to it to it if you already have it for something else?

golden condor
#

I am gonna change the caching messages thing

#

And change the voice channel thing

#

Cos my memory usage is way to high

cinder patio
#

That's quite a lot for around 150 servers tbh

golden condor
#

Ik

cinder patio
#

yup

#

That sucks

crimson vapor
#

just delete everything

golden condor
#

I don't think it is just discord.js

#

Tho

twilit rapids
#

Use intents to prevent most of these events to even reach you

crimson vapor
#

how do you use them though?

#

im so confused

cinder patio
#

In the client options:

new Client({
  ws: {
    intents: [..intent names here]
} 
})```
crimson vapor
#

oh

#

technically, couldn't you just use only what you need then delete the message or channel or whatever in the cache after you are done?

cinder patio
#

yes, but intents are better because the object doesn't even get put in the cache in the first place, they don't even get processed

golden condor
#

The memory leak seems to happen gradually

#

When I restart it goes down ish

valid frigate
#

is djs supposed to leak memory if you don't add any client options at all

#

wouldn't that be a bug or

cinder patio
#

That's not really a memory leak

valid frigate
#

eh i guess

cinder patio
#

D.js just stores lots of objects, so it takes up memory

#

on purpose

summer torrent
#

eris doesn't use such as memory as d.js

valid frigate
#

no max cache size?

cinder patio
#

only for messages

golden condor
#

I will show my packages

valid frigate
#

i always thought djs would have some kind of limit on how big a cache can get

golden condor
#

I mean I don't think I need all of them

#

But something is using up tons of memory

#

Alot more than it should

valid frigate
#

uhhhh iirc can't you monitor node processes for this kind of stuff?

golden condor
#

How

crimson vapor
#

I found ws: { intents: [ "GUILD_MESSAGES", "GUILDS" ] } lowers ram a lot

golden condor
#

I need dms tho

valid frigate
#

weird

crimson vapor
#

then add dms

golden condor
#

and Guild bans

#

And guild invites

cinder patio
#

But then guilds don't get cached

golden condor
#

Is that a good thing?

cinder patio
#

There are definitely going to be side-effects, it really depends on the purpose of your bot and if you are using the related features to the intent

crimson vapor
#

as of now, my bot only needs guild messages

#

so I need guilds and guild messages

earnest phoenix
#

please help me canvas console error js (node:12028) UnhandledPromiseRejectionWarning: Error: ENOENT, No such file or directory './wallpaper.png'

cinder patio
#

Where is test called from? Like from which directory

earnest phoenix
#

they are in the same directory

#

but now it's improved

#

now he has another fault

#
(node:14440) UnhandledPromiseRejectionWarning: Error: Unsupported image type```
pine bear
#

would this work?

module.exports.run = async (client, message, args) => {
    if(args[0] == 'help') return message.channels.send(`Just do ${prefix}help instead.`);

    if(args[0]) {
        let command = args[0];
        if(client.commands.has(command)) {
            command = client.commands.get(command);

            var hEmbed = new Discord.RichEmbed()
            .setColor('blue')
            .setAuthor('She-Ra HELP', message.guild.iconURL)
            .setDescription(`My prefix is ${prefix}\n\n__**Command:**__ ${command.config.name}\n__**Description:**__ ${command.config.description || 'No Description' }\n__**Usage**__${command.config.usage || 'No Usage'}\n__**Accessible By**__${command.config.accessibility || 'everyone'}\n__**Aliases**__${command.config.noalias || command.config.aliases}`)
        }}

    if(!args[0]) {
        message.delete();
        let embed = new Discord.RichEmbed()
        .setAuthor('Help Command!', message.guild.iconURL)
        .setColor('red')
        .setDescription(`${message.author.username} check DMs`)

        let Sembed = new Discord.RichEmbed()
        .setColor('blue')
        .setAuthor('She-Ra HELP', message.guild.iconURL)
        .setThumbnail(client.user.DisplayAvatarURL)
        .setTimestamp()
        .setDescription(`Here are all the commands for ${client.user.username}\n the prefix is ${prefix}`)
        message.channels.send(embed).then(message => message.delete(10000));
        message.author.send(Sembed)
    }
}

module.exports.config = {
    name: 'help',
    aliases: 'h, commands',
    description: 'util',
    usage: 'c!usage',
    noalias: 'No Aliases',
    accessibility: 'Members'
}
scenic kelp
#

Run it and see

#

@earnest phoenix is wallpaper.png actually a png

earnest phoenix
#

yes

pine bear
#

it does, but. Not really.

earnest phoenix
golden condor
#

Is there any other ways to reduce ram in discordjs

pale vessel
#

eris

#

/s

pine bear
#

🤷‍♀️

#

it sends nothing.

cinder patio
#

Reducing what's cached is the only way

#

Catra, are you sure the code is even executing? Put a console.log to see

earnest phoenix
#

most of the code please help```js
let welcome = bot.channels.cache.get(welcomechannel)
const canvas = Canvas.createCanvas(800, 250);
const ctx = canvas.getContext('2d');

const background = await Canvas.loadImage('wallpaper.png');
ctx.drawImage(background, 0, 0, canvas.width, canvas.height);

ctx.strokeStyle = '#74037b';
ctx.strokeRect(0, 0, canvas.width, canvas.height);

// Slightly smaller text placed above the member's display name
ctx.font = '28px sans-serif';
ctx.fillStyle = '#ffffff';
ctx.fillText(${welcomemessage2},, canvas.width / 3.5,
canvas.height / 3.5);

// Add an exclamation point here and below
ctx.font = applyText(canvas, ${message.author.displayName}!);
ctx.fillStyle = '#ffffff';
ctx.fillText(${message.author.displayName}!, canvas.width / 3.5, canvas.height / 1.8);

ctx.beginPath();
ctx.arc(125, 125, 100, 0, Math.PI * 2, true);
ctx.closePath();
ctx.clip();

const avatar = await Canvas.loadImage(message.author.displayAvatarURL());
ctx.drawImage(avatar, 25, 25, 200, 200);

const attachment = new Discord.Attachment(canvas.toBuffer(), 'welcome-image.png');

welcome.send(${welcomemessage}, ${message.author}!, attachment);
})
//code```

cinder patio
#

Also, if args[0] exists, nothing gets sent - you just make the embed

pine bear
#

oh wait, I typed my embed variables wrong.

earnest phoenix
#

did i write this well? js let welcome = bot.channels.cache.get(welcomechannel)

pine bear
#

and I forgot to make the hembed variable send either

robust moth
#

Need help

simple pollen
#

Ok but from where the error originated?

robust moth
pine bear
#

the light mode is killing me

#

💀

simple pollen
#

me too

earnest phoenix
#

Github dark stylish > all

earnest phoenix
#

how can i keep bot online for free on github

summer torrent
#

github isn't a host

#

you need a vps

earnest phoenix
#

can i get vps for free

#

or i need to pay

summer torrent
#

you need to pay

#

there are free hosts like heroku, glitch but they have a lot of restrictions

sullen patrol
#

Does anybody know how to get that time since registered text

#

?

summer torrent
#

which lang

marble juniper
#

what library

pine bear
#

how do I console.log this? I'm confused

module.exports.run = async (client, message, args) => {
    if(args[0] == 'help') return message.channels.send(`Just do ${prefix}help instead.`);

    if(args[0]) {
        let command = args[0];
        if(client.commands.has(command)) {
            command = client.commands.get(command);

            var hembed = new Discord.RichEmbed()
            .setColor('blue')
            .setAuthor('She-Ra HELP', message.guild.iconURL)
            .setThumbnail(client.user.DisplayAvatarURL)
            .setDescription(`My prefix is ${prefix}\n\n__**Command:**__ ${command.config.name}\n__**Description:**__ ${command.config.description || 'No Description' }\n__**Usage**__${command.config.usage || 'No Usage'}\n__**Accessible By**__${command.config.accessibility || 'everyone'}\n__**Aliases**__${command.config.noalias || command.config.aliases}`)
            message.channels.send(hembed);
        }}

    if(!args[0]) {
        message.delete();
        let embed = new Discord.RichEmbed()
        .setAuthor('Help Command!', message.guild.iconURL)
        .setColor('red')
        .setDescription(`${message.author.username} check DMs`)

        let Sembed = new Discord.RichEmbed()
        .setColor('blue')
        .setAuthor('She-Ra HELP', message.guild.iconURL)
        .setThumbnail(client.user.DisplayAvatarURL)
        .setTimestamp()
        .setDescription(`Here are all the commands for ${client.user.username}\n the prefix is ${prefix}`)
        message.channels.send(embed).then(message => message.delete(10000));
        message.author.send(Sembed)
    }
}

it's suppose the create a 'help' command but it ain't working and nothing shows on the console.logs.

lime hare
summer torrent
#

is your bot online

golden condor
#

I can't change my bot to dnd

summer torrent
#

setStatus("dnd")

golden condor
#

Ik

#

It doesn't work

hybrid ruin
#

What does it say

golden condor
#

It just doesn't work without an error

lime hare
#

@summer torrent yes

hybrid ruin
#

Then it goes through without problems

#

Try to debug and check if the line is being called in the first place

#

Executed, not called

golden condor
#

I did

lime hare
#

What Should I Do To Appear Online?

summer torrent
#

@lime hare your bot was kicked from this server

#

ask a moderator for add it back

golden condor
#

.then(console.log("success")).catch(e => console.log(e)) and it logged success

cinder patio
#

@pine bear just add console.log(1) at the beginning of the function to see if it runs

lime hare
#

bruv

summer torrent
#

?

pine bear
#

ok

golden condor
#

It's a miracle it works

pine bear
#

Hm, no it doesn't.

lime hare
#

@summer torrent thx for help me

summer torrent
#

np

golden condor
#

pm2 keeps spawning two instances when not asked to

#

How do I stop it doing this

summer torrent
#

same for me

golden condor
#

No idea how to stop it

summer torrent
#

require("child_process").exec(kill ${process.pid})

golden condor
#

what does that do

summer torrent
#

kills current process

golden condor
#

I only want one killed tho

cinder oxide
#

Using Eris, how would I .bulkDelete() like in discord.js? I looked in the docs and GuildChannel property doesn't contain anything that allows me to delete messages in bulk. Solved

ivory cedar
#

How can one add permissions to the authorization link? Way too often people are not giving any permissions for the bot when inviting to a server...

earnest phoenix
#

@ivory cedar you can use the discord permissions calculator website and give it the permissions you want... But idk if it will 100% work

summer torrent
true ravine
#

Are there any modules to dynamically round to make numbers nice - so for example it would round 3 to 5 but 37 to 45

#

Or should I just make it myself?

royal granite
#

woow (discord.js) Can i like, make the bot check if the person who uses the command has a certain ID, and it only works if it is MY ID, so only i can do the command?

true ravine
#

Yeah if(message.author.id==="your-id")

royal granite
#

damn noi

#

boi

earnest phoenix
#

@royal granite you can do the following if you want to use the command only by yourself:

return message.channel.send("Blah blah blah");
}```
royal granite
#

yeah thx

earnest phoenix
#

Np

sullen patrol
#

Does anybody know how to get that time since registered text? I use discord.js

earnest phoenix
#

@sullen patrol you mean like show the exact time of when you used the command and show it?

sullen patrol
#

@earnest phoenix no. Converted to 6 days 10 hours. That stuff

golden condor
#

How to stop pm2 spawning 2 instances

sullen patrol
#

Pm1?

tight plinth
#

pm2 options

#

-i didnt work?

golden condor
#

Nope

earnest phoenix
#

(pm2 is drunk asf)

golden condor
#

what could I use instead

earnest phoenix
#

Idk...

#

@golden condor you can just use the Normal nodejs lmao

tight plinth
#

use local heroku instance

golden condor
#

I use ssh

tight plinth
#

local heroku + pm2 works

golden condor
#

It resets every time

#

I'll use nodemon

cinder patio
#

Btw I read up on intents and they don't disable caching just the events don't get processed, for example "GUILD_EMOJIS" will stop events like guildEmojiUpdate, but the emojis of every guild will still get cached

#

just not updated

wide ridge
#

Why do bigger bots avoid using Discord.js? Is it because of the d.js caching? I've seen that d.js caches way too many things and eats up RAM like crazy. Is Eris a better option for scalability?

cinder patio
#

yes it's most likely because of the caching mechanisms

#

idk I've never used Eris

#

I mean, the top bot on top.gg right now is made with discord.js

wide ridge
#

I noticed owobot is too, but on owobot's github it says they're using eris

#

so maybe they didn't update their top.gg page

cinder patio
#

that's possible

spare goblet
#

discord js is easier to start off with, but the caching is crazy

#

eris however is less friendly with its classes and functions and some of it just doesn't make sense

earnest phoenix
#

toUnmute.removeRole(role); is this right

twin pendant
#

quick question with the new indents: my bot has a whois command which will show the mentioned user's presence and some other things. do i need to opt into the presence indent in order for my bot to be able to get presence data? or is the indent just for receiving presence updates (which my bot does not need)

spare goblet
#

@earnest phoenix v12 should be <guildMember>.roles.remove(roleResolvable)

earnest phoenix
#

no wait i forgot i was using 12

#

yep ik

#

lol

spare goblet
#

@twin pendant Yes it will use presence, as PRESENCE_UPDATE event is what keeps the cache correct.

cinder patio
#

You will need the presence indent because if a member changes their peresence your bot will still show the old one

twin pendant
#

oh ok thanks guys

tight plinth
#

should I edit ytpl code to get more than 100 songs per playlists?

summer torrent
#

Infinity zoomeyes

tight plinth
#

lets try lol

summer torrent
#

I suggest check youtube docs

#

for is there any limit

tight plinth
#

Infinity doesnt seems to work lol

#

doesnt seems to work

#

oof

scenic nest
#

i need help with bot status,,,

earnest phoenix
#

So what library? @scenic nest

#

Discord.js or what?

scenic nest
#

discord.js

earnest phoenix
#

Hmm what kind of problem you have with it?

small plume
#

Show us what you have currently 😛

scenic nest
#

it won't appearing

#

and show error

earnest phoenix
#

Hmm show the code

scenic nest
#

i deleted the code

#

it now being like

#

wait

earnest phoenix
#

Wait... Which discord.js version are you using?

scenic nest
#

its my old project

#

but

#

how to check

earnest phoenix
#

How to check what version it's?

scenic nest
#

yea

#

on glitch

earnest phoenix
#

Open the package.json file and check what version it says right beside it @scenic nest

scenic nest
#

11.5.1

earnest phoenix
#

Hmm want to update it?

scenic nest
#

idk

#

i am worry

earnest phoenix
#

It's better to update tho

scenic nest
#

is that will affecting other?

earnest phoenix
#

It will affect most of the code you've already written because of many changes

scenic nest
#

no

#

;-;

earnest phoenix
#

But we can guide you on how to solve them

scenic nest
#

ok

#

oh wait

#

before that

earnest phoenix
#

Yea?

scenic nest
#

wait

earnest phoenix
#

What's up with it lol?

scenic nest
#

that thing sick

#

it work fully last week

earnest phoenix
#

It doesn't load up or the discordapp is drunk?

scenic nest
#

idk

#

it just blank like that

#

oh yeah ur phone

earnest phoenix
#

Do you have the latest version of discordapp?

scenic nest
#

in*

small plume
#

If that is your Discord Client i suggest trying CTRL + R else fully uninstall and reinstall it. Else try running it as Administrator

scenic nest
#

yes

#

ok

#

wait

#

what is the difference of normal openning and run as administrator?

#

anyone?

modest maple
#

one is admin one is a user

scenic nest
#

ok

earnest phoenix
#

Both are different as the administrator one gives you more controls to safely run it...

scenic nest
earnest phoenix
#

Hmm...

scenic nest
#

well still blank

#

aight lets go to the discord.js

modest maple
#

well You say "safely"

earnest phoenix
#

Did you uninstall and reinstall? @scenic nest

modest maple
#

Admin is just not a good idea for most systems

earnest phoenix
#

Yea...

scenic nest
#

hmm

#

i need 9 hour to download 59mb file ;-;

earnest phoenix
#

Wtf

scenic nest
#

idk what happend yesterday

#

but it better rn

earnest phoenix
#

That must be the world record on the slowest download speed lmao

scenic nest
#

xD

#

hey WHY I Can't react thooo??

earnest phoenix
#

Hmm you can't react to your own message that gets starred lmao

#

So anyways

scenic nest
#

umm k

#

so

earnest phoenix
#

Back to coding?

scenic nest
#

yes

#

#14yearsoldbacktocoding

earnest phoenix
#

So change the discord.js value to:
"discord.js": "^12.1.1",

scenic nest
#

ok

#

is that newest?

earnest phoenix
#

Yes

scenic nest
#

done

earnest phoenix
#

Now did it download the latest version after changing it and saving it?

scenic nest
#

umm wait

blazing portal
#

i think you have to do npm install first?

earnest phoenix
#

K

scenic nest
#

what command should i execute?

#

refresh?

earnest phoenix
#

@blazing portal he's using glitch.com lmao there's no terminal

blazing portal
#

oh, missed that part 😄

scenic nest
earnest phoenix
#

Hmm i think it should do it on it's own so let's get back to work

true ravine
#

Just a wild question, but are you using code from a youtube tutorial?

scenic nest
#

hmmm

#

idk

#

i just got it in my account

earnest phoenix
#

@scenic nest now you want to make it a command that changes your bot status to whatever you want or just by normal from a ready event?

scenic nest
#

then i edit it

true ravine
#

So yes

#

Nice

scenic nest
#

its my account and my little bro

true ravine
#

Bro your lil bro be smart

earnest phoenix
#

Answer me BOI

scenic nest
#

@earnest phoenix we still have problem with discord.js version right ;-;

earnest phoenix
#

can anyone please help me with my discord.js bot? I am having some issues with the command handler.

scenic nest
blazing portal
#

@earnest phoenix ask your question, dont ask to ask 😉

earnest phoenix
#

ask to ask?

#

wdym

#

@scenic nest it will be updated on it's own don't worry

scenic nest
#

ok

blazing portal
#

ask for help*

earnest phoenix
#

well ok

blazing portal
#

just ask your question. thats what this channel is for 🙂

earnest phoenix
#

@scenic nest so a command or normal change?

scenic nest
#

Bro your lil bro be smart
@true ravine then he cry and ask me to help

#

wut?

#

normal

earnest phoenix
#

K now go to your index.js file

scenic nest
#

k

earnest phoenix
#

Can i see it?

scenic nest
#

mk

#

wait

#

just

#

help command won't start

#

yeah it logging an error

earnest phoenix
#

Because we updated the discord.js and some things have changed... I'll help with that later

scenic nest
#

(node:679) UnhandledPromiseRejectionWarning: TypeError: Discord.RichEmbed is not a constructor```
earnest phoenix
#

Yup

scenic nest
#

ok

#

bumar

earnest phoenix
#

Change it to:
Discord.MessageEmbed()

scenic nest
#
   const helpembed = new Discord.RichEmbed()``` the code
#

so i change the

#

Discord.RichEmbed()

#

to

#

Discord.MessageEmbed()?

earnest phoenix
#

Yes

scenic nest
#

k done

earnest phoenix
#

Is it working now?

scenic nest
#

wait

#

lemme se

#

e

earnest phoenix
#

K

scenic nest
#

nah

earnest phoenix
#

What kind of error does it give now?

clever arch
#

i'm currently using "discord.js": "^11.5.1", this version this will cause any problems later

#

?

scenic nest
#
(node:679) UnhandledPromiseRejectionWarning: TypeError: Discord.RichEmbed is not a constructor```
#

@clever arch yes if u change dat lol

#

and

#

the help command still don't work

earnest phoenix
#

@scenic nest change every
Discord.RichEmbed()
To
Discord.MessageEmbed()

clever arch
#

what if stay in this version

#

if i*

earnest phoenix
#

@clever arch it's not a good idea to use older versions of discord.js

true ravine
#

It's not a good idea to use older versions of anything really

earnest phoenix
#

Yup

blazing portal
#

It's called update for a reason 😄

scenic nest
#

alaredy

earnest phoenix
#

Gotta stay updated

#

@scenic nest what...

scenic nest
clever arch
#

i'll update than thank you 😄

earnest phoenix
#

@scenic nest umm...

#

What did i just tell you up there?

scenic nest
#

umm k

#

my play command don't have any embed script

if (command === "play" || command === "p") {
    const voiceChannel = msg.member.voiceChannel;
    if (!voiceChannel)
      return msg.channel.send(
        "Hey buddy, be in a voice channel to do that ;-;"
      );```
earnest phoenix
#

So what about it?

scenic nest
earnest phoenix
#

It doesn't show an embed like it did before you mean? @scenic nest

scenic nest
#

idk

#

im so confused rn

earnest phoenix
#

And also...

scenic nest
#

lets fix the help command first

earnest phoenix
#

Change the voiceChannel to voice.channel @scenic nest

scenic nest
#

k

blazing portal
scenic nest
#

all?

blazing portal
#

Just gonna put this out here...

earnest phoenix
#

@scenic nest wdym all?

scenic nest
#
    const voiceChannel = msg.member.voiceChannel;
    if (!voiceChannel)
      return msg.channel.send(
        "Hey buddy, be in a voice channel to do that ;-;"
      );```
#

to

#
if (command === "play" || command === "p") {
    const voice.Channel = msg.member.voice.Channel;
    if (!voice.Channel)
      return msg.channel.send(
        "Hey buddy, be in a voice channel to do that ;-;"
      );

earnest phoenix
#

To:

    const voiceChannel = msg.member.voice.channel;
    if (!voiceChannel)
      return msg.channel.send(
        "Hey buddy, be in a voice channel to do that ;-;"
      );```
scenic nest
#

k

#

done

earnest phoenix
#

Working?

scenic nest
#

wait

earnest phoenix
#

K

scenic nest
#

nope

earnest phoenix
#

What error does it give now? @scenic nest

scenic nest
#

umm wait

#

my bad

earnest phoenix
#

Hmm

scenic nest
#
 if (command === "play" || command === "p") {
    const voiceChannel = msg.member.voice.Channel;
    if (!voiceChannel)
      return msg.channel.send(
        "Hey buddy, be in a voice channel to do that ;-;"
      );
    const permissions = voiceChannel.permissionsFor(msg.client.user);
    if (!permissions.has("CONNECT")) {
      return msg.channel.send(
        "Sorry, but i need **`CONNECT`** permissions to proceed!"
      );
    }
    if (!permissions.has("SPEAK")) {
      return msg.channel.send(
        "Sorry, but i need **`SPEAK`** permissions to proceed!"
      );
    }``` that is the full code coz i don't see it
earnest phoenix
#

@scenic nest what's the error?

scenic nest
#

not logged

blazing portal
#

2nd row at the end [...].voice.channel

scenic nest
#

because the command is runned

blazing portal
#

not a capital c

scenic nest
#

hmm

#

lemme test

#

oh

earnest phoenix
#

@scenic nest yea i pointed that out before lol

scenic nest
#

i know the error

earnest phoenix
#

What's it?

scenic nest
#

i forget refresh

#

hehehe

earnest phoenix
#

Lol

scenic nest
#

yeh

#

play working

#

but help still

#

do not run anything

earnest phoenix
#

Can i see your help command?

scenic nest
#

k

#
if (command === "help" || command == "cmd") {
    const helpembed = new Discord.MessageEmbed()
      .setColor("#7289DA")
      .setAuthor(bot.user.tag, bot.user.displayAvatarURL)
      .setDescription(
        `
__**Commands List**__
> \`play\` > **\`play [title/url]\`**
> \`skip\`, \`stop\`,  \`pause\`, \`resume\`
> \`nowplaying\`, \`queue\`,`
      )
      .setFooter("Unlock more features by buying Zions Premium only $1");
    msg.channel.send(helpembed);
  }```
#

hmm

#

why is the "`" mess

#

it's not like that before

earnest phoenix
#

Hmm when you do the command it doesn't send anything?

elder vine
#

Hm?

scenic nest
#

rn

earnest phoenix
#

Hmm

elder vine
#

Is msg defined?