#development
1 messages · Page 860 of 1
@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
have a bot approved on the site
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
ask
no, you're trapped in here
seht
How do I make it so that the shard respawns if it died out? I’m using d.js v12
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?
anyone know what exactly "Server Member Intent" is?
so, for example when a user joins, and i track that in-code, i would have to specify i have server member intent?
use displayAvatarURL() on the user object in v12
kk, thx
@turbid bough Yes because that'd be a GUILD_MEMBER_ADD event
but if i track users that use the command, then its fine?
ok i just realized i did something very stupid
You'd need this intent for messages https://oliy.is-just-a.dev/uyv9bp_3494.png
I accidentally did !prefix level
and then levelprefix or smth
and i can't use my commands
which bot?
betterantispam
this bot? @toxic bramble
obv
yeah
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
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?
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?
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
new members are not as often
30/60 minutes will probably be fine. Even if it doesn't hit the ratelimit they still consider it api abuse (aka better than 1 minute https://cdn.discordapp.com/attachments/272764566411149314/604449094680707072/unknown.png)
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
@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
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 like an auto censoring function?
Hmm idk how to do that one tho lmao...
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
Or maybe bulkDelete the message that matches the stored words
if your bot is online then yes
but you have to put code in and host it/run it before it'll go online
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...
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...
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
(I literally have no idea)
its literally forcing wrong indentation
lol
its not too bad
just keep trying
😄
to host your bot?
or code it?
@woven sundial i mean... (I said discord bot library)
@woven sundial also you need a library to build your bot with lmao...

