#archive-library-discussion
1 messages Ā· Page 12 of 1
Yeah
The typing for the function Interaction.inGuild() ins't perfect because it doesn't change the typing for the channel...
Instead of :
public inGuild(): this is this & { guildId: Snowflake; member: GuildMember | APIInteractionGuildMember };
We should have :
public inGuild(): this is this & { guildId: Snowflake; member: GuildMember | APIInteractionGuildMember; channel: TextChannel | NewsChannel | ThreadChannel | null };
Are you agree ? (it will remove DMChannel and PartialDMChannel on possible types for channel)
should the set functions from Embed (builders) allow to pass undefined?
that's what isText is for. you also missed VoiceChannel on inGuild. could alway do both if (channel.inGuild() && channel.isText())
Sorry, I was not precise enough in my message :/ I'm talking about Interaction.inGuild() so VoiceChannel aren't possible
imo, we can have a clear<Variable> function..
sounds like more bloat
and just allowing set* to accept undefined would work fine
and of course all the field values are already public so a user could just do embed.description = '' so if anything, it makes sense to allow undefined or do nothing at all
undefined is ew. Maybe null
Maybe we need a ?undefined tag at this point tbh
no people just need to learn js
null should be used for the intentional clearing of a value
We've had this discussion several times over the past few days lol
Does anyone object to this change or see a possible error?
I don't know about providing the complete raw data @copper laurel @bitter peak
where else do we do this
Well we dont, but whats the point of this otherwise
Also its hilariously painful to work with
We were providing "all" the data in the Collection too
It had just been parsed into a different format
What is the point of what?
Okay let me rephrase - what exactly are we intending to provide in interaction.options.data
If its not the raw data, then what it is?
whatever _options is now
and whatever it was before where you just called options.values()
its perfectly parsed data, thats not entirely raw, but very easy to work with
and gives you all the freedom you want
if you want raw data, use the raw event
Right, I didnt see that we were still transforming the options, but still
Before the resolver PR, it was a Collection<string, CommandInteractionOption> of all parsed options, with subcommand data un-hoisted.
Now, in the current master, _options is CommandInteractionOption[], still parsed, no longer a Collection, and with the subcommand data hoisted up, since those have moved
So ignore the fact that I said raw - should it be with or without the sub-command hoisting is the question
maybe I just accounted for that when parsing it myself, but I noticed no difference in the data given
so I'm not sure where hoisting or not hoisting is a problem here
You can always check the type
The type is the same either way
Oh right, looks like my parsing just ignores it, since its hoisted now
You can also still get the subcommand using try/catch, if nothing else
Should it be
data = [{
type: "SUB_COMMAND",
name: "sub1",
options: [{
type: "STRING",
name: "string",
value: "foo"
}]
}]
OR
data = [{
type: "STRING",
name: "string",
value: "foo"
}]```
And make people use getSubCommand() to check subcommands
Well I don't see a problem with that, it makes it so you don't have to write recursion
That seems like a win to me
The latter?
I vote for the latter
k
Thats probably fine then
I have no sympathy for people who cry about an error being thrown when they do something erroneous
What part broke?
yeet it
the easiest way would be going back to the nested approach
I already closed the discussion, we're sticking with the PR as is, right?
Kinda getting both signals here
Considering my whole parser exploded from the hoisting
making it impossible to detect if its a subcommand/subcommandgroup without using the resolver
its a bit of a problem
presume you have something like
restrict
-> mute
-> embed
interaction.commandName will be restrict
but you will never find out which subcommand it is
with using interaction.options.data
Well, we kinda figured above that you can just use try { commandName += ${i.options.getSubCommand()}; } catch {} or something a bit more elegant
oops formatting
using .options.data should allow you to completely opt out using the resolver methods
So in that case you agree with the former of the two suggestions monbrey posted?
Yes, basically reverting to the format it had before it was removed/modified from being a collection
So basically the format it had when it was a collection before the resolver format, but as an array, correct
that should alleviate all our problems then
imo options.getMentionable is pretty weird, since it has so many return types
meanwhile there are 2 methods just for user types
Yeah thats what I meant, I didnt realise we were still transforming options when I said "raw"
I see two approaches for that - getUserFromMentionable and member,role etc or supporting MENTIONABLE in all of getUser, getMember.....
are we still waiting for threads to be finalized before releasing v13? it seems that they aren't gonna be fully coming out anytime soon from dapi
the last thing we want is to release another major version because discord decided on changes to their threads api
why are getSubCommand and getSubCommandGroup functions š¤
they just return a property, cant the property just be exposed
Weāve been over this so many times now
Is the 13.0.0-dev version collection dependency going to be updated?
would it be possible to get a build branch on builders similar to some sapphire repos?
It's probably possible to setup an @dev / @next like d.js/-types
@wild flax What if I made getSubCommand() and getSubCommandGroup() have (required=true) so people can do whatever they want if they opt-out
I think that keeps the best of both worlds
I explained why thats a problem
Theres situations you don't want to/can't use it
where you wanna work off the parsed data
It would be in addition to having the .data property tho
all youd need to do is de-hoist the sub commands and we should be good
Right but I'm asking if I can do both
I dont wanna bring in anther change thats unrelated to this pr
alright
if you feel its a good change, maybe make a second pr
š
PR rebased and updated hoisting
idk if its a discord thing or discord.js thing
but
maybe add a button style called like
WARNING or somethin
and its yellow
Hi, I notice discord.js doesn't allow us to edit messages with empty strings. Why is that? Bots can edit messages with an empty string if there is an embed
because you should be editing content to null, no?
No, otherwise if (typeof data !== 'string') throw new error(errorMessage); would yell at you
works fine for me
I've tried it a dozen times on latest master and I get greeted with errors all the time (:
Simply removing the check discord.js has on Util.js on line 407 makes the edit
But that's not the fix either T_T
To be fair, I'm not on the latest commit, I'm still pre Id change, but I don't think the content has been changed since then
Okay so I learnt that you have to pass null instead of an empty string so it'll edit, and that'll make allowEmpty true, happy days
Should it not be "string or null" or something here then
it ideally should accept an empty string too
it used to work but broke a while ago
discord accepts empty strings tho
Yeah it looks like discord.js' utility method for verifying a string will yell at you for supplying an empty string, and it is used for checking the content when editing a message and sending a message. Looking closely, it seems that if we pass null to editing content, discord.js makes the content an empty string and skips validation of if it's empty. So that's why shrugs
We're sending across empty strings, just it's transformed from null to one
Thatād break our strictness and proper errors, so that wonāt happen
How come it has to be an array? Imo, going into the .data as an array differs from original behaviour, and doing .data.options which returns the same typedef but as a Collection seems a lil' weird to me
Thereās no reason for it not to be an array
And data.options doesnāt return a collection
Huh, it says it does
I haven't tried it yet, was just reading the new documentation on it (': Will test it out to see
Ah yeah it returns an array but docs say a Collection, odd. In that case I'm fine with it I guess, but I guess docs should be updated. Typings seem to be done already
#6169 in discordjs/discord.js by Jiralite opened <t:1626952120:R> (review required)
docs(CommandInteraction): Correct type definition of CommandInteractionOption
š„ npm i Jiralite/discord.js#patch-1
@tacit crypt the overloads are reachable ā I specifically wrote a test case for them in index.ts
huh?
Just saw, š
Can the defer method return a Message? Because on the docs options don't include fetchReply but typings do...
Looks like it can : https://github.com/discordjs/discord.js/blob/master/src/structures/interfaces/InteractionResponses.js#L54
JSDoc hasn't been updated
Mmh, but it's only a defer... if I use fetchReply, what Message will be returned?
thats because uh
sometimes you need to do:
await interaction.defer();
const message = await interaction.fetchReply();
with the option you can do:
const message = await interaction.defer({ fetchReply: true });
Getting this from a defer with fetchReply - so it appears to be working
its basically opt-in auto-fetch
what is license of discord.js?
Apache 2.0
sorry for the naive question but... what is an info block? 
It's something our docs support, iirc its just <info>OwO</info>
so just
- * Note that this defaults to true, unlike the other `getX()` methods.
+ * <info>Note that this defaults to true, unlike the other `getX()` methods.</info>
```?
Or would that go in the method description not the param
That looks right but i don't know if we DO need to document that... @wild flax thoughts?
ok that's even easier
resolved
btw are there plans to go through and close all the old now-invalid issues?
https://github.com/discordjs/discord.js/issues/3890 - says it should be fixed with API v8
https://github.com/discordjs/discord.js/issues/3576 - probably a wont-fix (or tracked in discord.js-next?)
https://github.com/discordjs/discord.js/issues/4963 - doesn't look like it will be implemented; should be reclosed?
First one is def not fixed
https://github.com/discordjs/discord.js/issues/5337 - isn't this solved by the CHANNELS partial?
Maybe, we got no feedback
Iāll prolly close some of them for sure
But itās not too needed rn
We arenāt in a position of 2 months ago or so with 90 open issues lol
fair enough
In what cases would ChannelManager#fetch return null instead of a Channel?
https://github.com/discordjs/discord.js/blob/master/src/managers/ChannelManager.js#L95
Also it makes the example a little bit confusing as it doesn't check if channel is not null to log its name
Right okay, got the answer looks like it returns null when discord.js doesn't has a structure associated to the channel type
@cerulean swan
here's why it may return null
See ChannelManager#_add behavior when Channel.create returns undefined
will
msg.channel.send("hi")be deprecated soon?(talking about on how u send messages)
not afaik
why would it
does message.channel.post sound better?
I guess since message.channel.send is so embedded now, it wouldn't make sense for a change
post 
No, it does not sound better
(node:13788) DeprecationWarning: The message event is deprecated. Use messageCreate instead
(Use `node --trace-deprecation ...` to show where the warning was created)
how does it detect where I used the message or interaction events instead of the messageCreate or interactionCreate events?
If you don't understand the magic behind, EventEmitter#emit returns true if there were listeners attached to the event, false otherwise
assumed so, ty for confirming
hello, so guild.owner is nullable and have to fetch it manually right ?
why dont djs automaticly fetch the ownerId and return fetched owner object to guild.owner ?
the library should not be making api calls for the user like that. you should be the one initiating it
Because you probably don't need to know who is the guild owner
Would be useless to fetch this data if you don't care
This has been addressed by replacing that getter with Guild#fetchOwner, which will fetch them from Discord if necessary.
aaa okay
The ClientUser class is missing the readonly presence getter, which is documented and it relies on Client#presence
fairly certain it inherited that form User, from where it was removed in https://github.com/discordjs/discord.js/pull/6055
why?
Because it exists actually? š
I mean, it's in the docs (https://discord.js.org/#/docs/main/master/class/ClientUser?scrollTo=presence) but not in the typings
Yeah, it's actually just a shortcut to the Client#presence property
yeah, imo that getter on ClientUser should go away
because Client#presence is quite something different than the guild propagated GuildMember#presence
also... isn't that a ClientPresence vs. a Presence anyways?
right, but doesn't really matter, because that extends Presence... weird spaghetti there
Wait, why is Client#presence private? 
because you should be using guild.me.presence
But you can also have a bot that isn't in any guilds, in that case you can't access it from guild.me
Internal sharding allows a client to yield multiple shards with different presences
so everytime the client starts, the lib caches a amount of users, do u guys fetch a random amount of users to do that or wut because i have a array of user ids and i want to fetch each user but that'll get me rate limited if i use a loop
structures are cached whenever we receive them via websocket payloads. users are included in a bunch of payloads that might cause a user to be cached
hm so is there anyway to fetch a array of user ids without getting rate limited
why dont you guys defaultly set button style to PRIMARY if there is no Button.setStyle setted ?
why would we
i think its better that way
wait..
if it defaultly setted to primary
someone would think style cant be changed
nvm then
hello i found a bug with TextChannel#bulkDelete but it is very unconsistant and i replicated it once(50 tries in same code and only 1 times) https://sentry.io/share/issue/f588648f85a54b439a6cbfb7dfcbeb72/#exception i can give you breadcumbs of sentry(all http requests node procces has made) if you want too i didnt want to make an github issue because as its so unconsistant it can be a code issue as well
That doesnt really tell us anything
Also this seems a rather odd... usage:
await message.util.send("abi Ä", true);
await message.channel.bulkDelete(4, true);
await message.channel.bulkDelete(1, true);
what do you expect here to happen? lol
I mean thereās a literal option called āsetStyleā so
Iām kinda leaning towards the idea of setting that by default but idk
because i wanted to simulate my purge command(https://gist.github.com/ShockTr/2ede2d2c422739362a13939fceb9d600) it allows for message deletion upto 500 so it loops also it adds 1 more count to their requested amount for deleting the command message and i always get this error when deleting the last message. i know this is a bad practice but users will spam the command if i dont loop it
@haughty flame @sharp wigeon its not the job of discord.js to decide what the "default" style of a button should be. The API doesn't have a default, neither do we
it should be alright
Not sure if this is where I should be asking this but, if I understood correctly and <Collection>.get() returns a reference to the object in the <Collection>, and every operation I do with that object applies to it in the <Collection> aswell, how can I create a "copy" of a <Collection>'s object, to which I can perform operations without affecting the original object in it?
Collection.clone() ? iirc, but I am probably wrong
well, if the question is how to make a copy of a single entry element, yes, that's wrong
yep
copying structures isn't really a topic for a library development channel
whether or not an entry is stored as value or reference depends on if it's primitive or not, non-primitive values would need to be deep-cloned if you want to not modify the stored structure (sometimes via Object#assign, sometimes preferably by using the structure's constructor, largely depends on the structure)
Okay thank you and sorry for asking it in the wrong channel
No, it shouldn't. Libraries should not be opinionated and make these decisions on behalf of developers. We correctly reflect Discord's behaviour, thats all.
It was a joke š¦ but yeah I understand
Then I'm going to warn you again to keep this channel on topic. Right there in the topic, "serious discussions"
si senor
@oak quail I disagree with you on the options
Making a new property object with arbitrary values on it got resolved ātargetsā with no resolver is way worse
Context menus are just slash commands with no args
They still give you resolved values though
If they add more options in the future, that'll probably be a major semver anyways, so I don't think we need to account for that rn
It also splits up parsing logic lol
It wont be major with the current implementation though in theory
Cant access that link, so no idea what youre saying
same
crol can you repost
well they said that they might put those in the options field
I donāt know what the availability of this info is, so I canāt
so wouldnt that conflict with the fake options
No why?
Youād just write logic to support that additionally
Since that feature wonāt only be on context menus
Thatd be kinda silly
Aren't underscores invalid in option names? If so, I see no reason why not to use a fake option with an underscore
The naming restrictions might get lifted anyway
Also options with an underscore donāt make too much sense
wdym?
i just dont like the idea of making fake options
discord gives it as a separate property
wouldnt this basically be like storing channel metadata in fake messages
Target what
hm
User and Member is still separate
so getTargetMember/User/Message?
Terrible
Just terrible
Also itās our job the make this bad interface discord gives us in a good one
that would be much better than getMessage('message')/getUser('user') and getMember('user') imo
Are context menus kinda like buttons but for use on members and users rather than messages?
Yeah but there are many types of context menus
Ones on messages, guilds, members on member bar, on user profile, channels, categories
Yes thereās currently ones for users and messages
Yeah thatās what I meant
Will this be handled by a ContextMenuInteraction class or reuse the command one?
If there are no arguments like how buttons work, why not treat them like buttons?
in the pr, its just in CommandInteraction
Instead of additional fake options
so like interaction.message?
Maybe if we had it as a separate class this would be easier. We could have interaction.targetType = member | user | message etc. and interaction.target
Yeah that makes sense
Thatās just type fuckery then
PR is a draft and there are changes I havent pushed yet
But you could do member.user
Yeah
No stop thatās not even how the resolver currently works
Also theres no member if its from a DM
Oh ok true
Everyone making opinions based on code that is going to change anyway
Forgot for a sec that GuildMember was its own thing
I think we have a pretty good idea how to move forward with it ourselves
I'm just struggling to think of ways to implement this, I only skimmed the code in the PR
oh yeah sorry that PR for the resolver was so messy
The resolver is fine tbh
Yeah all good it looks like you have a clear idea anyways from what you were discussing. Iām just confused what the fake options thing was about in the discussion though
the resolver is good except for the MENTIONABLE handling imo
What's the issue with mentionable?
- getUser: User
- getMember: GuildMember
- getMentionable: User | GuildMember | Role
Isn't that literally what the docs say tho
mentionable gets resolved into one of those anyway
They donāt put it under resolved.mentionable
Lol
I think the argument is that getUser() should work on mentionable too
On a role?
Wat
- getMentionable: User | GuildMember | Role
I think the argument is that
getUser()should work on mentionable too
for USER args its like "use the method for the object you want" and for MENTIONABLE args its like "fuck what you want, i'll just give you something"
I mean I guess I get it. You canāt know what it is, so you need manual checks anyway
Not sure whatās there to improve
If you call getUser you are kinda fucked
But how do you know what they put?
You donāt 
check which resolved object its in?
you dont, but you never had an issue with resolvers returning null/throwing before now
Advaith
How do you as the dev know
You give them a choice
You have no idea without checking yourself
You canāt just call getUser and know they supplied a user lol
They might as well supplied a role
The way it is rn is 100% typesafe, any change would also need to be as such
The only real usecase I can think of for MENTIONABLE is something like permission overwrites, which means it doesn't matter which of the two it is
Otherwise the dev should have asked for a User anyway
X
Souji has some weird commands that use mentionable
And based on the type do different things
getUser(name, required = false) {
const option = this._getTypedOption(name, ['USER', 'MENTIONABLE'], ['user'], required);
return option?.user ?? null;
}
``` I think this is the suggestion right?
Didn't that array get converted to a string
We can allow that, but I donāt think itās the best approach honestly
does souji use getMentionable?
This isnt the real code, its a mockup of the suggestion
It feels like this will backfire on a lot of people
Which is why its an array
That would also be confusing to document IMO
most likely
just using get() and then checking the presence of .role or .user would probably be cleaner tbh
I don't think you can check for key presence in typescript
oh nvm
I remember it erroring with something like Property "username" cannot be used on type User | Role, Property "username" does not exist on type Role for example
but I guess it doesn't
Thats different, where one type definitely cant have the property, while on a resolved option both are just nullable
shouldn't this pr be in the done section?
Moved, thank you
this one is in the in progress category too but it should be moved to review in progress
That's automatic
i see
if interaction.options.getMember(...) can be a APIInteractionDataResolvedGuildMember how are you meant to get its ID, since there is no id property on that type š¤
probably not, lemme check
ah well the user does return a full user object
so that would have an id
should the internals assign the ID to raw member data though? for convienence
š¤·āāļø
Would it make sense to have a MessageEmbed.setFields() method? I saw someone talking abt this in a support channel earlier today and it would be relatively easy to make and really helpful as well
Could also add a shortcut for setting 1 field called .setField that would work like addField but would replace all existing fields
MessageEmbed#spliceFields should already cover this, no?
well yes and no, that applies to when you wanna remove a specific field or replace it (although you can extend this to all fields). These methods would completely overwrite and seem easier to use
splice is just a more powerful version of that
yeah but there's a set method for every embed property, why not fields too?
setDescription, etc is because there's only one of those per embed, not so for fields
Yeah but I feel like if you wanted to overwrite all your fields this would be an easier way
ill make the PR and leave it up for the reviewers to decide
okay then ĀÆ_(ć)_/ĀÆ
I thought about it too, like a resetFields or something, but like you can use Embed.fields = [] or assign it your array of fields?
embed.spliceFields(0, embed.fields.length, newFields)
Yeah, would be best to maintain the reference to the array with .splice
wdym the reference to the array?
Array#splice just removes elements from the array, but it's still the same object. Reassigning it with = [] would overwrite the object with a new one.
but there's no difference if you wanna overwrite all fields right?
const fields = embed.fields;
embed.removeAllFields(); // this.fields = [];
fields.push({ /* ... */ }); // fields is now not the same variable
embed.fields.length = 0 done
why would we need an api for that
lmao
Because thats how you remove all elements from an array
MessageEmbed.prototype.resetFields = function() {
this.fields.length = 0;
return this;
}
Here, make some discord.js-utils package

awful awful language
discord-api-types 0.18.1 has no deprecation message, is this intentional?
Just bother vlad about it
is this intentional?
could use interaction.channelId but its annoying that you can't just do interaction.channel
Seems intentional to me, even if Channel was made stricter you still wont be able to pass PartialDMChannel to that method
That's cause I fucked up some deprecations when I was trying to deprecate alphas and my shell said "lol no". I'll fix today
lmao aight
btw it should probably be bumped on discordjs/builders since that's where i got that warning from
Pretty sure I bumped it already, just that @wild flax didn't publish yet
Has been fixed
yeah I see, just hasn't had a release in almost a month, ty!
I was referring to the deprecation messages
ah ye i see that too, noice
I was looking at Message.embeds in master and I saw that it was an array but in almost any other array-like property it is used as a collection -- is this intentionally an array or just not decided?
Intentional, since there is nothing to key them by.
mock unitintegration testing
I don't know if it's could be useful but maybe we can Improve typing by adding something like that :
type If<T extends boolean, A, B = null> = T extends true ? A : T extends false ? B : A | B;
export abstract class Application<Fetched extends boolean = boolean> extends Base {
public constructor(client: Client, data: unknown);
public readonly createdAt: Date;
public readonly createdTimestamp: number;
public description: If<Fetched, string>;
public icon: string | null;
public id: Snowflake;
public name: If<Fetched, string>;
public coverURL(options?: StaticImageURLOptions): string | null;
public fetchAssets(): Promise<ApplicationAsset[]>;
public iconURL(options?: StaticImageURLOptions): string | null;
public toJSON(): unknown;
public toString(): string | null;
}
export class ClientApplication<Fetched extends boolean = boolean> extends Application<Fetched> {
public botPublic: If<Fetched, boolean>;
public botRequireCodeGrant: If<Fetched, boolean>;
public commands: ApplicationCommandManager;
public cover: string | null;
public flags: Readonly<ApplicationFlags>;
public owner: If<Fetched, User | Team>;
public readonly partial: boolean;
public rpcOrigins: string[];
public fetch(): Promise<ClientApplication<true>>;
}```
Didn't we already have this discussion a few times lol
Ha maybe but I don't remember the answer XD
https://github.com/discordjs/discord.js/blob/master/typings/enums.d.ts ts imports these and compiles thinking they are actually exported, should this be changed to only export them as a type?
because they are only ever used as a type
Both of these have the warn tag but only the first one displays as a warning, does anyone know why? Link: https://discord.js.org/#/docs/main/master/typedef/ThreadAutoArchiveDuration
Yeah, its an error on the site side, I mentioned it a bit ago. It doesn't like the two warn tags in the same description
could it be because they're inline with the duration or is it unrelated?
should we make ApplicationCommand#description nullable now, so there isnt a breaking change later?
oh nvm, i forgot they'll change it
so is v13 gonna release requiring the CHANNEL partial for receiving DMs or is that gonna be changed?
I raised the same, but there isn't exactly a nice way to not require it without introducing the possibility that message.channel is a partial on every message
is that so bad
The change would be something similar to how interactions handles it with interaction#channelId and get channel() I guess, however right now without the CHANNEL partial its just null
We could do that, and if the partial isnt enabled, the channel is null on message
Or drop it entirely, and just include that as a type I guess?
according to guide, partial structures are to be assumed not working, so technically message.channel.send couldn't be used without fetching
Probably would work though since it has the id
I know there has been discussion before about removing dumb helpers, and frankly resolveId feels like a very very dumb helper? https://github.com/discordjs/discord.js/blob/9cd5e7ed6104e40c038d17456abd0cc4a3778b9e/src/managers/DataManager.js#L50-L54
resolve isn't much better either, but does interface with the cache at least
It's not a helper at all, both are used quite a lot internally
The reason I bring it up is because it came up in a convo I was having with someone where they were expecting it to be able to resolve way more in terms of types
Could argue for making them private _resolveId
Not sure what they thought it would do though
That'd make sense to me if they're needed internally
They were expecting it to be able to resolve strings to snowflakes, but the typings don't allow that
In most managers, its literally either is a no-op on the snowflake you pass, or returns the snowflake for an object
I mean, I don't think it's documented to suggest it does that anywhere
Because it doesn't accept strings
Its not, for sure, but when you see resolve one might expect it to able to resolve more types
Cause as an end user, it feels very pointless as a function in its current state
I mean sure, but if it feels pointless don't use it?
I don't think we really ever encourage it's used in guides or anything
Oh yeah for sure, just somewhat feels like a trap to have it there given how little it does
Making it private feels sensible to me
agree, #resolve is rather useful as .cache.get(..) alternative, but resolveId was even confusing when i first looked into it because it just forwards strings and such
private seems quite fitting for those, tho if not documented that might actually be private enough as well
Hi hi! Quick question, I notice the documentation uses "subcommand" and "sub-command" in places and to save my sanity, I wish to make these consistent (the same) so... should we be saying "subcommand" or "sub-command"? It should also match the guide's preferred style, but I don't know if there is one yet (or a preview of one)
subcommand and subcommand-group as per dapi docs
https://discord.com/developers/docs/interactions/slash-commands#subcommands-and-subcommand-groups
Nice nice, thank you! As a sidenote, now I'm gonna be haunted by this 1 small result (':
time to PR to dapi i guess 
Just to clear it up, it should be "subcommand group" and not "subcommand-group" right? The only instances of "subcommand-group" I can find is when they use it for an example for command names which must match the regular expression^[\w-]{1,32}$
https://discord.com/developers/docs/interactions/slash-commands#nested-subcommands-and-groups
oh, right, yes
@wild flax @opaque vessel related to your PR, I don't know how to feel about the rename of SubCommand to Subcommand
Its 1 word
No it ain't
sub isnt a word though
Well, I also don't like seeing "sub-command" and "subcommand" being used in several places in the documentation :thinking:
subcommand is a single word
Yes, it is one word.
sub command 
We have to pick one, so uhm... which one do you all want to agree upon then?
Oh good more breaking changes in -types

