#development
1 messages Β· Page 706 of 1
cache cleaning?
One message removed from a suspended account.
One message removed from a suspended account.
I reckon it means Discord.Client not the actual client.
^
One message removed from a suspended account.
is it normal that my Prefix is like "turn off" ?
"turn off"?
semicolons are not strictly required in js
the engine basically attempts to autocomplete them where needed
@Eliacin / Resistensia#1575 it means that it is unused
@lunar crystal if you mean the color that your editor is showing, that doesnt have any significance
Ouh... Ok thanks u
code editors try to guess what your code does and give you relevant colors for it, but it doesnt have any actual meaning
its just the program trying to guess what your code is doing
its darker than the rest, thats how vscode is telling you that the variable is unused
because bot doesnt exist
lmao
you really should look into learning basic javascript
What do you mean by this 
you define your client as client then refer to it as bot
'k thanks u
what is a DBL Token?
a token for connecting with the discordbots API
thanks u π
how can i find my bot's token
ah okay π
Like this ?
bruh
oh boi
u have to change bot.user to client.user
please learn javascript
Oh yes I forgot lol
making a bot is a good way to learn JS :) its how i learned at least
Yes I think so
yes, but please try to understand why, what, how, etc
not just blindly copy paste code without understanding
Oki
I can't stress this enough but experimenting is very important so you can see how it reacts if you change something to get a better understanding of it
^
I think that I'm going to take classes for learn js
yes
Because on internet it's very hard to find some good free classes
its not hard, but most lessons on youtube and websites require you to already know something about coding in general
there is not a lot of content for absolute beginners that knows how to explain things in a way they understand
!leaderboard
Node.js is an open-source, cross-platform JavaScript run-time environment that executes JavaScript code outside of a browser. Learn all about Node.js in the ...
yes
yes
dbl nicetry @earnest phoenix
Hey, any bots that have common prefixes are now blocked from reading any channel. Nice try spamming your dms though.
It took a google search
Thank you @unique nimbus
the problem is, most node.js tutorials assume the person already knows some basic js
I don't know shit for js
However due to my experiences of python I got a tad understanding
Eventhough its different
ye
Before I say I am "okay" I need to make something like a calculator or some shit
without tutorials
lmao
I mean it is a good way to get paid
its something im slowly finding out i really like to do, hence why i spend absurd amounts of time here
ye
i need a life
rip
We-
How do we do to make a text like that when you're coding in vsc ?
what
you mean bold text?
@quartz kindle I think I feel you, I really like helping people with their problems when they can't figure stuff out, and I do tutor people on the side for Math things. It's satisfying helping people gain some more knowledge
I enjoy helping people out as well but I don't have too much patience myself so I try to not get too involved
Can anyone help me at showing this?
https://cdn.discordapp.com/attachments/272764566411149314/629183986870255616/Screenshot_2019-10-03-07-11-50-656_com.android.chrome.png
Sorry i missed up the old request
Have you posted your stats to dbl? wdym by missed up the old request?
What are the requirements to become verified again?
Does anyone how to find out how many users your bot is listening to on .py
again
believe it or not, fetching usually means its over the internal
Promise.entries is not a property 
Promise.entries = undefined 
So I know you can use member.roles.add() in discord.js Master branch, how would I do it for a user though? user.add.roles() returns cannot read property roles of undefined
Iirc a user has no context of a guild
So that wouldn't work on just the base user object
Also look at what you posted for member vs user
@blissful wind
Yeah, it's weird as fuck lol, but I think I get what you're getting at there
You need to get a GuildMember object in order to modify roles
What is the context of you adding a role
A user can't be in a guild, a member can
^
Just a verification command p much. Instead of having to assign the roles manually
gotchu
Makes more sense, I'm just overthinking now
Thanks you two
I mean if you are getting the user from a message, just use the member prop
π
And np
yes
I was gonna do that but stopped myself because I thought it wouldn't work, I guess I shoulda just tried LOL
always try π
I'll give it a shot!
Dope, that did the trick, just didn't assign the role for some reason
wtf that's so different from my autorole
so it'd have to be user.guildMemberRoleStore.add()?
var user = message.member;
user.roles.add(test);
message.channel.send(`${user.displayName} now has New Member role.`)
what is test
It displays the text that I set the role, but doesn't actually set the role
var test = '611249207764058113'
and that is a role id?
Yes
first of all those functions are both promises
So I'd have to async await it
Yeah
i would eval something along the lines of message.guild.roles.has('611249207764058113')
to verify you actually have the role id
im a little confused why you are overwriting user
cause it didn't work if I didn't, like we were discussing a moment ago
I want to be able to mention the user I want to give the role to
@blissful wind member is an argument type
oboi, I'm doing the whole thing wrong aren't I
psst, guild id is a string, not integer π
that too
woops, fixed that haha
Still can't seem to find the right way to change user into a member object
Get user, get guild, get/fetch member from user
@blissful wind you can do that^
but using djs commando, arguments have a type member
how to install discord.js 12.0.0?
I've tried npm i discordjs/discord.js --save
like it says on their website.
Make sure you have git installed
It was installed on windows still got the same error
If you do git it works?
Yeah I get loads of shit about how to use it.
What do you get when you do git --version?
Hm
Is listing servers in the console/terminal allowed?
ok how do you properly get cpu usage
Lang?
@warm marsh npm i --save discordjs/discord.js
:)
If you want discordjs v12
Or
In you package.json:
"discord.js": "github:discordjs/discord.js#405bdb5b558eff478d0bde739cee1ee8e40c330b",
and type: npm i --save discord.js
If you read the issue this is not a solution nor even considering of the original issue
awkward math question but if i have a length in ms and another length in ms for my song, like 1000 and it's 740 in, how do i turn that into a percentage (ie. 74% done)
You want to divide down to a 1% value and multiply back up to a 100%
So 740/1000 = .74 * 100 = 74
okay and how would i turn that into a dynamic script more, like songLength and songPlayed (being 1000 and 740 in the demo obv)
((songPlayed / songLength) * 100).toFixed()
then i got timo's great code to make a progress bar out of that