but as tim said, using websockets directly it not fun
Yea... discord.js is the best in my opinion
your bot has been through a lot of mutes
@crimson vapor whos bot lmao?
Icero's
Hmm i see
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
VPS is not all too expensive
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
here is fine tbh
Hmm k let's do this in DMs because this is gonna be way too long @earnest phoenix
Would using CRON for an automatic daily command be a good idea?
For lets say premium users/voters.
CRON is a scheduling 'thing'.
yes I'm aware
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.
unless you're updating your databases through system commands
it seems super redundant
I've not thought of it full yet but it's templated.
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
library is something that basically helps you do something
in terms of a discord library it wraps around the discord api
you need to have programming knowledge and you need to know a programming language if you want to get started out with those
yeh I got quite a bit xp in programing
what language?
Use the .NET wrapper or JDA.
It's just I'm so confused over some spesific's in JS
c# is a part of .net by the way
sorry i'm lagging a bit
Oh no I feel I'm done
I wanna learn JS it seems fun
but painful
it is tbh
you know any sane logic from c# and java? scrap that lol javascript is the total opposite, full of dumb concepts
most js reads out in english well
The code shouldn't need to be read out well, That's the whole point of commenting.
what kind of code is this? ```js
var Discord = require('discord.io');
I mean it's not discord.js
don't use it
since you're coming from c# and Java background it's gonna be hell
I didnt
so you were 13 or 12?
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?
13 yes
I'm 14 now tho, I mostly code in rust now
JavaScript bad
@earnest phoenix language? where's the error coming from? code?
I want to learn more about it just as a first language
js, and its happening when I start the song
yes but like
what line of code is causing it
IDK
what lib are you using for getting the yt music?
simple yt
Dream do you know what that is?
I am working on my own atm
@earnest phoenix use ytdl
but I use ytdl
ok, Thanks!
and im just doing it as a joke
there are so many thing I should do to make it better
@crimson vapor since you seem atleast somewhat experienced I would recommend using like lavalink
disgOStANG
I dont think I will tbh
ytdl just gets exactly what I need
fair
I kinda wanna make something similar to lavalink actually
would be fun
but also not in Java :>
i made something like lavaplayer in c#
lavalink is just a web wrapper around lavaplayer
so you can do requests?
yup
hmm
i still don't like using lavalink because you have to install a java runtime to run it
and it hogs ram
what do you think about ytdl? if you use js
i don't use it
what do you use?
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
oh
the only binaries i depend on are opus, sodium and ffmpeg
what does sodium do?
it's what discord requires to encrypt voice packets
oh
@west raptor so u been at it since 2018?
is that when u got your degree or just hobby
he is 14 rn
lol
all good lol
wait yall are below 20?
ye
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
i feel like people who buy pastebin pro eat dollar bills for breakfast
exactly
pastebin has more buttons so people click on that site instead when the paste fails on hastebin
how does a paste fail?
bruh
hastebin is often down
but that's why there are forks of it
like https://paste.mod.gg
https://hatebin.com/qsygqlrlyi - provided by none other than https://codebeautify.org/jsvalidate
hastebin always felt slow for me tbh
it is a bit slow
half the time the paste button doesn't work for me
just ctrl v
what?
where did you repeat it
do you expect us to use our superbrain to know your code
yes, we read minds here at dbl
XD
probably a message.channel.send(message.channel.content)
no
with no if (message.author.bot) return
something like this.
module.exports = {
name: '^',
description: '^',
execute(message, args){
message.channel.send("^");
}
}
ok I see
can you show your message event
oh, that makes it not reply to other bots.
yes
message is the message
message.author is the author
message.author.bot is a boolean if it is a bot, true
oh, I see
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
none of the guilds are saved
I think
if its preReady, guilds would not be cached. is this d.js?
eris
I'd like to find the number of guilds in a shard though
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.
you can't without constantly spamming requests - which will eventually lead to an api ban
also no
nobody will spoonfeed you
how to get API banned 101
when ever someone asks a question expecting code, just explain it in broken english
why

so they have to fix the english then figure out the code
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!
I think I put if (message.author.bot) return; in the wrong place.
maybe
@cinder oxide by the way, you're doing assignment in that filter.
uh wot?
What api should I use to search the youtube site?
What api should I use to search the youtube site?
@crimson vapor youtube api
there's actually one
thats a lot of work to use the youtube api
is there any wrappers that are good?
are*
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
are you using js?
yeah
shh im small brain

still searching on an explanation on this
there
lol
Is this the right place to ask for help?
im havin trouble getting heroku to deploy my bot, its not identifieing my index.js file, ive tried the fixes stated here https://stackoverflow.com/questions/39015893/heroku-deploy-error-cannot-find-module-app-index-js
is your procfile configured correctly?
also, is the index file placed in the right place?
index is in the folder i commited with git so yes
do you have a log that we can read?
can you run your bot locally?
Sure, I just have no idea how to show that lol
I did this in notepad 😆 im new to this
yes....I have sinned
not public and not all of it on github, only bits and pieces
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
and the files that are there are super outdated
im not running off of github per say
and your whole project was uploaded to heroku?
as far as I know
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?
in command prompt?
@valid gyro in your code
so change the name of my index file to that...
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?
no results.....
well theyre different methods that i have tried so far, and idk which to believe lol
@valid gyro download that ide, it'll let you search in all files
ok
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
ight installed
const os2 = require('os-utils')
os2.cpuUsage(function(v) {
console.log( 'CPU Usage (%): ' + v);
});
This is one function that im using
alright, so 0.8 seems more accurate
well not exactly
0.8 could be cpu usage out of 100 where 0.03 could be per thread
0.8 could be cpu usage out of 100 where 0.03 could be per thread
@crimson vapor js is mono thread
hmm
yeah
what is the function is uses to get cpu usage
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
I see there are several node packages that allow you to look up a specific process's usage, such as https://www.npmjs.com/package/usage
I am trying to get the overall sever usage/stats (CPU and Me...
const cpuusg = `\`${(process.cpuUsage().system / 1000000).toFixed(2)}%\`` + " CPU Usage";
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
Wow the IDE does make everything look cleaner
it sure does
that's why notepad is bad
I'd go even further and say that vs code isn't an actual IDE
vscode isn't a IDE but it's still really good for coding
yes, i mean
if that looks a lot better
it can still get way better
but webstorm is paid, so....
now, how is it gonna help me figure out what is wrong
unless you get an open-source dev license
in which case you'll get it for free
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
Mine is eris
yeah read that late

