#development
1 messages · Page 1702 of 1
i don't understand the ref thing
probably got a reference
how do i access?
do <Collection>.get('🟢')
or
if thats ur first
<Collection>.first()
i think d.js implements first()
It does
then perfect
first? the first part of the map?
it's like the first react?
Collection<K, V>.first(): V
should, yes
@opal plank @lament rock thx it works well
How to do that if someone votes my bot i would get a message in a channel
use webhooks, check the topic of #topgg-api
If you present a toast for someone to vote for your bot, you would have to store a user ID and a message ID and a channel ID in memory or in a database which can be accessed at a later time and get the channel by ID and get the message by ID
Hi.
In the value argument, can I make a loop inside it? 👀
loop to do what
Loop through an object.
hi @opal plank
depends what you want to do with the Object. You can use methods on ArrayLike which return an acceptable value for MessageEmbed.addField value like Array.map or Array.reduce which iterate over the Array and return a value
Object.values(obj).map
how do i import a file from a folder above?
add.py
-> calculator.py```
and i want to import function from add.py
in the calculator.py file>
Can't you do from ..add import function
shouldn't it be a package?
hmm ok

sure
im testing this cooldown, i have this it kinda works for one person just doesn't trigger like it should after the message is sent the first time that sends with it then ill try n figure out how to convert it to be a guild cooldown
if (message !== null && timeout - (Date.now() - message) > 0) {
let time = ms(timeout - (Date.now() - message));
message.channel.send(":x: There Already Was An Explosion. " + `Try Again In**${time.minutes} Minutes**`);
}
my english broke in that sentence
https://detritusjs.com/ website/docs
https://www.npmjs.com/package/detritus-client npm
https://github.com/detritusjs/client gh
https://discord.gg/NEq6wws support server
https://github.com/cakedan/notsobot.ts/tree/master/src example of a good bot
PogYou. Gracias
No problemo manito
You're subtracting a message from a date? What's that supposed to do?
I know instanceof Message can be coerced to a string which can be coerced to a number, but I don't think JS takes that route ever unless explicitly written.
Not the answer tho xd
Erwin probably has all the detritus links open on chrome or something waiting for someone to ask about it
I thought Erwin was a bot made in detritus?
selfbot?
Possibly. Natural language isn't impossible
It's a vicious cycle
Interesting
does it have an init file
no but its not a package?
its just a file with a single function?
idk, im not used to cooldowns, its to prevent the command being abused really as it mass pings 10 random ppl lmao
hence why i asked
yeah but its a file
not a package
so thats my issue
i alwats struggle with importing functions
from other files
Sec
How do i get the permissions set for a specific role in a channel? discord.js
https://discord.js.org/#/docs/main/stable/class/Role?scrollTo=permissionsIn total perms
<#development message> overwrites
i have only found the final permissions but i need to get the permissions for only that role
even if its unset
Then you should subtract the time you received the message and the last time the command was invoked
or well
You shouldn't subtract 2 different types of objects just because
GuildChannel.permissionOverrides: Collection<string, PermissionOverwrites>
you can get the PermissionOverwrites by ID since it's keyed by either member IDs or Role IDs
How to make a dj only Command
check if a member has a role
has anyone used discordphp here
@drifting wedge
# cogs/fun.py
from bot import TestCog
print(TestCog)
# main.py
class TestCog:
pass
Works
Don't ask me how or why, but it does
wdym class as a func
idk
that's just my example
seems so
ty
# cogs/fun.py
from bot import test
test()
# main.py
def test():
print("w")
so yeah
you get the gist
has anyone used discord php
just ask your question
lemme explain exactly
so basically
i have a user profile data structure
for user data
if you only need to send a message, why not use curl?
but if i edit it, i dont want to edit it in all the cogs
i cant figure out how to im looking through the docs
so i have the cogs import this one function that has the user profile]
so o i only edit it there
i sound rlly dumb
Sounds interesting. Does the function cache anything, or like... how does it work?
And, also, does it work?
That question bothers me more than anything rn since my head hurts
it does
but i need to import it in the cogs
async def createUser(id):
user_info = {
"_id": id,
"account_info": {
"premium": False,
"bought": None,
"ends": None,
},
"quests": {
"level":0,
"xp":0,
"active_quest_ids":None,
"quest_timer":None
},
"currency":
{
"on_message_multiplier": 1,
"bank_limit": 2500,
"bank": 0,
"type" : "multiplayer",
"coins" : 0,
"tokens" : 0,
"tickets": 0,
"pets": None
},
"lootboxes": None,
"levels": {
"level":None,
"xp":None,
},
"pet": {
"alive": True,
"name": None,
"training": {
"level":None,
"xp":None
},
"age":None,
"id":None
},
"profile": {
"bio":"No Bio Set",
"title":None,
"badges_active":None,
"badges_owned":None,
},
"guilds": {
"in_guild":None,
"guildname":None,
},
"daily_rewards": {
"day":1,
"date":None,
},
"daily_quests": {
"level": None,
"xp": None,
"current_quests": {
"today_quests": None,
"today_quests_complete": None,
}
},
}
collection.insert_one(user_info)```
sorry for spam
That's the function that you want to import?
yes
why...
camel case in Python reeee
why is that async
and why is that hardcoded
and why is that even in a function scope