Jiralite, for free PR, discord-api-types, SubCommand -> Subcommand
Tho..
Discord types it as SUB_COMMAND
So
not sure how thats ever been a concern?
other than properties that reflect raw data of course
Don't care much about types, they can stay if need be, but the word itself
Its a concern because usually converting from snake case to camel or even PascalCase, every immediate letter after a _ gets uppercased
So for stuff like Routes.registerSubcommands we should change it
And yeah, I would just go with Enum.Subcommand
But that's inconsistent with discord
The enum doesn't even represent discords data
Its literally just enum convention for enums
^
Talking about their docs/clients, where they use upper_snake_case, we use PascalCase in -types so... I'd rather stay consistent with that there
In docs sure
It's the same when using Permissions.UseSlashCommands not representing USE_APPLICATION_COMMANDS
lol
That's cause someone ignored that review in the pr
Yeah but I'm just saying
its just a name
It doesn't have to be a 1:1 mapping, esp not when its about proper english
At least for the documentation, since Discord documents it publicly as one word, we should use one word there
For the internal methods, I don't think that really matters
For methods that are not private... guess that's the tricky one T_T
I'd just go with Subcommand and call it a day
It's not gonna break anyones neck, nor confuse anyone
isnt #6192 need to be a semver major as it changes parameters of the constructor or i am mistaken
Any reason why a ThreadChannel doesn't have a fetchOwner method?
Is there data that comes from the API that points to the owner?
yeah there's ownerId
can be missing tho somehow
i don't think it should be marked as nullable
its nullable
Super sorry, but I'm not really familiar with that repository, so if you don't mind doing it or someone else doing, that'd be wonderful!
interactions are annoying in that (partial channels)
but you shouldn't mark a property as nullable if it's only missing in partial channels
Yeah you should
Its alright haha, thankfully TS would make it easier (clone, npm i, find all references of subcommand (in all files outside of the deno folder), f2, new name, vsc does the rest), but we can do it later. Can you at least make an issue so we don't forget? š„ŗ
why tho? Something being partial means that all of it's properties can be missing (talking about the docs btw, not types)
Because not everyone uses typescript
Lol
You get a struct as a partial, its not marked nullable on the docs, you assume its not
Now your application explodes
Will try (:
fair
but going back to the main topic, should i add a fetchOwner method to threadchannel?
you're trying to fetch the member object for the owner right, cause you can't fetch the thread member
well I didn't know that but in that case yeah the member object
Since we can't fetch members, should a getter be added for the owner thread member object that gets it from cache?
#6207 in discordjs/discord.js by ImRodry opened <t:1627509823:R> (review required)
feat(ThreadChannel): add owner and fetchOwner()
š„ npm i ImRodry/discord.js#thread-fetchowner
did it anyway
bump, is this a good idea or no?
I know but that's because you can fetch the guildmember object of an owner. I decided to add it here because you can't do the same for thread members
Seems kinda useless though
You would STILL need to do
let owner = thread.owner;
if (!owner) owner = await thread.fetchOwner();
lol
Might as well fetch in the first place
Fetch doesn't fetch anyway if its in your cache
that's not really good practice to have two different types in a single variable
How?
It does by default now? fetch force is default true now?
No
ah right
so it would make sense to export them only as types
I mean if you can fix it, without breaking everything
i ask because im unsure why that wasnt done in the first place
And them still being exported to be used as a type
We broke typings a lot trying to "fix" them
and it was never worth in the end
ah
@outer raven I get your point about different types, but having both an owner and fetchOwner() property that return different things isn't any better. If owner is null, you'd fetch expecting to get that type... and then not get it
Well I don't know any scenario where the owner wouldn't be cached and Discord doesn't allow us to fetch a single thread member so what other option do we have?
RoleManager#fetch for example can't fetch a single role either, it fetches them all then gets the one you asked for
I thought of that but didn't know you'd want that to be done. I'll update the PR with that and remove the owner getter
I don't like that because it requires members intent to fetch a single member, which isn't something people are used to
we can add that as a warning
I mean we could go with the nullable cache getter too and not fetch
I just think having both, with those naming conventions, returning different types is yuck
yeah but then its dumb too
the owner may be null and then you have to manually go with members.fetch() lol
and considering we alr removed the owner prop on guild to avoid the annoyingness of that
wed just back at square 0
any reason for this?
Dunno, I don't think its too feasible currently
Lot of work, especially with v13 on the horizon too
Prolly needs to be another component on the docs website too
So we can do <Intent></Intent>
so its displayed nicely
could add that later but for now a warn tag works doesn't it?
wdym
i guess you could open an exception since this is a privileged intent
or just no warning at all
i got the code working, just can't test it cuz i dont have threads
Stemming of that exported enums discussion, Im looking at the fact that although we do document the exported typedefs in the Constants file, we don't actually document Constants itself, which means nothing in the docs suggests that people can do things like Constants.MessageButtonStyles.PRIMARY for example
Which is the alternative JS way, since the enums arent exported
I mean users could always do with (Constants) { /s
So I figured I'd document the Constants object, but then I run into a different issue - differentiating between the enum-like typedefs, and the ones which are just string arrays, eg Constants.MessageTypes which isnt one
Yeah, or I just dont document the ones that arent used in an enum-like fashion?
#6208 in discordjs/discord.js by monbrey opened <t:1627513177:R> (review required)
docs(Constants): document the Constants object for enum-like usage
š„ npm i monbrey/discord.js#constants-typedef
the soloution for the enums could simply just be export const enum ...
https://www.typescriptlang.org/play?#code/KYOwrgtgBAglDeUCGAaKAjNBjKBfAsAFBYD2IAzgC5QCWUAvLAHRIDcRRpF1okUAQgmRpMUHAWJkqUAFYMBLdoSJA this is how it behaves when compiled
Which is why I've now does the PR to document the Constants object, since thats the JS way of handling this
Why does the <ThreadChannel>.delete() method accept a reason?
Because the channel delete endpoint supports it?
Does it? I don't even see a log when I do that
the only thread delete logs I have are only from when I delete it
is there a reason we dont put descriptions in typedefs?
Presumably because most don't need any
Would be nice to have since vsc can pull them in
Typdefs != types
Mm.. looks like we can fetch guild previews even if the bot isn't in the said guild
Wouldn't that be convenient to have something like GuildManager#fetchPreview (or Client#fetchGuildPreview, no idea)? As of right now we can only fetch it through an existing guild instance
And if so, would the logic code behind go to
and Guild#fetchPreview would just call that new method, or should both keep their separate code logic (even tho there would be no difference?)
I'm gonna get glasses soon (:
Does anyone know what WelcomeGuild https://discord.js.org/#/docs/main/master/class/WelcomeChannel?scrollTo=guild is supposed to be here? I also cannot find any typings for it so I'm very unsure...
I just found that out :D Managed to get it like that as so, will try to correct it :eyes:
#6222 in discordjs/discord.js by Jiralite opened <t:1627557349:R> (review required)
docs(WelcomeChannel): Correct guild return type
š„ npm i Jiralite/discord.js#patch-1
Shouldn't the <Message>.startThread method accept an object like <ThreadManager>.create does? This could create some issues if more parameters are added in the future
Are we getting a v12.5.4 to allow bots to read messages from threads?
currently they wont see messages and therefore commands and text moderation are no longer working inside of threads
Basically, people saying n word in threads to bypass chat filtering
Damn
v12 still uses v8, and it's not really possible to move v8 to v9 in a patch or a minor
Yeah that's understandable
v7*
And what v9 adds ?
Threads
bump
why not make a thread
was waiting for the person who replies to do that
then you do it so it exists already instead of it not existing until someone decides to answer you
fine
Possibly change Message.startThread to accept an object instead of 3 parameters
@vernal atlas removing the assignment to this.target will break it more
Yeah, that
since the build method awaits all entry.target
and now you have a dangling promise thats never properly awaited
works
Since https://github.com/discordjs/discord.js/pull/6186 got some backlash, would it be preferred if the function uses spliceFields internally instead of reassigning the fields array?
yeah probably
aight, will do that
i still don't see much if any utility in that method existing at all
spliceFields isn't intuitive for most users and most would prefer to just replace all fields when they need to, instead of doing what we're doing internally
then you can still do embed.fields = or set the length to 0 to clear it and re-populate it
if you wanna go that way then why do all of the MessageEmbed methods exist?
obviously not saying they should be removed, they're just utilities that makes everyone's lives easier when building embeds and this is just another one
if im being honest i dont see the use case for it either
what if you wanna keep every other property in the embed and just change the fields?
thats a good point
useful in a pagination system, where every property stays the same and the fields change depending on the page
with this you can keep the same embed variable and just run a function that applies your fields, which is what I've done
then you can still do
embed.fields =or set the length to 0 to clear it and re-populate it
if you wanna go that way then why do all of the MessageEmbed methods exist?
https://support-dev.discord.com/hc/en-us/articles/4404772028055 Discord is becoming lame on purpose?...
No, its a good change.
Also not library related
Shouldn't DataManager#cache be readonly on the docs?
nevermind my question i just posted, i was being dumb
What makes setFields() different from spliceFields(), other than removing the index and deleteCount?
that's exactly what it does. Splicefields is used when you want to remove some fields. This method is a shortcut if you want to replace all of them
and spliceFields is not intuitive and new users are usually afraid to use this from what ive noticed
I disagree that it's not intuitive. It's pretty much exactly a basic Array method from core JavaScript
New users need to learn
that's true, but having to use splice when you want to overwrite doesn't seem intuitive at all and people won't look at that immediately
they also don't do that for arrays, but i don't remember any Array.setValues, maybe apart from fill
I've been trying to use makeCache option to reduce guild member cache. But it seems I can't set a lower value. As soon as you hit the limit, it removes the first cached member even if the member is the client. At that point most commands breaks. (e.g. can't check if the client has X perms).
Why does interaction.reply() not return with the reply Message?
because discord doesnt give us the message data back
I don't think that's a good idea. This option was given to reduce cache cacheWithLimits({ GuildMemberManager: 10 }) but you can't set any lower value at all.
Just because you can doesn't mean you always should
it makes sense to be able to limit it without it removing the client user
Whats this arbitrary 10 value here
No offense to whoever wrote that feature, but is it really a good idea to let people play with everything's cache limit? Looks like people are trying to reduce it at most without really thinking to how useful (and important) caching is, thinking also they can save a gigabyte of RAM having only 10 members cached at most? 
Or at least, put a big warning in the guide against how delicate this feature is, and that only "advanced" developers should be playing with it
people have developed tons of third party packages just for the sake of cache manipulation so we're just giving them what they want in the main lib
shouldn't be playing with fire if you don't know it burns
That's just an example to explain my words.
and that's exactly what I was trying to say.
Does someone know why the buttoncolours are named so unsual?
wdym so unusual
That's how Discord calls them, not a decided by discord.js
Think they mean primary, danger etc instead of blue grey or red
yarn outdated flags dev tag as outdated
shouldn't it be interaction.author.id instead of interaction.user.id ?
like msg.author.id
I was also wondering that, but I'm not very familiar with the naming thoughts in the API. For now I just use this message.author?.tag || message.user.tag
Makes sense for me cus itās the user who runs the interaction
Idk
discord.js follows Discord terminology
They talk about a message author
and an interaction user
Can I get a response on #870267529321410560 please
I think it's important to do that before v13 arrives, if we do
just make a PR then
alright, sure
@spiral fulcrumthis will fix your issue hopefully: https://github.com/discordjs/discord.js/pull/6242/files#diff-d165f056c558947125ae776c833631ced37a87837b0ce367a255df13c1c10431R15-R22
It will, thanks.
should i update the example in the readme to a slash command?
probably copy the example from the website* yeah
nevermind it's the same lol
i would have sweared to have seen an interaction example
prob because people thought it'd work out of box without any slash command creation? 
Yeah
And itās too long otherwise lol
So i at least removed It from the front page for now
#6250 in discordjs/discord.js by SuperchupuDev opened <t:1627720282:R> (review required)
docs: change example in readme to slash command
š„ npm i SuperchupuDev/discord.js#readme-change
do i update the example in the website too
no that's actually intended to have reverted to message example
this example should then include the deploy code, but that would be too long
because that won't work out of box for a freshly created application
however client.on("message" should be turned into client.on("messageCreate" (on the website at least, readme looks fine)
in the guide the creating your bot section doesnt have deploy code either nvm it doesnt have the code but it has a warning that links you to that
also, message based commands won't work after april 2022 without enabling the priviliged intent, so it wouldn't work for a freshly created application
but then it would be using a text based command again for deploying
no, why?
I highly doubt that
and making it create one on ready would be potentially bad for ratelimits if the bot is restarted a lot
that's nitpicking but message.content can be null
if that question was for me, yes if you just send a file it will be null
hmm, i see it's a separate script for deploying
Hey @solemn oyster can you undo that commit on my PR? I donāt think that should be changed
Talk about timing
The change was requested for 4 hours and you reply 2 minutes after I make the change
I literally just woke up
It does fail the CI too though
Gonna revert with force-push
Yeah it doesnāt make much sense
There, reverted
Thanks!
@bitter peak please address the requested changes in https://github.com/discordjs/discord.js/pull/6177
any reason why GuildChannel#members just not filter the cache instead of creating a new collection? 
https://github.com/discordjs/discord.js/blob/master/src/structures/GuildChannel.js#L260
yeah that could probably simplify the code a lot and reduce memory usage
Additionally, all messages sent by bots now support up to 10 embeds. As a result the embed option is completely removed, replaced with an embeds array which must be in the options object.
why? having a single option was very comfortable, having an array only bloats my code, perhaps accepting the embed option and turning it into an array would work better
if you can send more than 1 embed why would discord.js support sending only 1 embed, it's just a useless shortcut and you don't need to change much
Alright will get to it in a bit
If 2 characters bloat your code
You are being very minimal about it
Maybe rethink the usage of the word ābloatā
i made a lot of the conversion by hand, it's kinda tedious when you call the send method a lot and never intend to send more than one embed
Have you thought about making your own send function then?
send(message, your, own, arguments)
And inside you can wire it up as you like
So whenever something breaks, you can change it in 1 place
yep, most of my commands do like return embed
but in some cases i send non command messages and that's where it gets longer - i still preferred having the singular options
why? that's what i want to know. i have no problem editing my code but my original question was left unanswered
It was never intended to stay once discord switched to allowing multiples
We mirror the api for args we take closely
Also it could lead to problematic code like:
embed: embed1, embeds: [embed2]
that makes sense then
I feel like most people that have membership screening now only consider someone a member of their server once they complete the required steps so wouldn't it make sense to have a property in guild called estimatedMemberCount (name suggestions are welcome) that holds the amount of users that are not pending based on the cache? Basically something like this
get estimatedMemberCount {
this.members.cache.filter(m => !m.pending).size
}
Misleading because this requires an intent and caching might be restricted or sweeped
Thus -> pointless
Just do it yourself
I figured but the name does include estimated, we could add a note in the docs saying what they need to do in order for that to be fully accurate
Meh
probably not worth it since it's so simple but I feel like it would at least encourage people to check for pending more often
Encourage why?
cuz if they check the docs and see that there is a property that makes counting non pending members easier they might look further into what makes a member pending and change their code accordingly, just a guess tho
That⦠is our concern why?
not saying it is, just a small QOL thats all but not the end of the world if it doesnt exist either
We don't need to bloat the library with a lot of getters, tho
Specially if they're very unreliable
understood
Well one more thing: it is possible to make autoArchiveDuration an optional parameter when creating a thread?
We could use the channel's defaultArchiveDuration and throw an error if that's not present (since users need to set it in order for it to appear)
fiexd
xD
x)
@wild flax someone requested these changes on my readme pr for deployment support, thoughts?
console.log(`Logged in as ${client.user.tag}!`);
if (await client.application.commands.fetch().then(commands => commands.size) === 0) { await client.application.commands.set([ { name: "ping", description: "Replies with Pong!" } ]) }
no
you should incorporate the portion of the guide
"advanced deployment"
in a separate codeblock above or smth
explaining that you need to register a command first
and then run the bot
yeah
do i keep const commands = client.commands.map(({ execute, ...data }) => data);
that would only work with a command handler ig
yeah no hardcode it to a ping command or smth
is this fine? (i know the formatting is fucked up i'll fix it later)
const { REST } = require('@discordjs/rest');
const { Routes } = require('discord-api-types/v9');
const { token } = require('./config.json');
const command = {
name: 'ping',
description: 'Ping the bot'
}
const rest = new REST({ version: '9' }).setToken(token);
try {
console.log('Started refreshing application (/) commands');
await rest.put( Routes.applicationGuildCommands(CLIENT_ID, GUILD_ID), { body: command }, ); console.log('Sucessfully reloaded application (/) commands.'); } catch (error) { console.error(error); }```
fairly certain the body needs to be an array
yeah, i'm on mobile so i can't really test it right now, thanks for telling me
The description should probably also match up with the guide
i wanted to make it smaller and simpler because its just an example
seems like a bad excuse to give people some bad code
Why are features removed from the lib that are already there? Like Collection.array being removed in favor for.. [...collection.values()]? I guess my question is why remove something that works for no (apparent) reason? Because imo collection.array() looks cleaner then that
because its pretty pointless
All it does is break code though, I don't see what the advantage of removing it is
The .array() method only existed to provide access to a internally cached array for some methods. With those methods refactored to no longer rely on cache, .array() was no longer doing anything that didn't already exists in base JavaScript
is Client#_finalize() supposed to be marked as private?
For inviteCreate
const client = this.client;
const channel = client.channels.cache.get(data.channel_id);
const guild = client.guilds.cache.get(data.guild_id);
if (!channel) return false;
const inviteData = Object.assign(data, { channel, guild });
const invite = guild.invites.add(inviteData);
``` and for inviteDelete
```js
const client = this.client;
const channel = client.channels.cache.get(data.channel_id);
const guild = client.guilds.cache.get(data.guild_id);
if (!channel) return false;
const inviteData = Object.assign(data, { channel, guild });
const invite = new Invite(client, inviteData);
guild.invites.cache.delete(invite.code);
it checks for the channel but not the guild, so if I only disable the GuildManager cache, the guild should return undefined
and since there's no check, for both this and inviteDelete, it'll cause an error
is this expected?
looks like the function defaults in https://discord.js.org/#/docs/main/master/typedef/LifetimeFilterOptions have extra backticks
@wild flax i've been testing the deploy code and i ran into two issues
one is that i cant use await because it's not an async function
which is easy to fix
but then there's this one while importing the api types
nvm i fixed it by updating to latest
for some reason it installed 0.18 before
the problem now is that removing await makes it log this even if the promise fails
do i add a .then or something
well you see removing await would make it synchronous so that's intended
the thing is that the code is supposed to be async because it uses await
but since it's not an async function it throws an error
pretty sure lts node enables TLA
im on node 16.5 rn
okay so i ended up not removing the await and commiting the changes, will remove it if needed
TLA has been available since Node.js v14 (.6?), the only requisite is using ESM instead of CommonJS.
Question about https://github.com/discordjs/discord.js/pull/6262: why are createInvite and fetchInvites in both BaseGuildTextChannel and BaseGuildVoiceChannel?
wdym why
#6114 ChannelUpdate.js
im assuming this was an accident?
newChannel is not going anywhere now
Looks like an accident, yes.
Happy little accidents
pr'd
What do you think about renaming/adding the events to edit, reply, delete and similiar of CommandInteraction similiar to Message or Message similiar to CommandInteraction?
pretty sure it's like this to match discord's api
I don't even understand the question
Like you do <Message>.edit() and <CommandInteraction>.editReply()
Yeah what about it
Couldn't they be matched? .-.
but there's <Message>.reply() and <CommandInteraction>.reply() too
So there would be a edited a reply too or not?
(in master branch)
?? interaction.editReply edits an existing reply to the interaction, but message.edit edits the message
they're completely different
I just noticed, shouldn't .defer() actually be .deferReply()?
For the reason stated above and to be more consistent with update -> deferUpdate
hmm
Regardless of the reasoning, I would be in favour of this in case of new ways to defer interactions... it'll look weird having all those .deferXXX() methods and a standard .defer() for one interaction alone
Also I noticed the immediately invoked function expression on the README.md is missing a semicolon, looks like a styling need since semicolons are used everywhere else in the code snippet + the guide has it
I was thinking the same thing the other day 
sorry i took so long, I meant why aren't they in GuildChannel
Hmm, I wouldnt like to deferButton, deferSelect, deferCommand
Thats to much cosmetic changes
Disagree with that, all those would just internally call the same thing and we'd need to add more if more types come. Should just have a deferral for each interaction type
Changing .defer() to deferReply() though I think is a good idea (and this can be used currently on all received interactions)
This bloats up the libraray, when the Functions Code is the same, then its senseless
Since it does the same thing
It's not about adding a new function for every interaction type
It's about showing more clearly which function replies with which interaction response type
And the name defer is too ambiguous for that
Agree on this point
I agree. On MessageComponentInteractions, calling .defer() would seem like it would call deferUpdate at first glance but that's not what it does, so removing a generic defer is definitely a good idea imo
Also @copper laurel why did you add setTopic back to StageChannel? I thought the discussion was heading in the direction of removing it
Because that discussion happened after I had already done it
ah alright mb
I'll wait for a maintainer to decide, or get some indication from API devs
while you're here, why don't createInvite and fetchInvites go back to GuildChannel?
Because you cant create invites to every type of guild channel....
can't you?
categories, threads
you can
stupid store channels
yes
might wanna add that then
What are even store channels?
yes... thats why I brought it up
ah aight
channels in some verified servers where you can buy products
Ah, I remember, interesting
I think thats it now, pending official call on StageChannel#setTopic
If its your own message you can actually edit the embeds out entirely if you wanted to, embeds: []
Is discord-next gonna be v14 ?
no, there is no version associated to typescript modules
GuildInviteManager should have a configurable cache, since it extends CachedManager and DataManager, no?
typescript is saying it doesnt exist in CacheWithLimitsOptions
seems to be missing from the Caches type
Feel free to PR it in
will do š
The Discord API docs document the member field in slash command options as a guild member object, so can I change APIInteractionDataResolvedGuildMember in the docs to APIGuildMember?
just saying this because it currently doesn't lead to anything
wait nvm there's a different PR covering this
@opaque vessel btw those links were correct, but they changed after i added them
as for APIApplicationCommandOptionResolved, that is also the correct link (you can see this from the old one)
@vernal atlas why do you prefer parent over parentId?
i reacted because i think it might confuse the issue author š
oh
its also slightly off-topic for that issue no?
both 
well we were discussing a fix I believe, thats why i mentioned it
ill just fix it on setParent and pr tho, parent does make sense
where?
Wdym where
I can choose to either provide a role or a roleId
Or is that not the issue

oh no thats not the issue
its the name of the property on the options
parent over parentId
ye i didn't think it could be a channel resolvable
never used that so it didn't cross my mind
Oh
#6276 in discordjs/discord.js by ImRodry opened <t:1627928356:R> (review required)
fix(GuildChannel): setParent not working
š„ npm i ImRodry/discord.js#fix-setparent
btw
Yeah parent makes more sense then
parent can imply both a struct or id
But parentId heavily implies an id only
All gucci

Was thinking of making a PR that would use a es2021 feature, is that ok for v13?
if it works in node 14 sure i guess
I've already updated the eslint config to target es2021
Ah alright
I had some issues with es2021 stuff when using node 14 so I upgraded to node 16, thatās why I was asking
logical assignment stuff is 15+ so no
other than finalizers and weakref we're still on es2020 yeah
there goes my idea then
Iāll still PR tho and we can change to the es2021 way later
Was gonna use ??=
Should I add a TODO comment or is that too annoying since it appears on every pr going forward
??= is epic but it was introduced in node 16
15*
Yeah
@ruby terrace what do u think?
No, there will be a PR to do that in a bunch of places for v14 I'm sure
just saying it may be hard to find but ill leave a regular comment then
we want to mostly move away from mutations anyway
so local assignments will be mostly useless
wdym with mutations
I ended up not needing any of that but it may come in handy in the future
When Node v16 will be LTS, is djs will move to it ?
october
Read more about it here: https://nodejs.org/en/about/releases/
probably the next major release of discord.js it will
yeah ^^
We'll move to it if/when we want to use features introduced by it
There's not much reason to arbitrarily bump up Node versions if theres no benefit
i think the new operators like ??= are a huge benefit
I mean, maybe
But thats just refactoring stuff that already works without the operator, its not important
yeah its a low priority