@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.
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
How does your command usage look like?
let user = message.mentions.users.first()
let reason = args.join(" ").slice(0)
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?
Change the reason's argument count then
You can slice the first argument and join the rest for reason
Yep
is there like an easy way to set up a "help" command?
Define "easy way"?
get all of the commands and make an array out of the commands with name - desc
giant list
Thanks, worked!
like not typing down all the commands and what they do in a single string.
np
I didn't use it in a long time lmao
collection
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
can also query parameters.
would that be inside a message event?
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.
embeds are neat, but I wish I could make the section titles bigger.
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
best solution would be to not cache any discord objects like Channels, Users, Members etc..
what can be cause of creating multiple processes. After pm2 restart 0, my bot starting to reply with multiple responses
what is the color hex for message embed red?
sharding
@cinder patio how do I stop it caching in discord.js
@pine bear full red is #FF0000
Or you could just type
'Red'
ok
I guess you have to modify the library itself, you can only stop the caching of messages
have you done that?
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
Oh I don't need that
I could also turn off fetchAllMembers right?
And only pull them when I need them
It's false by default
Oh
thats actually so useful tbh
What else could be using up memory
because not many bots use messages
I should make a voice channel disconnect event for timeout
Well.. discord.js also caches all emojis and presences
Not have it check when we a message is sent
there's no way to disable them though
cant you just replace the calls that ca he the things with functions that do nothing?
That's not a good idea imo
Which one
sure. Its a terrible idea. but it would disable the cache :P
I check if any guild has a vc with only my bot in it
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
Yeah but idk
I could make it when a song ends
It checks if anyone is in the vc
And if not
It leaves
O
Since a song can't be a livestream
I should add that
No you shouldn't
the check for users
I mean sure but still you are streaming a song that nobody is listening to and just wasting resources
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?
voiceStateUpdate you have to check if there is a channel in the oldState and no channel in the newState1
Oh
or connection, not entirely sure I've never used voice stuff
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
Just add the code to it to it if you already have it for something else?
I am gonna change the caching messages thing
And change the voice channel thing
Cos my memory usage is way to high
That's quite a lot for around 150 servers tbh
just delete everything
Use intents to prevent most of these events to even reach you
In the client options:
new Client({
ws: {
intents: [..intent names here]
}
})```
And the list of intents: https://discord.js.org/#/docs/main/stable/class/Intents?scrollTo=s-FLAGS
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?
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
is djs supposed to leak memory if you don't add any client options at all
wouldn't that be a bug or
That's not really a memory leak
eh i guess
eris doesn't use such as memory as d.js
no max cache size?
only for messages
I will show my packages
i always thought djs would have some kind of limit on how big a cache can get
I mean I don't think I need all of them
But something is using up tons of memory
Alot more than it should
uhhhh iirc can't you monitor node processes for this kind of stuff?
How
I found ws: { intents: [ "GUILD_MESSAGES", "GUILDS" ] } lowers ram a lot
I need dms tho
weird
then add dms
But then guilds don't get cached
Is that a good thing?
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
please help me canvas console error js (node:12028) UnhandledPromiseRejectionWarning: Error: ENOENT, No such file or directory './wallpaper.png'
Where is test called from? Like from which directory
they are in the same directory
but now it's improved
now he has another fault
(node:14440) UnhandledPromiseRejectionWarning: Error: Unsupported image type```
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'
}
yes
it does, but. Not really.
Is there any other ways to reduce ram in discordjs
Reducing what's cached is the only way
Catra, are you sure the code is even executing? Put a console.log to see
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```
Also, if args[0] exists, nothing gets sent - you just make the embed
oh wait, I typed my embed variables wrong.
did i write this well? js let welcome = bot.channels.cache.get(welcomechannel)
and I forgot to make the hembed variable send either
Ok but from where the error originated?
me too
Github dark stylish > all
how can i keep bot online for free on github
you need to pay
there are free hosts like heroku, glitch but they have a lot of restrictions
which lang
what library
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.
How Will This Go Online?
is your bot online
I can't change my bot to dnd
setStatus("dnd")
What does it say
It just doesn't work without an error
@summer torrent yes
Then it goes through without problems
Try to debug and check if the line is being called in the first place
Executed, not called
I did
What Should I Do To Appear Online?
.then(console.log("success")).catch(e => console.log(e)) and it logged success
@pine bear just add console.log(1) at the beginning of the function to see if it runs
bruv
?
ok
It's a miracle it works
Hm, no it doesn't.
@summer torrent thx for help me
np
same for me
No idea how to stop it
require("child_process").exec(kill ${process.pid})
what does that do
kills current process
I only want one killed tho
Using Eris, how would I Solved.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.
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...
@ivory cedar you can use the discord permissions calculator website and give it the permissions you want... But idk if it will 100% work
https://discordapi.com/permissions.html useful link
A small calculator that generates Discord OAuth invite links
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?
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?
Yeah if(message.author.id==="your-id")
@royal granite you can do the following if you want to use the command only by yourself:
return message.channel.send("Blah blah blah");
}```
yeah thx
Np
Does anybody know how to get that time since registered text? I use discord.js
@sullen patrol you mean like show the exact time of when you used the command and show it?
@earnest phoenix no. Converted to 6 days 10 hours. That stuff
How to stop pm2 spawning 2 instances
Pm1?
Nope
(pm2 is drunk asf)
what could I use instead
use local heroku instance
I use ssh
local heroku + pm2 works
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
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?
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
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
that's possible
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
toUnmute.removeRole(role); is this right
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)
@earnest phoenix v12 should be <guildMember>.roles.remove(roleResolvable)
@twin pendant Yes it will use presence, as PRESENCE_UPDATE event is what keeps the cache correct.
You will need the presence indent because if a member changes their peresence your bot will still show the old one
oh ok thanks guys
Infinity 
lets try lol
i need help with bot status,,,
discord.js
Hmm what kind of problem you have with it?
Show us what you have currently 😛
Hmm show the code
Wait... Which discord.js version are you using?
How to check what version it's?
Open the package.json file and check what version it says right beside it @scenic nest
11.5.1
Hmm want to update it?
It's better to update tho
It will affect most of the code you've already written because of many changes
But we can guide you on how to solve them
Yea?
What's up with it lol?
It doesn't load up or the discordapp is drunk?
Do you have the latest version of discordapp?
in*
If that is your Discord Client i suggest trying CTRL + R else fully uninstall and reinstall it. Else try running it as Administrator
yes
ok
wait
what is the difference of normal openning and run as administrator?
anyone?
ok
Both are different as the administrator one gives you more controls to safely run it...