ah ok ran into a great issue on my side
so soundcloud are sick and give you the song duration, ty, but youtube won't
They give you no info?
Because iirc the get song info stuff should give some sort of length indication
well at least my current method doesn't
time to get crafty
soundcloud gives so much information
What do you use?
yeah i use a custom one
it powers @dusty bronze actually so i should be able to modify it and pull the duration
Yez
Ik that ytdl returns a contentLength
Specifically this data according to its github
GoogleVideo.contentDetails.duration 
getting ms from seconds is just sec*1000 right
Yes, seconds to ms is sec*1000
Or GoogleVideo.fileDetails.durationMs
okay
so i made those cons... is it possible to import them to another file or i will just need to copy them
(when i say other file i just mean another file in visual studio code
Yes
You can
@narrow kettle create a config.json and put:
{
"token": "TOKEN BOT",
"PREFIX": "k!",
}```
And in your index file
those are in the index file btw
const config = require("./config.json");```
oh ok
tnx
why does this not work? i have info commands just like that and it works
do glitch run only one file? (only the main bot file seems to run)
i can see so many issues with that
can you tell me what are they?
making a client for every new command file
mixing const and var, use let instead of var
not exporting things correctly, you don't put a whole new message event and bot in a file, you load commands and all in dynamically
using depreciated methods
using multiple events
and a couple small ones
i fixed the making a new client for every file(on my current code)
should i leave const as const but switch all of my var to let?
can you give me an example on how to export correctly?
not sure what you mean?(commands and all in dynamically, using depreciated methods,using multiple events)
!invite
@narrow kettle https://discordjs.guide/command-handling/
A guide made by the community of discord.js for its users.
tnx
!invite
it tells me client is not defined but on visual studio code there is no problem... can anyone tell me how to define it then?
you never defined client
@narrow kettle
oh right, yep im retarted pay no attention to me
All you should be declaring an instance of client, by doing new Discord.Client() instead
yeah i fixed it
@narrow kettle don't use sendMessage as it's deprecated, and why tf arw you checking if the message.author is a bot... outside of the message event
its literlly the same in Discord.js guild...
Uhm
message.author.bot is in the message event 
Will the amount of MESSAGE_DELETE event emits per one bulk message delete be the same?
I meant this
did a mistake, then fixed it
ye?
i mean... i just came back from 3 hours of math(school)... brain.exe stopped working at this point
I can releate
whats better to use, if or switch?
definitely*
b r u h
how did u define command
wtf
why are you doing that
"info version"
"info developers"
"info"
just checking stuff, those are not realy going to be commands
Omg...
@slender thistle I believe they are 2 separate events so doing a bulk delete will only create a bulk delete event and no message delete events afaik
since even according to the official discord api its a different endpoint for message bulk delete
and only bots can use that endpoint + less than 2 weeks
Understandable
yeah that shouldn't work
or import * as Discord from 'discord.js'
yeah this should be the correct import ^
idk if it will work for the one in that img
yup errors
es6
@grim aspen that works ?
welp
apparently imports don't work in vanilla nodejs
for es6 import I think they have some requirements like needing to define the module as es6
and as well as adding the experimental modules switch when running
maybe I did too much typescript lol
es6 imports are supported in node v12 arent they?
experimental?
and the switch must be passed to node
and the whole module must be in es6 (which clearly d.js isnt)
and the whole module must be in es6 (which clearly d.js isnt)
Not sure about that one.
Can I change the name of my bot ( I put vitas instead of Vitas ) ??
And second question it is possible to make some bold text with ** on vsc ?
yes and yes
lmao yes
Does anyone know why my version of Ubuntu has nothing installed?
go to your discord developer console
How do I make it show a picture in an embedded message? I'm trying to make an avatar command, but it only shows the URL.
let avatarEmbed = new Discord.RichEmbed()
.setDescription(message.author.username)
.addField("Avatar", message.author.avatarURL)
return message.reply(avatarEmbed)
This is what I get
Read docs some more.
Does anyone have a guide on how Structure.extend works in djs?
Never heard of that @warm marsh is it on master or stable?
@grim aspen he has the url
He just wanted it to not be a link
oh
display avatar url
He wanted setImage...
Master
@warm marsh what are you trying to do?
are you not listening?
i use it in my lib
I thought so Ill have to look at it
I'm trying to add some properties in the TextChannel and stuff.
I remember using it ages ago for doing that but I've kinda forgot.
@grim aspen he asked why it's showing as a link and not a picture
Methods*
show code @warm marsh
Of?
@warm marsh js Structures.extend("Message", Message => { return class extends Message { // add/modify Message methods } });
Then I just require the file inside my main file?
you have to call Structures from Discord, and do your modifications before you call Client
you can, as long as you apply it to the same Discord instance as you're creating a client from
you can for example, require Discord in an external file, do the modifications, then export Discord to your main file, then call new Discord.client() from your exported Discord
so instead of const Discord = require("discord.js") you would do const Discord = require("./yourmodifieddiscord.js")
oh ffs, i didn't see the second question
actually i think you dont even need to do that because of require cache
im not sure here, but once Discord is required from any file, subsequent requires should take it from the require cache, and if you modify its structures it should also reflect in the cache
i guess you need to experiment with it
How can i search for an ID? Like in my Avatar Command that i can do n.avatar 180112943612952577
Discord.js
Em, Using the Client but then that's for cached users. Idk if the DBL API can help you.
A guide made by the community of discord.js for its users.
async function fetchGet(url) {
fetch(url)
.then(async res => {
return res
}
}
console.log(await fetchGet('someurl')) // -> undefined
why it's undefined?
or how I can return the function in a .then()
Because of the Promise.
I'm pretty sure.
You could do js async function fetchGet(url) { return new Promise(function(resolve, reject) { fetch(url) .then(function(resp) { resolve(resp); }); }); }
Or shorten it to
async function fetchGet(url) {
return await fetch(url);
}```
I think that would work.

Not wrong.
never said it was wrong
"Not wrong" means you're not wrong therefore I was agreeing with you.
I know.
I have no idea how to explain why it's not working without googling how to explain it.
you arent supposed to just give them it. You need to teach them in a way.
copying things from stack wont help you learn
Depends, If you just copy it then sure you're not learning but if you learn why it works then you will.
simply telling them to await would've been sufficient
^
Await what though?
the only thing that does something in the entire method
"await it"
"await your fetch"
etc
Saying that no doubt would've ended up with them leaving the .then so there would be another question to why it's still not working.
as to why is because when they get their solution explained//in words they're encouraged to do their own research - which is more likely to stick with them, but when you just give them baked code it ruins the point of learning
How do we do bold text on Vsc ?
What do you mean?
**text**
Oh for sending messages.
you cant make it bold in the editor itself
You could have said "promise the fetch" or "await the fetch"
but when sending message, regular discord markup applies
obviously it means Max Listeners Exdeeded
You are listening to the same event many times
and it tells you how to solve it
please tell me you arent creating a new message listener for each command
@stray garnet
i see
but what can i do against it
well ik .setMaxListeners()
but where?
in index? in commandfile
@stray garnet you shouldnt be using 11 ready listeners unless you have a very good reason to
Huh wait what im not using 11 ready listeners at all

Im retarteded rn
Yes it is
have you tried googling what it means by that
nah
its a valid way of troubleshooting
https://www.stefanjudis.com/today-i-learned/nodejs-sends-warnings-when-you-add-too-many-listeners-to-an-event-emitter/ @stray garnet
just post your question
i dont invite my bot to my friend's server.
And anyone don't look the bot's website.
And the website write this: Bot awaiting approval - Please be patient, us humans take time to verify bots!
first of all, did you actually make the bot
you can use your bot's invite link, you dont need to wait for approval
if (receivedMessage.text.startsWith("neko")){
^
TypeError: Cannot read property 'startsWith' of undefined
// Prevent bot from responding to its own messages
if (receivedMessage.author == client.user) {
return
}
const nekoEmbed = new Discord.RichEmbed()
.setTitle('Nekos!')
.setImage("http://neko-bot.net/nekos/neko30.png")//nbapi.random.neko())
.setFooter('Made by LazyNeko', 'http://neko-bot.net/images/ownerimg.round.png');
if (receivedMessage.text.startsWith("neko")){
receivedMessage.channel.send(nekoEmbed)
}})```
Idk what's happening I'm new to js

Is startswith not a function or am I doing things wrong
Oh
content
I'm dumb

Nevermind I found my problem
By scrolling through docs for like 5 seconds
It's hard to see what it is on phone /shrug
I didn't mean anything bad with it 
I just meant in future cases, that's what it means
informed > uninformed
No
alright
I mean
it
doesnt
matter
dont make a big deal of strict typing
In most use cases it won't matter
iirc === has proven itself to be slower
I mean if you're sure you'll be working with the same data type 
doesn't really matter, just recommended.
https://oliy.is-just-a.dev/acfy2g_1572.png these are just 2 objects...
it wont make a difference here
In discord.py is it possible to send 2 embeds in one message
what do you mean
const Discord = require("discord.js");
module.exports = async (client, message) => {
const ban = await client.guild.fetchBans();
var voice1 = client.channels.get("629821895386071060")
var voice2 = client.channels.get("629821926516195350")
var voice3 = client.channels.get("629822000008921099")
var voice4 = client.channels.get("629822053230444544")
voice1.setName(`Members: ${client.guild.memberCount}`)
voice2.setName(`Humans: ${client.guild.members.filter(member => !member.user.bot).size}`)
voice3.setName(`Bots: ${client.guild.members.filter(member => member.user.bot).size}`)
voice4.setName(`Ban Count: ${ban.size}`)
```
**ERROR:** TypeError: Cannot read property 'get' of undefined
Are you sure client is an instance of the Client class
And client.guild isn't a thing
i would think client would be defined also
Anyone know if there's a way to paste a discord.gg link without the invite embed appearing?
Wrapping it in <> doesn't seem to work
<> only works sometimes if it has the default discordapp embed page. But doesn't actually hide the invite 
this happens when i'm spawning clusters
the shards on one cluster just randomly disconnect and don't reconnect after about say 10 or 20 minutes
this is in eris
this problem is seriously annoying since idk where it's coming from 
I mean in msg.send(embed=embed) can I send more than one embed in that one msg.send?
i have a rapidly growing bot which needs to hit a postgres database with every single message it receives, this is causing quite a lot of cpu usage
i'm planning on having a website dashboard and it should be able to horizontally scale so i'm wondering what i can do to reduce the cpu usage that will work with those requirements
anyone have any ideas?
if i have a cache, how can i ensure it's always updated with changes from other sources (another server/the dashboard)
some sort of wack json
idk
That's what I would do, or make it check only for specific messagss
i would love to do that but the whole point of the bot is that it checks for every message
which is making this quite a difficulty
Possibly store in cache and db but not sure if that's better
^
Instead of sending a post request to some server per message, sending it in a set interval would be best
Imo
so, a solution that results in, say, changes to the db via one bot instance/the dashboard taking up to a minute (or whatever the set interval is) to be reflected in another bot instance?
I guess
that could definitely work
@peak bloom whats the bot do?
@signal shuttle allows users to emulate having multiple 'pseudo-accounts' by detecting user-specified markers surrounding a message
restricting the format of the markers in any way at this stage with over 800k such accounts in the database isn't an option
I'd probably just dual write into redis+postgres
pull from redis, if not exists, grab from postgres and put into redis
and then setup some key removal technique like LFU and you're all set
You could even add a super shortlived cache on top of that locally on each instance if redis cant handle the load
my issue with that is if another instance of the bot, or the dashboard i'll be creating, makes changes to the postgres database those changes need to be reflected in a timely manner in the bot
so how do i handle that using redis?
I know, thats why I said dual write into redis and postgres
okay will admit right now i've never touched redis and don't know its capabilities lol
It's basically a super fast in memory db
its awful for persistent data but great for things like caches
A read from redis is insanely cheap
if it's in memory how will a website/other bot instance write into it?
a write as well
Wdym
It's just like a normal db
You could even make the write just invalidate the key in the cache
so that the next read populates it instead
this is pretty standard architecture for highly trafficced applications btw ^^
i'm sure, it's just that i'm a single developer with no experience with such things and i haven't the slightest idea where to start with many of these issues heh
Yeah, I mean
thats where i was a couple years ago
it just kinda gets forced on you
you either figure it out or stuff falls apart π€·
if you want, you could always slide in my DMs if you've got a coherent question
pls no "how do make bot good"
i appreciate that, and no worries i'm at least past that point lol
π
node keeps hanging up on npm install when trying to install master d.js, any ideas?
yarn fixed it
yarn op
Is there a property that returns reactions on a message and how many times the reaction has been used?
I want to implement a type of voting system
lib?
D.js
message.reactions
iirc npm hangs whenever installing large packages
updating the terminal sometimes helps
d.js aint that large
Idunno, couldn't find it when I searched "reaction"
Ok, so msg.reactions is a map of the type of reactions on a msg
yes, read the documentation
But it doesn't say anything about how many have used the reaction?
Or will there just be duplicates in the map if the more than 1 person use the same reaction?
it does, MessageReaction#count
you want to import libraries/packages?
Yes
python has some libraries already included https://docs.python.org/3/library/index.html
or you can install more from pypi, with pip, which should come with your installation of python https://pypi.org/
yes
okay, thanks
Do you know why this isen't working when I put the rigth command ?
error?
idk how install a pip in windows
it should come with your python installation. if it didnt, run the installer again and make sure you select to install pip
okay
I'm trying to make my bot do "Watching over x servers, .help" but it's in 2 servers and it shows "Watching over 0 servers, .help"
client.on("guildCreate", guild => {
console.log(New guild joined: ${guild.name} (id: ${guild.id}). This guild has ${guild.memberCount} members!);
client.user.setActivity(over ${client.users.size} servers, .help, { type: 'WATCHING'});
How do I fix this?
You used client.users
And don't do that
You'll get ratelimitted if your bot joins a bunch of servers in a small period of time
Your bot might not be growing that fast
But all it takes is 1 asshole to realise this and he can get you ratelimitted
anyone down for looking at code and telling me how i could do it better?
What should I do then?
language 
You can put an interval with a set time to update it
Or save when you've last updated it
And don't do an update if it hasn't been long enough
How though? I don't really know how to do that.
setInterval(functionToExecute, delay)```
You'd pass your client to it
So you can use client.guilds.size
Make sure you don't start the interval in some event
So it won't be there multiple times
hey does anyone know why im getting discord.errors.ConnectionClosed: WebSocket connection is closed: code = 1000 (OK), no reason on all shards after running my bot for a while?
alternatively, it could be concurrent.futures._base.TimeoutError
Something blocking or your bot is disconnecting by itself 
But tbh sounds like blocking
@slender thistle any idea how I would go about fixing that?
Anything you think that could take a long while to process?
@slender thistle I havent changed anything?
it was working fine and then suddenly stopped

So that's 2 people randomly getting that error
What's your discord.py version?
@slender thistle 1.2.3
@slender thistle so any idea on how I can fix it, a lot of people are waiting?
Not really sure how you can fix that apart from trying to see if anything non-async is left hanging in your code for too long
@slender thistle i'll have a look. Is there anyway to tell specifically where?
Nah chief
you'll have to apply logic and thinking and probably more testing
But then again, that's just my pure guess 
@slender thistle the only thing I can think of that would be processor heavy is doing the guild count because its on a lot of server, do you think that could be it?
because I haven't changed the code but obviously the servers have changed
@slender thistle ok, if you think af anything else, please let me know

does anyone know how to get the message logs to show a deleted message in a embed without the bot crashing as the message is no longer there but im trying to find a way of getting the content that was deleted without it crashing
in which library
i will show the code i have
bot.on("messageDelete", function(message){// message logs
const logchannel = message.guild.channels.find(channel => channel.name === "message-logs");
var user = message.author;
if(!logchannel) return
let deleteEmbed = new Discord.RichEmbed()
.setTitle("β οΈ A message was deleted!")
.addField("Sent by User", `${message.author.tag} (ID: ${message.author.id})`)
.addField("Deleted Message", ${message})
.addField("Deleted In", message.guild.channels.get(message.channel.id).toString() + ` (${message.channel.id})`)
.setFooter(`Author ID: ${user.id}| Message ID: ${message.id}`, bot.user.avatarURL)
.setColor("#FF0000")
logchannel.send(deleteEmbed)
});
but it crashes saying the embed is empty
on this line
.addField("Deleted Message", ${message})
but this is because the message is no longer there as it was deleted so this is causing the bot to crash
but this is discord.js
and people have said it only works in discord.py and thats not correct surely
what's the error
Well, fix the template literal
ooh @earnest phoenix
ey
i think the "smoothness" of how blocks fit together without gaps depends on font type ?
what about
Β«β£βββββββ Β»
that's pretty smooth
@earnest phoenix just trying to find the pic i took when i do can i dm you
but i like [β β β β β ] too
you don't have to dm me
what would those look like at 50%Β¨
ββββββββββββ
that looks good
woah, are those gradients colored for you too ?
using the minecraft brick wall banner ASCII
and yes wtf
ββββββ
why is there a rainbow in it
bruh
thats the most obvious one
lolΒ imΒ usingΒ NBSPΒ spaces
gtg i got a drivers ed class to get to
aight
@earnest phoenix the messageDelete event only has content if the deleted message was cached
so you have to check if the message content exists
it might also be a message without content, such as embeds from other bots
you can do something like ${message.content || "no content"}
dang it tim you edited what I was gonna say
hue
ahhh okay
so i just replace line 25 with
.addField("Deleted Message", ${message.content || "no content"})
yes
ah sorry, i sent that assuming you would use `
since you actually dont need backticks anymore
ohhh yeah i forgot to add it 1 min
you can just do it without them
can you guys help me with something?
usually i add the ` lol
well you can, but you dont need it if you're not mixing text with variables
Tim thank you very much for that i will let you know if this fixes my issue i have been trying to fix it for 3 weeks now and after a length time it crashes with the same error and was getting frustrating.. i have now added it so i will let you know in 10 hours if i get a crash as i have to go out now thank again
π
Give it cpr
Um, how old are you?
why?
eh
I asked a few days ago how to show how many users your bot is listening to, but bot.users doesn't work, how do you fix this
.python btw
i could tell u in js but idk if its the same for py
in js its
<client>.users.size
@golden herald
ok, do you have to use client or is bot?
because my whole bot is bot and not client
tell me if it worked
it didn't sadly thanks for helping anyway π
you can't give instructions which work on an entirely different language ΒΏΒΏ?? lol
(node:13339) UnhandledPromiseRejectionWarning: RangeError: Color must be within the range 0 - 16777215 (0xFFFFFF).
wtf does that mean?
.setColor(0xfff007f)
where is the error
that's not a valid 24* bit color
count the number of chars you have there
Hi
How do I send a bot message to all the channel that has the channel name info?
I tried client.guilds.channels.get().send
@earnest phoenix
refrain from spoonfeeding
Ahw Shit
That doesnβt post to all the servers
I got it anyways
I mapped all the channels
Thanks anyways
and it's api abuse//mass messaging to message to all servers - against the tos
for what is it? @earnest phoenix
well than ut would be ok i think
When I execute Β₯push , sends info I pushed to the 2 servers
And plus , not spoonfeeding if I provided code btw .
π
where i found dasha present bot for world of warships ?
is that even a question
How do I add the discord.js and node.js version to my bot's stats command?
require("discord.js").version
And process.version
Okay thanks berry :)
What meta tag does Discord use for the color when it embeds links?
I did some research and found something that told me to use this.
It's not working and I wonder if it's because it's actually wrong or if it's just because it shows like a cached version or something.
someone know how to sort a map by a property value ? like if i want to sort a map of guilds by memberCount instead of id
It's not working and I wonder if it's because it's actually wrong or if it's just because it shows like a cached version or something.
add a cache breaker to your url
@earnest phoenix you need to create another map/array
you can simply use .map()
or use one of d.js's collection functions
ah okay, so no built in function
+ev this.client.guilds.sort((a,b) => b.memberCount - a.memberCount).first(10).map((g, index) => `${index + 1}. ${g.name}: ${g.memberCount}`).join('\n')
is this what you want?
i guess, i thought there was a no spoon feeding rule though 
i suppose if you understand what each part does then its ok, its pinned in my server because i check it every once in a while so i just copied it here
u have one of those bots that runs code directly from chat ?
yea, an +eval command
Can I post my bot's link?
Its forbidden yes, if you want to use it, make it owner only
In my case I input a command and it outputs to the console
Nobody else sees the console
Can I post my bot's link? (Again asking.)
Okay
Yes or no?
NO
If you said okay, then no, then what is it?!
No
You have to wait for your bot approval like everyone else, anyway no one can see your bot page except you during the approval time
He okayed to me
I'm gonna check
I said okay for Ricochet 
I said I'm gonna check the approval.
What does that even mean
there's no timer or ETA for it lol
Basically wait a week
And pray
I have wait 2 weeks π
I had to wait a bit under a week luckily
Why this server is so active?
But yeah some of us are less fortunate
Cause it's good
It has 70k members lol
How do I add a picture to a long description?
with html
the image needs to be hosted somewhere, so you can link it
if you dont want to host it anywhere, you can use base64
With what code can I do this?
html
google html images
Okay thanks π
my bot have 200 servers rn and it makes average 300mb memory usage how can i reduce memory usage and what is sharding is that helpfull ?
Sharing separates the servers onto different areas, I guess. Though using it is a bit more difficult.
if you use 300mb at 200 servers something is wrong
unless you do music
or something really intensive
My bot was in 1000 guilds and used 300mb
Thats djs caching for you
Assuming hes using djs
Also, this server has 70k members. This server alone is worth hundreds of normal servers in terms of memory usage
This server alone is literally one third of my bot's 1600 servers
hi
how do i make it in html
that the image is clickable
and it gives you a link
wait no
this is wrong channel
ok bye
Or onclick, or img.addEventListener
I don't see a reason to use jQuery/js for something simple
@west spoke ty
How can i track how much an Server got Boosted?
@stray garnet What lang? 
Oh jeez, i'm using only py but I use server_boosts = message.guild.premium_subscription_count for py so js should be likewise
hm well i try edit it
Well for djs you can use https://discord.js.org/#/docs/main/master/class/Guild?scrollTo=premiumSubscriptionCount but you have to be on master
@stray garnet
Yea looked into a bit, @hollow saddle is more accurate.
No it wonβt, but you could upgrade to master if you really want it
Rewriting the whole bot :(
Not the entirety of it but yeah, itβs a pain since itβs such a big jump from v11
Are you using it on an embed
code?
^
oof ty
bot.on("guildCreate", guild => {
console.log(New guild joined: ${guild.name} (id: ${guild.id}). This guild has ${guild.memberCount} members!);
bot.user.setActivity(over ${bot.guilds.size} servers, .help, { type: 'WATCHING'});
This takes a while for it to register when it joins a new server.
How do I decrease the time for it to register?
Anyone know what to do about the high lighted part of my code? When I say Hello(in all caps) to my bot it does not respond
@coarse patrol a bot can only change its presence 5 times per minute
so its not a good idea to do that in the first place
It got kicked from a server 10 minutes ago yet it doesn't change.
well, you need to do the same on the guildDelete event
but its much better to do it on an interval
^

noice
Oh well I used a different sever share and it worked perfectly fine goodbye
yes
oh
we're keen on keeping things quality so if you're gonna use our art for something please keep it tasteful and send it our way for approval.
Should I do that then

awaiting the promise might tell you more
Okay
what is that unicode name
not what i was asking but ok
Oh
what is the response if you await the promsie
{ DiscordAPIError: Invalid Form Body
type: Value "text" is not int.
at item.request.gen.end (/media/root2/ER/node_modules/discord.js/src/client/rest/RequestHandlers/Sequential.js:85:15)
at then (/media/root2/ER/node_modules/discord.js/node_modules/snekfetch/src/index.js:215:21)
at process._tickCallback (internal/process/next_tick.js:68:7)
name: 'DiscordAPIError',
message: 'Invalid Form Body\ntype: Value "text" is not int.',
path: '/api/v7/guilds/599617087165563015/channels',
code: 50035,
method: 'POST' }
I have this
π€
read the docs lol
yeah you cant use numbers in channel names
But before that it worked.....
wait nvm you can



