#development
1 messages · Page 1364 of 1
that doesnt mean its installed
try re-running npm i or yarn
npm i better-sqlite3
show what happens when you try installing it
Delete the 'better-sqlite3' dependenci in the Package.json and npm i then npm i better-sqlite3
did it not occurred to you that if there are a bunch of errors when installing, it likely means that the installation failed?
Oh wait
your installation failed because python is missing
Delete the 'better-sqlite3' dependenci in the Package.json and npm i then npm i better-sqlite3
@regal creek ok
yeah install build tools and python
if you're on windows, you need to install build tools
npm i -g windows-build-tools from an admin powershell
npm i -g windows-build-toolsfrom an admin powershell
@quartz kindle ok
So I am completely redoing my entire bot cuz of sharding bullshit and for some reason this is not working:
const Discord = require(`discord.js`)
const config = require(`../config`)
const db = require(`../database/db`)
const prefix = config.prefix
module.exports.run = (message) => {
if(message.author.bot) return;
const client = message.client
Apparently client is not defined?
hmm
disk speeds are more trash xD
but still better than google compute engine
google's disks are 35MB/s
@blissful coral message client isn't a thing hhhhh
message.client??
use discord.client
It work's exactly like that on my other bot
idk
@young flame Not making a new one, the client already exists
hmmm
const client = new Discord.client()
When making the channel set the permissionOverwrites to everyone in the guild to not talk
@lyric mountain ya got results yet?
@young flame read what I said
It is my event
I am not making a new client
This is my message event.
message.client wont work
message clients fine
Thought so
Well I found one part
Thought so
@blissful coral it wont work lmao
new Discord.Message(clientdatachannel);
If you can give me a valid reason why it won't work
that is an option
what the fek
ik
That is what I am using
what are you pulling message.client from if your client isn't defined
did he say client is undefined
@solemn latch it isnt
what are you pulling message.client from if your client isn't defined
then whats this about
new Discord.Message(clientdatachannel);
@young flame
its a message event, if you receive a message, there is a client in there for sure
you need a constructor
if there was no client you would never receive a message in the first place
^
You don't need a constructor
Im not sure what your question is
@earnest phoenix busy
the docs says it
no lmao
the docs says message classes have clients

the docs explain how the Message class is made and how it works, it doesnt tell you to literally create an empty message instance lmao
whats your actual question though @earnest phoenix
it isn't empty
if you create it like that it is empty
when did i say just client?
portugal caralho
@quartz kindle tmb es?
hay carajo
I fixed the problem already
That is not it
@blissful coral ik shush
@young flame and where do you suppose you're gonna get the data from?
@earnest phoenix
https://discord.js.org/#/docs/main/stable/class/Client?scrollTo=e-voiceStateUpdate
I think this is the event for when users join vc
@quartz kindle would it be?
wait until it says ALL DONE
YES AAA
JAJJAJ
hi
con los dedos de los pies y las manos, con la polla y los cojonoes todos suman 23
lmao
hhhhh
When I use the shardingManager on discord.js, is there a way to get client from manager?
const manager = new ShardingManager(`./index.js`, {
Thought so thanks
BBB
@quartz kindle I'm back, I'll run the bench again and save it to a file this time
how can I manually put info into my dbl api connection upon start
because I can't get overall guild count
cuz of sharding
dblapi.js
a las doce me llama la señora culia
djs
dblapi.js supports sharding
you can use it normally with the autoposter in each shard and it will send the server count from each shard
Tim‘s is known to send his coinbot virus around make u earn Bitcoins for him

It well never stop to „install“
Defamation of the holy Tim. Heretic!
lmao
LOOOL
restart your pc and try again
@quartz kindle nono
seeee
se
mira
in vsc if it installs me and although the powershell is closed there, things continue to install
now
this
did you define sqlite?
you already know the answer to that, Woo 😛
const { Client, MessageEmbed } = require('discord.js');
const Discord = require("discord.js");
const SQLire = require("better-sqlite3");
const client = new Discord.Client();
const sql = SQLite('./treeLogs.sqlite');
module.exports = async (client, message) => {
if(!message.author.id === message.guild.owner) return message.reply("You do not have permissions to view chat logs.");
const msglogs = sql.prepare("SELECT username, message FROM lounge LIMIT 1").all(message.guild.id);
const embed = MessageEmbed()
.setTitle("Message Logs")
.setAuthor(client.user.username, client.user.avatarURL)
.setColor(0x00AE86);
for (const data of msglogs) {
embed.addField(client.users.get(data.user).tag, `${data.username} points (level ${data.message})`);
}
return message.channel.send({
embed
});
}
what's up with that
lmao
const SQLire
SQLire
SQL
L
muchas gracias guapos
SQLite lies
if(message.content === "pog") {
message.channel.send("poggers")
}
i get a not pog enough error
how to fix
@young flame copy paste pog gets and pog in different fonts 100 times lol and make it ping the user saying pog in the dms
That’s ultra pog
ok
does anyone have an idea on how to check if a user is in the message.guild without server members intent
try fetching them?
apparently, in my case, fetch was able to fetch the user, even after they left the guild
idk how is that
they would still be in cache, which fetch checks cache first
message.guild.members.fetch({user: id, force: true})
i tried that
didn't work for me
or am i doing it wrong

@quartz kindle
message.gulid doesnt exist
looks like you logged in on 4 instances, login on only one @drowsy kite
Woo it exists in my case
gulid?
lol
guild does
The problem is
gulid doesnt
looks like you logged in on 4 instances, login on only one @drowsy kite
@solemn latch ?
oh?
problem is, it still fetches users without being in the guild
@solemn latch how do i login on only one?
oh lol sorry
instance
yeah gulid is supposed to be guild
force: true should only get stuff from the api, if the api says that the user is in the guild, i am not sure how you solve that
@drowsy kite depends on how you host it. whatever command you do to run your bot, you ran it 4 times without closing the other ones more than likely
if the user doesn't exist, does .catch(x => work
catching the error when it doesnt?
@drowsy kite depends on how you host it. whatever command you do to run your bot, you ran it 4 times without closing the other ones more than likely
@solemn latch i don't have my bot in a host, he is vs code in terminal 😂
yes, but you really should try and have as few of those errors as possible @fiery canyon
the proper way is the intents
i mean i already emailed them about it
this just being a bandaid till you can get that intent
yeah
@drowsy kite if you're hosting locally, you need to stop the other 3 processes
or, if you restart your pc and only open one, and close it before launching another
@solemn latch 🙂
app.post('/webhook/dblwebhook', (req, res) => {
const message = req.body;
const headers = req.headers;
if (headers && headers.authorization === token) {
res.status(200).send();
console.log(message)
client.user.fetch(message.user).then(e => {
const voteembd = new MessageEmbed()
.setAuthor(e.tag || '', e.displayAvatarURL() || '')
.setTitle("Someone just voted")
.setDescription(`${e.tag} Just Voted :love:\nThanks for Voting! You can also vote me on https://top.gg/bot/BotID/vote`)
.setColor("YELLOW")
client.channels.cache.get('773326789837586432').send(voteembd)
const dmvote = new MessageEmbed()
.setTitle("Thank you vor voting White Cat :love~1:")
.setDescription("We really appreciate your vote :love~1:")
.setColor("RANDOM")
e.send(dmvote)
.catch(er => {
})
const support = client.guilds.cache.get("742313007681634344")
if(support.member(e)){
support.member(e).roles.add("771458666318397440")
}
})
} else {
res.status(403).send();
}
});
Why does when someone votes, then i fetch it, it returns the bot itself? but when i log message.user, its the user?
where are you getting message?
oh
i see
not sure why body is named message, kinda confusing
Anyone know how to make a bot DM people a certain thing when they react to a message?
client.user.fetch isnt doing what you think it does @prime sonnet
https://discord.js.org/#/docs/main/stable/class/Client?scrollTo=user
seems like you pinged the wrong person
oh wait.... yeah, i just realized, its client.users, not client.user
I ve heard a lot about a Content Management System for Discord Bots.....For what do they need that?
I mean like Mee6 does have one
But for what?
cms does a handful of things.
it makes big projects with a dev team easier mainly afaik.
You mean a mod mail bot?
?
Oh I read it wrong, thought that said "Contact Management System"
uh am I allowed to repeat my question?
@lyric mountain cpu is dope, but those disk speeds are a no from me unfortuntely
I mean I’m updating my Bot every day.....And I saw some bots have a cms....And I want to know what it does because if it’s good I will Programm that
Elf do you want it to be on every reaction or on a certain occasion, like after a user runs a command.
if its just you, i dont see why you need cms
@lyric mountain this is what i have at galaxygate
Elf do you want it to be on every reaction or on a certain occasion, like after a user runs a command.
@sudden geyser after a user runs a command
if its just you, i dont see why you need cms
@solemn latch because I want the best for my Bot....And I don’t know what a cms is bringing the bot to get better....
And if it’s helping my bot....I am doing this
it makes development easier for large developer teams
LOL
client.wait_for may be what you're looking for: https://discordpy.readthedocs.io/en/latest/api.html#discord.Client.wait_for
it makes development easier for large developer teams
@solemn latch only That? Nothing more?
alright I will check that out, thanks!
not that i know of
@weary socket what is a content management system
A content management system (CMS)[1][2][3] is a computer software used to manage the creation and modification of digital content.
CMSs are typically used for enterprise content management (ECM) and web content management (WCM).
ECM typically supports multiple users in a collaborative environment[4] by integrating document management, digital asset management and record retention.[5]
So git?
yeah, pretty much
since my bot is mostly heavy processing (games, image manipulation, yugioh, etc) I kinda like those specs
I self-host
but as you said, depends on your use-case
I only get up to like 15% RAM at most
for the one month i can afford it
yeah classic yugioh heavy processing
rpi 4 Friend^
yeah classic yugioh heavy processing
@hollow sedge fully simulated table + deck + cards effects + fields + whatever
all this having computer generated graphics
so yeah, heavy processing
oo
Epic
Why not an api or something?
i am about to move to opengl
opengl is dope IF you can understand it
yea
its not that bad
Why would you get an rpi instead of a vps
I gave it a glance and BOI does it look like binary-puke
Why would you get an rpi instead of a vps
@hollow sedge Personal preference
AWS is unstable
For me at least.
What
And I already had one(rpi)
Tons of companies use aws
Yeah
It's not unstable
For me my bot went offline 2 to 3 times a day
I host my bot on AWS
It's never down
"You reached your ratelimit"
Wth
When my bot didnt have commands
That's not aws
I was running basic example code(a spinning 3d model) got between 5000 and 7000 fps.
considering most of my commands use 200-300 frames on average its a massive performance increase from the 400fps my software rendering gets per cpu core.
@lyric mountain https://cdn.discordapp.com/attachments/163155995432976384/767849484172132352/unknown.png
hecking sick
☕ imagine copying a status
I did
so did i 

What's your point
No but what were you saying
Nevermind, please.
whats your point, he literally doesnt do anything (you probably wont get the reference)
I just don't pay for whats not exactly necessary.
If I have an open server why not use it.
Are you saying you don't like the OS options
Ok
amazon is expensive once your free trial runs out
It doesn't really matter.
there are plenty of better options
kinda yeah
Like how much tho
|| Why don't people just drop it lmao, its not like I said anything hateful||
Imo digital ocean and aws are too expensive better to get a host from galaxygate/servercheap if you want to run a bot
Heroku 
Contabo is meh for performance but has lots of storage for website stuff
Heroku is joke right
Yes
heroku is 24 days a month now free right?
Of course
then like super expensive to buy 6 more days
Idk or care

That's honestly a good idea tho
Like just make it less than a month to stop people from doing that
Wait no
took too long for me to find it
500mb ram for $3 oh god
You can get 1000 hours per month on heroku
Most other hosts do $3 for 1GB at least
Yes
if you use more cpu you get less hours
Oh
That just throws out the whole point of hours
does aws not even give you the cpu info
@prime cliff which one s that?
Oh you mean like that
Servercheap Tim and galaxygate has a similar one too
I thought you meant cpu usage
every vps gives you cpu usage info
$3 for 500mb ram on amazon is bad compared to other hosts that have less infastructure
I sure hope so
tf
im dead
Who would pay that
This might be a dumb question but can you setup deploying from GitHub on a VPS/DigitalOcean
sure
CD Pipeline
anyone uses servercheap? would like to see benchmarks
Nop
It gets good performance.
@worn shard If you want to brag about good performance how about a 72k server bot with guild members cached using 1.7 GB ram 🙃
Yeah CD Pipeline, is that limited to some hosts?
on the $3 tier @quartz kindle ?
ye
@worn shard If you want to brag about good performance how about a 72k server bot with guild members cached using 1.7 GB ram 🙃
@prime cliff k cool
Js would hog 4 GB for that
ye not bad
Yea servercheap is pretty good even though galaxygates network is nice i have a servercheap vps 12 GB ram 6 core cpu for $19.20 atm
also who hacked my pc and installed trojan?
cant think anywhere else anyone would put a QT process 
\🍪
Probably would not be best to run a benchmark as i'm running a bunch of bots and api
on it atm
likely wont matter much
im mostly interested in disk speeds
curl -sS https://raw.githubusercontent.com/jgillich/nixbench/master/nixbench.sh | sh
it really scares me that tim either has that memorized or have that link handy
within second he pulled that link outta nowhere
no, i always open a new tab, get it from autocomplete, open the page, copy and paste
i think it was a matter of a couple seconds before you sent that lol
oh
i though u only had the link
no i go to the repo and copy the link from there
I'll test it on another servercheap vps hang on
whats genshin
2 GB ram 60 GB storage and 2 cpu
oh nice, thats the one im aiming for
I have never heard of it lol
pve, openworld, rpg, waifus, lots of waifus, lisa moaning while climbing walls, coop, and memes with paimon being food. That sums it

it runs a few different tests
cpu, disk, network
@opal plank im a shitty league fanboy
then you gonna love this game
they have characters n shit
and shooting people
its basically league
towers: Check
Charcters: Check
Fight? Check
its basically league of legends

cant believe im developing a bot for it
i wonder if OCR is against their TOS
Network takes a while
probably is
Also Woo is that amazons plan benchmark?
i dont have that one, but the website i was looking at said it was crap
until you start spending over $50
No the screenshot benchmark what host is that from?
servercheap
Wait what
I bought the $3 plan to see what it was like
The 1 GB plan?
ye
Oh
ima run an uptime test for a month and see how it goes
if its good i might swap hosts
2 GB one is this but disk read/writes are low probably cause i'm running a database on this with multiple services connected to it 🙃
they dont give you cpu passthrough?
thats pretty bad
do they give refunds? if i get those speeds im gonna want a refund lmao
Wait the script is still running after host
Yea thought so also this vps is in chicago with these speeds
yikes the network
Yea not sure what's up with that 
the results are fine
i upload like 20MB gifs regularly
@solemn latch show your network test
oop
Older vpses probably what does cpu passthrough basically do?
it gives more hardware level interaction iirc
enables full cpu virtualization, gives you access to hardware features such as AES instructions
Ah ok
you can request it
ask them about it in their support and they will enable it for you
i had to do that on galaxygate
Would that actually do much? considering i run a database on it too
depends on how optimized your shit is
for example if you have anything that uses cryptography, then yes
cryptography is highly optimized to use low level cpu instructions
Wait lemme run htop
honestly, cpu score on mine was kinda terrible.
1487 servercheap $3
2465 galaxygate $3
ye
About 2-3% cpu usage and 567mb ram usage
Galaxygate probably has better hardware tbh than most older hosts
oi @opal plank
no wait, you already got a sick ass server
hey tim, need a server for a side project

lmao
I would switch to galaxy gate tbh but i'm pretty comfy with my 20% off 12 GB ram for $19.20 🙃
a friend of mine managed to get a supercomputer through their company, and im on the verge of asking her if i could use it

honestly, really good platform if you dont depend on cpu speed
saddly everything right now to me is cpu speed
and internet
can erwin fuckup a supercomputer? bets?
theres a company that was renting it out by the minute
insert finally a worth opponent meme here
a super computer*
i dont know how or why they renting it
she just told me they got one rn theya re using
we really need to have a public vps benchmark
do it
whos going to make the site for it
just make a google sheets
sadly, I suck at sheets
wait for what?
documenting VPS's performance
As in different companies and plans? and network cpu, ram and such?
yeah
using this command to test them
curl -sS https://raw.githubusercontent.com/jgillich/nixbench/master/nixbench.sh | sh
cool concept and probably exists already but it would need to be popular or it would tell you stats of like 10-20 different VPSs max
many similar things exist but they are all over the place
adding another one would probably just bundle it to the mix
doubt it'd become an unified thing unless it suddenly grows or is very well done
preferrably both
yeah
yeah but it could be something like a comunity shared resource
instead of relying on unknown methodologies and stuff done by other people
const { ShardingManager } = require(`discord.js`)
const config = require(`../config`)
const manager = new ShardingManager(`./index.js`, {
token: config.token,
totalShards: 'auto'
})
manager.spawn()
manager.on('shardCreate', shard => console.log(`Starting Shard ${shard.id}`))
kind of like a private list built by discord bot developers
Heck, if everyone wants to send me their VPS's tested with what host and what plan it is, I can throw something together.
const Discord = require(`discord.js`)
const client = new Discord.Client({ partials: ['MESSAGE', 'CHANNEL', 'REACTION'], ws: {intents: 14017}});
const eventhandler = require(`./events`)
const commandhandler = require(`./commands`)
console.log(`Starting Handlers...`)
eventhandler.run(client)
commandhandler.run(client)
Index.js
if the shard is dying then the problem is in the shard
lmao
@solemn latch I would if other people do
but im having a hard time trying to figure out how to format one in a way that looks nice
spreadsheets are hard
to be honest, I have never made a real spreadsheet
i've made several
okay good, we make tim do it
lmao
Tim already does so much for this channel tho
i'll look into something
this one looks interesting tho https://vpsranking.com/en/
VPS's computer performance can changed so big if CPU core is same,so it's important to choose best VPS for U based on result of benchmark.Vps Ranking .com offers U unixbench result of all plans of major VPS companies.So U can choose Ur best VPS
but of course it only has the popular ones
we need a list with unpopular hosts, like stuff from lowendbox and lowendtalk
message.guild.members.cache.find(r => r.user.username.toLowerCase() === args.join(' ').toLowerCase().split("--test")) || message.member;
avatar username --test
not working. still sends my avatar.
If you end up making a spreadsheet, you should get it pinned here
could make a github repo as well
so you are taking args (array) setting it to a string, then making it an array
and then comparing said array to a string
What if it was just super simple
could be easily tampered with
well, just have a few of us manage it taking filling it in
and have them submit to us
could make a github pages load the content for visualization and have people PR and post a pic of the benchmark for proof
so then no one could make strange changes and it could look as you wanted it to
yeah that is a good idea
What would you store the data as? a json or something?
tbh
make a command
and just ask for input
something small that just saves a string
did this just become a bot thing now
That would make it easier for people to submit changes
another thing is
how to handle ageing and multiple people testing the same service
how to handle variable results for the same service
average tests?
not sure about ageing but we could save data as an array with objects and all of it would be averaged
we could have an age field and if it gets too old it can be replaced by a newer test
yeah
yeah but at least mark it with an old tag or something so people would know it is wrong
ye
So is this something that will actually happen or are we just conceptualizing it?
for now just conceptualizing
ok
im a perfectionist, so if im actually gonna do this, im not gonna use nixbench
i'd look into developing my own benchmarking tools
or throwing in my custom mix of existing tools
because there are also important things out there such as ram r/w speeds
Your python file isn't where your system thinks it is
Hm, python too?
its missing for some reason
Should be in the directory above
I'm not that knowledgeable with python but I would guess reinstalling would help
ok did a quick reinstall but now a new error
Traceback (most recent call last):
File "c:\python38\lib\runpy.py", line 193, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\python38\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Python38\Scripts\pip.exe\__main__.py", line 5, in <module>
File "c:\python38\lib\site-packages\pip\_internal\__init__.py", line 40, in <module>
from pip._internal.cli.autocompletion import autocomplete
File "c:\python38\lib\site-packages\pip\_internal\cli\autocompletion.py", line 8, in <module>
from pip._internal.cli.main_parser import create_main_parser
File "c:\python38\lib\site-packages\pip\_internal\cli\main_parser.py", line 11, in <module>
from pip._internal.commands import (
File "c:\python38\lib\site-packages\pip\_internal\commands\__init__.py", line 6, in <module>
from pip._internal.commands.completion import CompletionCommand
File "c:\python38\lib\site-packages\pip\_internal\commands\completion.py", line 6, in <module>
from pip._internal.cli.base_command import Command
File "c:\python38\lib\site-packages\pip\_internal\cli\base_command.py", line 26, in <module>
from pip._internal.index import PackageFinder
ImportError: cannot import name 'PackageFinder' from 'pip._internal.index' (c:\python38\lib\site-packages\pip\_internal\index\__init__.py)
offtopic but, most recent call last, if its most recent, its also last, so whats up with that?
how do i run a function every like 1 min?
im a snake boi

is it possible to check & get the ids of everyone who has a role and run code>
is it right?
Yes
ye
its for a support bot
like its for the premium
im making patreon give role
and i check for it etc
if you got GUILD_MEMBER intents, yeah
i can check who has a role?
yeah
guild.<member>.roles.cache => map<id, roles>
actually
nah thats fine
iterate on guild.members though
run a reduce function or a for loop
someone help me with tracking used invitations?
One message removed from a suspended account.
Hi! In discord.js does .permissionsIn and like .hasPermissions account for admin and overwrites?
Thats kinda a uhhhh very odd thing to do as discord doesnt really track who made the invite in the api
@sage bobcat
is that I saw a code in github but it does not work for me, it gives me errors and I need help
One message removed from a suspended account.
One message removed from a suspended account.
@tame kestrel there is an option for it, i think it's true by default
I already know it
@tame kestrel there is an option for it, i think it's true by default
@pale vessel weird ;/ It seems like my bot isn't functioning the way I want to
How would I make my bot send something after it gets a ping?
only for hasPermission() https://discord.js.org/#/docs/main/stable/class/GuildMember?scrollTo=hasPermission
@drowsy pumice check the received message for a ping to your bot
probably using String.startsWith()/lang equivalents or a regex method
k
store the times things should happen at somewhere and then reschedule on restart
I am Hosting my Bot in heroku and this is the Error2020-11-04T04:15:19.940570+00:00 app[web.1]: Error: Cannot find module 'dblapi.js' 2020-11-04T04:15:19.940570+00:00 app[web.1]: Require stack: 2020-11-04T04:15:19.940571+00:00 app[web.1]: - /app/index.js 2020-11-04T04:15:19.940571+00:00 app[web.1]: at Function.Module._resolveFilename (internal/modules/cjs/loader.js:831:15) 2020-11-04T04:15:19.940572+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:687:27) 2020-11-04T04:15:19.940573+00:00 app[web.1]: at Module.require (internal/modules/cjs/loader.js:903:19) 2020-11-04T04:15:19.940573+00:00 app[web.1]: at require (internal/modules/cjs/helpers.js:74:18) 2020-11-04T04:15:19.940573+00:00 app[web.1]: at Object.<anonymous> (/app/index.js:4:13) 2020-11-04T04:15:19.940574+00:00 app[web.1]: at Module._compile (internal/modules/cjs/loader.js:1015:30) 2020-11-04T04:15:19.940574+00:00 app[web.1]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:1035:10) 2020-11-04T04:15:19.940575+00:00 app[web.1]: at Module.load (internal/modules/cjs/loader.js:879:32) 2020-11-04T04:15:19.940575+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:724:14) 2020-11-04T04:15:19.940576+00:00 app[web.1]: at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12) { 2020-11-04T04:15:19.940576+00:00 app[web.1]: code: 'MODULE_NOT_FOUND', 2020-11-04T04:15:19.940577+00:00 app[web.1]: requireStack: [ '/app/index.js' ]
add the module inside your package.json
taking notes is amazing 😄
Does enmap mongo db work without issues ?
anyone knows PHP?
just ask
don't ask here for devs
anyone?
My function accepts a array of string or parameters of all string.
How do I define its typing
just a min
@earnest phoenix you send code
insult 😦
no mate no
@old cliff Dms?
What is the difference between using Array.from(array) and [...array]
I've read somewhere not to use built-in classes to define strings, arrays, integer etc
array from takes a function and runs anything in provided array through it before pushing it
...array just puts the contents of a different array into the current one
So which is the better approach?
... deconstruct it, the [] puts it in a new array
what are you trying to do
I'm trying to contruct a function that can accept both an array and parameters of any size.
Then I want to transform it into an array to loop through
What I did so far is....
function abc() {
const array = [].concat(...arguments);
return array;
}
abc(1,2,3);
abc([1,2,3]);
// both returns [1,2,3]
array from seems like a better way to go
But I've read that, we should not use js instances of Array, String etc
my bot doing things twice don't even have terminal on
wot
When a bot duplicates the output is probably a second console already opened at VSCode or something
yeah how come sometimes when i terminate my bot in vscode and then rerun it there are two instances going?
If you terminate your vscode terminal and try using and command on the bot, do you get a single response or no response.
js v12```
const songInfo = await ytdl.getInfo(args[1])
Why i have a error in this code
In getInfo
it's not js v12, it's discord.js v12. also ytdl has nothing to do with discord.js or js.
If i use fs.readFileSyns(dir).then(file => {}) it reads the old version of the file. How do i refresh it?
can we send multiple images in embeds?
Author image, thumbnail, main image
1
inline
not more
hey I can't get the dbl webhook working when I try to host my bot on heroku
what should my procfile look like so I can setup the webserver?
So, if you can't embed multiple images in the body
How do you achieve something like this? I mean, you can't possibly go create images for all possible combinations
i never tried it but i saw somewhere we could embed base64URI so thought maybe we could
i see
you need to upload the image as buffer and attach it in your embed
does <Array>.flat() exist in node12??
Hey flaze, have you used typescript? Are you good in it?
<div class="container px-lg-5" id="container">
<div class="row mx-lg-n5">
<div class="col py-3 px-lg-5">Thing</div>
</div>
<div class="row mx-lg-n5">
<div class="col py-3 px-lg-5">Another Thing</div>
</div>
</div>
``` turn into https://i.imgur.com/awfOPCa.png
how do i cut these https://i.imgur.com/7fGHz1W.png (im using bootstrap)
try uploading direct images
images?
yeah, these imgur images. I can't see them
or are they the same u already uploaded?
second pic isn't really necessary, i just want the right side to be like, shorter
I want to code the number of servers the bot has
Frankly, I do not know or understand programming
learn it
I tihk its Node.js
no one might paste the code for it
what language even
const bot = new Discord.Client();
lmao
Arabick
Yes
so in your command
hi, i want to asking. can i use nekos.life endpoints and get aproved from top.gg?
@neon heart no
nekos.life is a big no no
ohh ok
What
can you give me other api can make action command like slap and other?
your bot will get declined immedietly
@young flame ok tq
Are there Arabs here
with different slap gifs
and then make a random array to pull the gifs from
Are there Arabs here
@gilded dawn i know arabian
💀
hmm ok
طيب
i speak 8 languages
حسنًا ، ماذا تحاول أن تفعل؟
أريد ان اعمل حالة البوت الخاص بي يظهر بها عدد السيرفرات المنظم اليها البوت
Did You understand
Ok take your time
تحدث بالعربية
التي يجب أن تعمل
نسيت التحدث باللغة العربية lmao
nah
probally spelt something wrong
i woke up like 15 minutes ago

good morning
and it isn't something i speak very often
thanks and gm to you to
welcome
if i dont respond alot it's cause i'm building a support server to
Stop writing right, my thumb is in the way
what do you want ?@gilded dawn maybe i can help you
nope
I want to create the state of my bot showing the number of servers the bot is organized into
ah, like total guild join?
I want to create the state of my bot showing the number of servers the bot is organized into
@gilded dawn look through setting your bots activity and gettingn the guild count
@neon heart You can help me ?
in djs v11
client.guilds.size
in djs v12
client.guilds.cache.size
Look through the d.js documentation
what version of discord.js?
setPresence is the magical keyword
@neon heart How do I get that I don't know
🪄
bruh
hhhh
go to package.json and see djs version
eh
time to update! v11 is broken
update what
npm i discord.js@latest
every time I come to ask bout something everyone uses discord.js so sad
Yes
y'know what I'm not even sure how to do that in repl.it, something about going in the "packages" and updating from there, I have no idea
linux 
jesus
npm i -s discord.js@latest
npm should be run outside of the node repl, in your normal shell.
(Press Control-D to exit.)
(To exit, press ^C again or ^D or type .exit)
@neon heart
Right do any of you have any recommendations for sharding