just because it's a coroutine function doesnt mean it wont block
It doesn't magically become asynchronous anyways so the async is redundant
it just means if it wants to yield to a future it can
hence why time.sleep in a coroutine still blocks 
it gets called in another async func
That doesn't matter really
:p
It's still just redundant 
The execution time with pymongo isn't noticeable so I wouldn't worry about that
ehh i mean i want to make it as fast as possible
It's always a good idea to switch to async driver in this case nonetheless
Making something async doesn't necessarily mean making it faster
Motor is deprecated, isn't it?
I'm not saying that, your async def is superfluous no matter what
motor's deprecated?
No clue, haven't used mongo actually
Haven't seen it updated a few months ago when I looked at it
Oh, 4 days ago last commit
Yeah I'm not sure what the fuck made me think it's deprecated
pymongo works fine?
nice you responded
a?
wait so shiv, what do i need to do for the importing of the function again?
Is it a method or a file-level function?
Then yeah, from cog import createUser I guess
yeah thw issue is the relative import beyond top-level package
@slender thistle
attempted relative import beyond top-level package
sorry for the ping lmfao
and thanks for the help 

import cog; cog.createUser
wdym a class
Can you show what the file looks like?
YOU TOLD ME TO
errr
well i cant lmfao
im on mac cuz travelling
and it cant run discord bots lol
so im just winging it all lmfao
lol
might vps it
but idk
ill be travelling for lie 4 months lmfao
when i get back
wew
I mean, it should be good
me telling my team we need to rewrite some stuff
current code: if 'false' == funtoggled:
lmfao
how do i check if a bitfield contains SEND_MESSAGES ?
The bit is 0x800
(<YourBitfield> & <SEND_MESSAGES bitfield>) === <SEND_MESSAGES bitfield>
@slender thistle i know im hella annoying but last one: attempted relative import beyond top-level package
from ...userprofile import createUser
I am trying to specifically check if the @ everyone role is allowed to send messages or is neutral
in a channel
import userprofile
What lib
discord.js
wut
<GuildChannel>.permissionsFor() gets the overwrite for that specific user or role and checks if it has those permissions
Not every other overwrite
how can I check when my bot is going to be looked at?
you cant
You up for fucking around with sys.path? 😛
Shivaco i don't about shards and what is sharding.Can you explain me?
no
well its fine ig
because i can just set it up for vps
but like i would like to make it relative
but if its for absolute then i got it
but i really dont want to
If your bot isnt in above 1.5k servers u dont even need to worry about it
ooooh shiv i have an idea
rememebrt that api i (you) made?
with aiohtt?
i can do it via there
As in?
make a route for it that makes the user profie
ehhh
No but i need to know what is sharding.So that it can help me in future
no fucking with functions / path required
but it would be like 5-10 requests / sec
so idk if itll survive
i could do it in my flask server then?
its supposed to be beffier
beefier
Absolute imports are reasonable here imo
maybe
but it would be for vps only
because i dont even know how to fucking open my files on mac
import sys, os
sys.path.insert(0, os.path.dirname(".."))
import main
print(main.mystr)
This is so dumb
yet it works