Hmm...
well You say "safely"
Did you uninstall and reinstall? @scenic nest
Admin is just not a good idea for most systems
Yea...
Wtf
That must be the world record on the slowest download speed lmao
Back to coding?
So change the discord.js value to:
"discord.js": "^12.1.1",
Yes
done
Now did it download the latest version after changing it and saving it?
umm wait
i think you have to do npm install first?
K
@blazing portal he's using glitch.com lmao there's no terminal
oh, missed that part 😄
there is terminal.
Hmm i think it should do it on it's own so let's get back to work
Just a wild question, but are you using code from a youtube tutorial?
@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?
then i edit it
its my account and my little bro
Bro your lil bro be smart
Answer me BOI
@earnest phoenix we still have problem with discord.js version right ;-;
can anyone please help me with my discord.js bot? I am having some issues with the command handler.
@earnest phoenix ask your question, dont ask to ask 😉
ok
ask for help*
well ok
just ask your question. thats what this channel is for 🙂
@scenic nest so a command or normal change?
K now go to your index.js file
k
Can i see it?
Because we updated the discord.js and some things have changed... I'll help with that later
(node:679) UnhandledPromiseRejectionWarning: TypeError: Discord.RichEmbed is not a constructor```
Yup
Change it to:
Discord.MessageEmbed()
const helpembed = new Discord.RichEmbed()``` the code
so i change the
Discord.RichEmbed()
to
Discord.MessageEmbed()?
Yes
k done
Is it working now?
K
What kind of error does it give now?
i'm currently using "discord.js": "^11.5.1", this version this will cause any problems later
?
(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
@scenic nest change every
Discord.RichEmbed()
To
Discord.MessageEmbed()
@clever arch it's not a good idea to use older versions of discord.js
It's not a good idea to use older versions of anything really
Yup
It's called update for a reason 😄
alaredy
dis guy is sick
i'll update than thank you 😄
and the play command it must be like dis
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 ;-;"
);```
So what about it?
won't run
It doesn't show an embed like it did before you mean? @scenic nest
And also...
lets fix the help command first
Change the voiceChannel to voice.channel @scenic nest
k
all?
Just gonna put this out here...
@scenic nest wdym all?
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 ;-;"
);
To:
const voiceChannel = msg.member.voice.channel;
if (!voiceChannel)
return msg.channel.send(
"Hey buddy, be in a voice channel to do that ;-;"
);```
Working?
wait
K
nope
What error does it give now? @scenic nest
Hmm
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
@scenic nest what's the error?
not logged
2nd row at the end [...].voice.channel
because the command is runned
not a capital c
@scenic nest yea i pointed that out before lol
i know the error
What's it?
Lol
Can i see your help command?
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
Hmm when you do the command it doesn't send anything?
Hm?
rn
Hmm
Is msg defined?