@earnest phoenix
Sharding is a method to split portions of bots into separate processes. This is an enforced strategy by Discord once a bot reaches a certain number of guilds (2500). Once this number is reached, a bot must be sharded in a way that only 2500 guilds maximum may be allocated per shard.
You could go with websockets for this if you were to have a local API doing it for you
alr ty shiv
Oh i see.Tysm❤️

What if i don't shard after reaching 2.5k guilds?
Then you can't log into the bot account
Every shard can only contain 2.5k guilds
Oh
So you would receive an error from discord's gateway
Can i shard now? Actually it's in 74 guilds as of now
You always can
It's just pointless until a certain point
Oh
Thanks to both of you shivaco and voltrex for the info ❤️
But it is recommended to shard after 2.5k guilds, since the bot has to handle more than a single process, and also your bot is already sharded by default 
wait i dont get it
how do i import it?
thats the issue
Every bot runs on at least one shard called shard 0
oh ok ty
Well...
Oh
What's your file structure?
oh its a mess
... so long as it's readable
it is i just dont know how ur thingy works
How i make a bot in tt gg website
It adds the level above the file to sys.path and then imports the file
hence the ..
?
WAT MY BRAIN IS MELTING
See my file structure here
You first create a bot by coding it, then make sure you can afford running it 24/7
Its free make one?
After all that is done, only then should you submit it on top.gg
It's free to make one unless you somehow end up using services that force you to pay for it
Hate paying lol
Which part are you confused about? 
I like make bot free
@commands.command()
async def say(self, ctx, *, msg):
"""Make the bot say something."""
await ctx.send(
msg.replace("@everyone", "@\u200beveryone").replace("@here", "@\u200bhere")) # NO @EVERYONE PINGS FOR YA.
I struggle to see my own code from 2019
👀
That how they make poketwo bot
?
I highly doubt Poketwo is written in Python
mee6 is lmfoa
Because nintendo hate Copyright fan
** member is sent when the command is invoked in a guild, and user is sent when invoked in a DM
... This is fun
shiv the absolute approach wont work

...?????
What bot you make?
Can you print what os.path.dirname("..") returns?
None. I only own one that's used by top.gg library developers
Take a break, yeah
Gotta be carefull random people make illegal bot.

Anyone know how I can connect via ssh on Visual Studio Code using an ssh key file? (ssh_key.key)
Question what prefix means
immma take a break because im fucking dying rn
but the sys thing wont work
but ill try something else
bye
i will sleep
and not melt my brain
Have a good nap
Oof
School you should do school work not on discord tsk tsk children these days.
leave me alone dude
go learn how to code or whatever
Give him a break, he's tired
Probably he grumpty yeah.
@slender thistle should i make random ID?
ID?
Yeah in add new bot
Well, yeah, you do need a bot account
I make randomly?
IDs are generated randomly by Discord
you should be able to answer that question
Courage :D
@cinder patio remember that show cockaroach say good good
@pallid garden what language do you want to make it in?
What???
you're not ready to make a bot, learn a programming language first
eh
i learnt how to make a bot before learning a lang lol
prob why im not such a good programmer lmfao
it's like cooking for the first time without watching videos
some people can make a nice steak on the first try
wait, how did you program a bot before learning a programming language?
but some people will set the kitchen on fire

he meant "I learnt as I made a bot"
lots of copy pasting and hoping it works 😄
@solemn latch i wanna make a bot for pokemon
its generally much much faster to start by learning first. but some people decide to go the long route because it seems faster.
pokemons a fun one
luckily a lot of the datasets you need are readily available through various wiki's
you need to learn how to handle APIs and databases
I saw one in website for pokemon shield and sword genned hex code
Tsk tsk
In top gg
what?
no, like, what did you say?
Its a copyright
don't think anyone will bother to sue a minor discord bot
not even pokecord got sued
So the bot will dm you link trade in pokemon shield and sword game
I try it once i kick bot out
I did release it in the wild
sounds interesting.
Yeah that illegal to make
Funny how bot trade you a pokemon in shield and sword game
not sure what you're talking about but I'd say it's not illegal at all unless it was some kind of hack or something
Yeah hack
They use a code make discord bot from it
Its call miku bot
I saw one
I recommend stay way from it
no don't think it's illegal
since there are official sites mentioning such codes
guess you're confusing stuff but whatever
I actually wonder how DMCA works with API's like that.
If I use an API, which doesn't have the license to use images, and I use that API, can I realistically be dmca'ed since I don't have any of the photos myself.
fan sites use those assets though? i think it straddles the line on fair use
yeah, unless you're selling the photos it's ok
as long as you're not trying to make money off it?
pokemon wouldn't be as big as it is without fan stuff
I didnt think fair use accounted for if your making money.
licenses can, but i dont think thats fair use is it?
you're not selling the photos, you're making money out of ads or stuff like that
so your income from the images is 0
im fairly certain the definition of "fair use" is that you somehow have to modify the contents of the overall piece, as in, the asset you are taking is only being used to supplement your theory/content, not be the main focus of it
(also im here cuz the dorks are bullying me in #general )
yeah thats what i thought too erwin
i dont think money/selling has anything to do with it, legally speaking
that would be part of licensing
what do you think of this erwin?
I actually wonder how DMCA works with API's like that.
If I use an API, which doesn't have the license to use images, and I use that API, can I realistically be dmca'ed since I don't have any of the photos myself.
where you would pay someone to acquire rights to distribute it or use it as you wish
im not a lawyer, so i can only do speculation, not give legal advice, but based off what youtube does, the platform isnt responsible for the content users provide
assuming the content you have in the api is user-based
and you have a way to allow the owners of the copyright material to remove it
i think you can avoid legal issues to an extent
thats literally what youtube does
that would hold true for imgur or any hosting service, for example
man
torrent sites be like
well, in this context we are talking about pokemon photo's being in an api, and a seperate dev using those images.
the api owners dont have legal right to those images, would the seperate dev be in any way responsible.
we weren't bullying you
this is just wikipedia so take it with a grain of salt
The first factor is "the purpose and character of the use, including whether such use is of a commercial nature or is for nonprofit educational purposes."
@solemn latch yeah i did contact email
api user isn't responsible
if you are the owner of that content, you can always request it to be taken down
so like, the only one to blame is the service owner
though like i said, it would go into fair-use grounds
nice.
Yep
is what they do around the image?
or does the image supplement their content?
theres a lot of caveats for fair use
best to talk with a lawyer about it tbh
Usally nintendo hate fans copyrights
they don't
pokecord/poketwo are free advertising for them
popular pokemon bots = more people interested in pokemon
nintendo went as far as copyright claiming videos on youtube from people playing their games
Like in roblox nintendo banned pokemon in roblox games.
that's dumb af
nintendo is WELL known for going overboard on copyrighted content
I guess my question is less about fair use, and more about if there was copyright infringement and there's two parties(api owner, separate dev)
can both of them be realistically charged(wrong word for this, but im blanking) separately.
lol wtf are the CEOs thinking
they do a lot of silly things.
Nintendo™️
have for years
Yeah
im fairl certain what harry said is true
they did have a dispute with nitendo regarding a minecraft pokemon mod
Reason why nintendo dont like fans copyrights
Minecraft in nintendo switch
Its not kinda like copyright
2 votes and 9 comments so far on Reddit
Hmm
Nintendo Shuts Down Pokemon Minecraft Mod, Pixelmon!
🎬 SUBSCRIBE ► http://bit.ly/SubLog 🔔 AND CLICK THE BELL!
👾 MY NEW CHANNEL! ► http://bit.ly/itsdotZiP
▬▬▬▬▬▬▬▬▬▬▬▬▬
📰 Facebook ► http://facebook.com/Logdotzip
💬 Twitter ► http://twitter.com/Logdotzip
📸 Instagram ► http://instagram.com/Logdotzip
▬▬▬▬▬▬▬▬▬▬▬▬▬
There is some minecraft news for a...
People they never learn tsk tsk
greedy capitalists stripping away creative freedom just to ooze more money out of you
nintendo goes literally overboard on anything they can claim
he said the word "nintendo" in his video, copyright em'
said "nintendo" in a discord server, get em'
Yeah copyright illegal
you use the word "copyright" a lot don't u?
basically the best mod for minecraft when it appeared
i give that to zr's modloader and the mobs from the old days, but sure
copyright = not illegal, it means that someone hold all rights over something
Only nintendo and pokemon own it
only nintendo owns it
Yeah both
They say yeah its illegal
obv roms are illegal
i always remember seeing that name in the old versions
Well nintendo say to me emulator illegal as well
it is
Yep
welp
Some people say is not illegal lol
let a = 8, b = 6;
// Only change code below this line
//6,8 6, 8
console.log(a, b)
[a, b] = [b, a];
console.log(a, b)
```**
Console:**
8 6
TypeError: Cannot set property '6' of undefined
what
thats not how js works
idk, i think that is how destructuring array works
I think coding hard for me their anyway with no coding?
not even close
dbd.js for discord bots
destructuring arrays are [...]
?
dbd is not an option
that is for noobs
let a = [1, 2, 3];
let b = [...a, 4];
console.log(b) // [1,2,3,4]
Yeah if people cant code they use different option
thats destructuring arrays @last tapir
hiring a dev is a good option for people who cant code but need code.
dbd is like this
Learn Js since it is really easy to learn.Js is best documentated my MDN
true
yum.
👀
true
who cant change oil? 👀
still, nearly everyone gets their oil changed professionally

everyone can cook potatoes, but very few of them dont accidently burn it 
and even less people make it edible
and even less make it taste good
How to Chef

how do you burn a cooked potato?
look, i know people who legit burn cup noodles
@opal plank youtube cooking video helps
dont doubt poeople's ignorance
lol wtf

how
what the fuck
Erwin
you gotta get away from those people
might spread to you
well, I mean, internet is full of those stuff
like that cow on top of a water tower
when the sprite doesnt load in time
cries is slow pc
funfact
What are the max slash commands a bot can have?
cows ACTUALLY cant walk downstairs
and pigs can't look up in the sky
and discord devs cant dev
50?
I think
afaik
thats rather small ngl
oh :C no custom slash commands
actually 100
i might try slash commands
slash commands are garbage

100 global and then 100 per guild
havent seen more than a handful of people use it tbh
I think they can be useful for certain type of bots
would be very situation
a lot of bots that do implement them that I've seen do so in such an unproductive manner
if i were to do it, it'd probably be an extension of normal commands
so you could use both
that's kinda pointless tbh
was about to say that tbh
you're missing semicolons after the console.log
Slash commands are good for when you want to make it look like the bot is integrated with discord, there was a gif of a translation bot recently that used slash commands - definitely better than using regular commands
How make splash commands 👀
throw water at it
yeah fl0w's bot
splash commands
is plash
I kinda want to try slash commands but idk seems like there is no point
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
slash commands are superfluous
A big pro is being able to send client-only messages, so only the person can see the command can see em
it'd be a great thing IF they added it together with the bot api
the ONLY good thing i take from them is arguments, but in all honesty, theres not much there
fucking
leave me be u stinky boitch
since it explains visually what arguments are required
yes, that
lmao
yeah arguments are great too
but i already have catches and error parsing in the bot normally
if someone is gonna use slash commands with rose, their bot is gonna be big, so they should be making their own http thing instead of the gateway
so, theres that too
i THINK i might be able to adapt detritus command handler with it
thats exactly what it is
so the same function from the handler can be executed for the interactions

let me ask cake rq
argument type parsing and required/optional args are great
there are a LOT of caveats though
but i think its possible to emit a payload containing all info that a normal payload would have
That's right, Pico from Newgrounds
alright why this happens, but running this line of code:js Object.keys(require.cache).forEach(key => delete require.cache[key]) makes js message.author.send("test")return (node:12056) UnhandledPromiseRejectionWarning: DiscordAPIError: Unknown Channelidk why
@crimson vapor with cache optimization yt uses only 2.9GB B)
You're dropping EVERY required file from the cache which can cause data to be swept which can include data important to Discord.js
Do not drop everything in the require.cache. Only what you actually need to drop and re-require. You cannot reload Discord.js live since your client instance is still bound to a stale require of Discord.js and the data that reaches the root will not be swept
im trying to reload a self made module file
is it possible to send a "ping" from html script tag to node js server to run a function?
question mark
require.cache is keyed by absolute paths to files. You can drop that specifically and then re-require. If it has sub-module requires, you can also drop those since require.cache is an Object.<string, Module> and Module has a sub module property on it. I forget it's exact name. You'd basically recursively go through modules and their children and drop them then re-require the entry point
This is actually a good reference I wrote
@crimson vapor dont tell erwin but i just tested it and detritus has a 300MB overhead above rose with the same settings
the way its built means that it has a higher overhead
also im like 60% sure with some cache disabled, commands don't work
idk
explain that better
what do you mean by "ping"?
it isn't anyway
i had channels roles guilds on
html is incapable of doing anything
script tag
ok
and the same "cache control"
oh
so ig js
im blind
I forget which ones didn't work for me when I was doing basic testing
idk
a scipt tag with an click event
that can activate a function
from node.js
use ajax
you can also abuse img tags to force a GET
you can use fetch to call some serverside endpoint
there are a myriad of options actually
If i restart my bot and a user react nothing happends. If the user types something in a channel and tries it then again it works
Do you know how to fix this?
i already use partials
depends on how dirty you're willing to get
tysm ill look into that
could u reword that?
like, you want reaction events to work?
yes
show current code
if i restart my bot and a user reacts my bots embed it doesnt work and if the user types a message and then reacts the event works
show current code
are you sure those are db calls
they just seem like unnecessary awaiters on a getter
what lib is that?
aka "i have no idea how async works so lets just put await on everything"
I see both MongoDB and enmap based calls
looks a little like typeorm
updateOne() is definitively mongo
but na
thats what gave it away for me
await
mongoose uses that no?
wtf is that editor
Putting await keyword before every type of operation moment
its just low quality ss
heres another good part
you can have reactionAdd on channelDM's
which wont have guild with it
get accessors can return a Promise btw
its really uncommon tho
no use
what do you mean by "low quality"?
@vocal trellis well, we already gave you plenty of feedback it seems, i'd recommend checking what we all said
bro your internet ok?
Node.js v15 moment
mine was decent
its clearly good quality dude
Code Minecraft edition
ngl replaceall was like the only good thing added to node 15
I see no point in String.prototype.replaceAll(), since you can use regex in String.prototype.replace() with the global flag
yes
yeah it should look like this, not #development message
It looks correct
i actually use replace() instead of replaceAll() cuz literally every fucking instance i've tried using it on, hasnt worked
i can see everything just fine
lmao wut
because you used this
r u sure u werent using it wrong
yeah, i told @crimson vapor , but he says its probably my internet
also, barely anyone can type that word without some specialized keyboard
The only good thing added in Node.js v15 was private properties and methods in classes
conditional chaining
wow
big hate on my code 😂
no discussion
first of all
TC39 lazy decisions moment
i use mongodb
uncatched promises crashing the process
That was on Node.js v14 moment
node 14 <= literally says that uncatched promises will result in a process termination in the future
yes
✨ the future is now ✨
best node 15 feature is crashing on any unhandler rejection
cant wait to see how many devs will quit after that
discord.js updates to node 15 on v13, we gonna have a 50% increase in people here
MY BOT DIED, WHY
Node.js v15 be like, lets change warn to throw on every exception
But it is nice
it's a good change
indeed
but guys
well
i didnt got an answer
yes and no
well
makes incompetent devs less incompetent
on my probleù
what is with that
your entire snippet you posted is a dumpster fire
^^
pay me
Lmao you are the one having problems with the code
most of us here would, but we arent allowed to spoonfed
??
Rewrite my snippet
i could not care less about your code lol gtfo
lol
almost everything you wrote there we have it here
"What? why can't I have 498017247 syntax and logical errors in my code and don't have it running normally?"
----- any lazy JS bot dev ever
okay rewrite the snippet
and your question is an xyproblem
good
pay me
and maybe ill pay you
maybe is not good enough
stonks
Development channel moment?
always
well, either way @vocal trellis , we arent just calling your code shit, we are calling your code shit and explaining why thats the case. As harsh as it is, its constructive criticism
yes but I don't have enough mana to cast "clairvoyance"
so I can't know the question
imagine not owning a crystal ball
everyone knows you can use clairvoyance for free with it
with no mana cost
noob
mine broke yesterday damn
oh i se
rolled 1 on dexterity check
i know a mage in the favelas of rio that would get you one for a nice price
i sold mine to health workers in order to help fight covid :(
anyone here use the discord.js-collector library?
Oh god, not another bloated npm package
why is there a library for everything in node
cuz js devs
can't you people just do something yourselves for once
^^^^^^^^^^^^
it makes life easier
that's why maven requires a shitton of steps to publish packages to central
honestly most people just don't have the experience and understanding to do it themselvers
thats why i recommend people typescript, the majority of ts users have at least 3 functioning braincells since you need to write a lot of stuff yourself, specially interfaces and types
What happens if it crashes your applications or its not maintained anymore after some things change that depend on it
It has 750 weekly downloads
*slaps any on everything*

Makes life harder doesn't it
well discord.js is gonna change anyways
sssshhh we dont talk about that here
I got bullied for using any
the issue is that JS is too compliant
it was sad
Because it is always maintained by hundreds of people
it accepts anything
The package you said isn't
deserved imo
well yeah, it was you
I would like you to roll initiative
you welcome
so people don't Smart Think™️ when doing js
Is there any way to join a server whis is using my bot ?
no
dont
nope
noooo
Do people even think when doing JS
800 a week is not popular
let me give you a piece of mind my dude
at all
just because something is popular doesn't justify it being good
750 weekly downloads isn't popular
For that
for an "extension" to discord.js
ok
okay i am still learning ofcourse!
@earnest phoenix https://www.npmjs.com/package/is-undefined the "its good cuz its popular"
i get better every day
no
and learn more every day
hence why we pointed out your wrong diongs
The package could be deprecated at any moment, if stuff changes and and the package doesn't get updated
What do you do
I update it myself
or rewrite the entire code for my bot
the fact that actual huge libraries have stupid packages like is-undefined and is-thirtheen as their deps like what??
ok
I want to know what "popular" packages unironically depend on meme packages like that
If you know how to update it then why not write one yourself instead of using an npm package that implements it?
proprietary software is poggers
is-thirteen is better
we pointed out WHY its bad idea to do what you're doing, not blindly calling out "HuH DUH shIT cODE GiT BEttER", if theres anything specific from what we said that you dont understand WHY its not good, please ask
how to get total member count of bot without presence intent
npm registry is filled with shit ton of bloated npm packages
but it is possible
since it updates every couple hours iirc
tbh the only reason I thought to use it was because I thought it could could see the reactions made after bot downtime
correct
only GUILD_CREATE returns member_count
<guild>.memberCount
what if someone makes npm2
i second that
i mean like total
Tim. Make npm2
npm2 i *
would this work
total amount
memberCunt
would this work without
ok
intents
okay ❤️ thanks
yea but it would be a bit off
memberCount comes with it
the overlap of members in servers
You need the GUILDS intent of course
shh
no
You might be thinking of invite.approximate_member_count, Erwin
i think you only receieve it once
when you connect via gateway
you get guilds objects
approximate_member_count is rest only
after that you would get them only with payloads that include guild
member_count or memberCount in djs is gw only
guild_create/guild_delete, etc
back of my head i dont remember other events that emit a guild object
Guild.member_count is always accurate since events are replayed to the client if it has GUILD_MEMBER intents
unavailable too
Yep as I said




