#djs-in-dev-version
35223 messages · Page 36 of 36 (latest)
Oh, okay? And there is a list of changes? (example for the release of v14 we had a v13 -> v14)
it isn't finished so there isn't one yet
there's a pr that was keeping track of some of the changes in the guide repo
The list of changes for the dev version pretty much is the commit list on the repository
Thanks for your replies, I'll look at the commits 🙏
They have documentation for 15.0.0-dev.1754006526-8f5ac55d8 (the latest dev version).
?
@patent zephyr
Ok
But since I know it's new and that it doesn't
sorry, I don't understand what you mean
How do I know what has changed, what has been added, and what has been removed?
you don't yet, documentation documents the current state, not changes
there are other ways though, read the whole conversation I linked to you
will djs switch to BigInt for Snowflake IDs?
Not by default, no, because the need to convert between the two usually outweighs the benefit of storage
I think if we can convert it once and reuse it, it can be somewhat better in both speed and storage.
Oh wait I forgot about json requests also require string :P
To add to the above, there's no benefit to them being BigInts really because they arent used for calculations. Number isn't a particularly useful format for Snowflakes
I dont know what "speed" you're referring to there
Will we see major changes on discord.js or we will keep going with v14.x?
For now, everything seems fine so far, I would like to know if there’s going to be breaking changes
There are major changes coming yes
- Is there an ETA?
- I have checked docs but all I see are main and v14. I am not sure main means development as branch on website so yeah. Is there a website/wiki that we can follow up the changes?
the commit messages are the changelog
So main is actually dev branch?
Then release… alright, thanks.
People rename their default branches to whatever, but that's not the case all the time if that's what you were asking
Select main in the website to see documentation is what you need to do yeah
the main github branch releases as discord.js@dev, yes, if that's what you mean
which can also get breaking changes very frequently, especially when it gets closer to a major release. so we recommend pinning your version to a commit and only updating after reviewing commits you will apply with that update
(granted most devs will not realy have a benefit from using dev in the first place)
what styles djs docs? the docs website, not the guide. I'd appreciate a link to the repo for it :)
thanku
and to generate the docs? is it the docgen package?
no, that's a legacy thing that im not even sure why its still around
we use an api-extractor fork, its in the packages folder in the same repository as this
Old documentation site still exists
and why is that still around
lmao
i'll check out api-extractor thanku
We use both. The ae fork uses the output of docgen as input
ooooo
i am using the dev branch and i cannot figure out why the SuppressNotifications flag appears to not work? am i doing something wrong? im gettin yelled at
or does it just show the channel red indicator + highlight without sending any desktop/mobile notification?
i.reply({
content: `<@${user.id}> linked to the role <@&${role.id}>`,
flags: [MessageFlags.SuppressNotifications],
});
yes, as the flag tells you—the message will suppress the notification
ok that's what i thought, so false alarm then, thanks
If by "gettin yelled at" you mean "I am still mentioned", you wanted allowedMentions, not that flag
oh... indeed, thanks 😅
This is released now!
It isn't possible to test the select modals with discord.js is it?
select menus in modals are not yet publicly available
they're currently being tested by library and large bot developers before a public release in ab. 2 weeks
I know, I meant for testing
sorry if this is a stupid question 😅
I just thought maybe I can install the branch
no, it's API gated and only available in a test server owned by discord that's not open to the public
oh, you're in the test 
Uh, I just asked advaith for the invite and he gave it to me
you can install the PR https://github.com/discordjs/discord.js/pull/11034
from my understanding it has to be built first?
like pnpm run build
alternatively you can use the raw payload as documented with Client#rest
I think it's not possible because discord.js crashes while processing the request?
Unless the is a way to tell it to ignore modal submit interactions
or is it like a whole different package?
There's only a pull request for @discordjs/builders and discord-api-types right now
It's not really ready for testing unless you use them
There's nothing handled yet for discord.js (the package itself)
i'd recommend waiting for a public release
if you want to test it now to play around with it, you can use a separate @discordjs/rest REST instance to send raw payloads and see what it looks like
Alright, thank you, sorry for bothering you
your production bot won't be able to use it anywhere but that server anyways, so a small test app will likely fit that exploratory phase much better
👍🏻
just asking a curious question, can each section contain it's own thumbnail?
yes
and please keep this only for the dev djs version
k thx, but I'm using it too (dev version), where do I ask then? in #986520997006032896 ?
I mentioned it since it's more of an api question
not djs specific
hmm, well... i'm trying to add the thumbnails, but it's not working, djs is ignoring it
show your code
const buildPromotionsContainer = (content: string, promotions: any[]): MessageCreateOptions => {
const container = new ContainerBuilder();
container.addTextDisplayComponents(text => text.setContent(content))
for (const promo of promotions) {
const sectionBuilder = new SectionBuilder()
const description = `Disponível até <t:${DateTime.fromISO(promo.end, {
zone: "America/Sao_Paulo"
}).toSeconds()}:F>\n${promo.link}`;
// Add game title
sectionBuilder.addTextDisplayComponents(
new TextDisplayBuilder().setContent(`# 🎮 **${promo.title}**`),
new TextDisplayBuilder().setContent(description)
);
if (promo.img) {
sectionBuilder.setThumbnailAccessory(
new ThumbnailBuilder().setURL(promo.img)
);
}
// Add link button
sectionBuilder.setLinkButtonAccessory(
new LinkButtonBuilder()
.setLabel("🌐 Abrir no Navegador")
.setURL(promo.link)
);
container.addSectionComponents(sectionBuilder)
}
console.log(JSON.stringify(container))
return {
components: [container],
flags: 1 << 15
};
};```
You cant have both a thumbnail and a button
you get one accessory, so the button is replacing it
ohh
I didn't know about that, thx!
also I'd strongly recommend against using any
that goes against the entire purpose of using ts
and you can use enums instead of raw numbers
v10: MessageFlags
read more
wait they're releasing this officially? that's huge and gonna totally change my bot. thanks for the info
Please update this lib (discord.js) soon to receive select strings inside the modal
I believe the Pr is already in place
#11034 in discordjs/discord.js by Jiralite created <t:1754556886:R> (review required)
feat!: Support select in modals
Of course. We always do support new features.
will there be more types of selects? type of channels, roles, users
In phase 2
and when can we use it? because now the select inside the modal does not respond
discord js first needs to get its update
just wait till it will get announced
Please update quickly please, we bot/app creators will be very grateful
there's no eta as always
also this channel is for the dev (main, v15) version
We will update when the feature is complete, stable, tested, and ready
You survived for years without it, a few more days won't hurt
OkIt's something very cool and useful, thank you.
anyone have screenshots of what it'll all look like? am curious what to expect 🙂
@ruby sparrow ^
so sick. tysm!!
how options looks like
^^
please do api questions in other places like #archive-offtopic or ddevs (#useful-servers)
Can we use Select Menus in Modals now?
Please read above. not yet in djs
I want to implement a system to check a user's primaryGuild updates. Which event should I use?
UserUpdate
thank you
Why I'm getting this error:
ValidationError: ✖ Invalid input: expected string, received undefined
→ at label
at validate (D:\Projects\ZombieClient\node_modules\@discordjs\builders\src\util\validation.ts:54:9)
at PrimaryButtonBuilder.toJSON```
```js
const flags = {
PL: ':flag_pl:',
GB: ':flag_gb:',
};
const row = new ActionRowBuilder();
Object.keys(flags).forEach((flag) => {
const button = new PrimaryButtonBuilder()
.setEmoji({ name: flags[flag] })
.setCustomId(`verifyButton_${flag}`)
// .setLabel('\u200B')
row.addComponents(button);
});
is label required now for buttons with emojis?
this belongs in #djs-help-v14. You dont have to set object inside setEmoji()
It's in dev and I need to put the object in setEmoji and I'm asking about setLabel
your issue is not related to the dev build of djs
I think it's fine here since they're using builders v2
which isn't on v14 but on main
that does seem like a bug though
My apologies, I didn't realize the button builder got renamed for V2
Would potentially use the Unicode for the emoji? Makes sense
oh yeah it should be the unicode emoji as well
but the validation shouldn't be failing
label isn't required if there's an emoji
and viceversa
but it is failing for me
it's discord issue while i'm pasting it here
It's a bug in current state of builders in main and needs fixing
what I mean is that it does, but it shouldn't
(it's a bug) ^^
is there already a PR for updating the modals guide page according to d.js PR #11034, otherwise I am willing to start working on that soon 😄
May I give it it a try. I really enjoyed helping with the cv2 guide. And want to make an attempt.
Why does ModalSubmitInteraction have deferReply() and deferUpdate(), if they cant be used on the interaction?
You can use them?
What you can't do is defer and then show a modal
Ah, Thank you. I misread the warning message
You can’t send interactive components like buttons directly with a raw webhook since webhooks don’t support interactions; you’ll need to send through a bot client using interaction.reply or channel.send to make them clickable. For tracking a user’s primaryGuild updates, the closest event is guildMemberUpdate, which fires when roles, nicknames, or metadata change. As for select menus, they still can’t be placed inside modals, only in action rows for messages. Add me and I’ll share a working code example showing the right structure for buttons and event handling.
Webhooks do support buttons etc but the webhookmust be owned by the bot
Also:
- UserUpdate works fine for tags, like the answer they got two weeks ago said.
- Select menus can be placed inside modals in dev.
(Account feels like some sort of scam though)
how it's possible?
the button inside the embed?
#djs-help-v14 next time, this channel is for the dev version of d.js
Popular Topics: Display Components
read more
it is not an embed, its a container
oke thnx
Is there somewhere I can find the v15 documentation, even if it's incomplete? Just to understand what will be changing so much.
I installed it to test, and I saw that even the slash command builder no longer exists, I wanted to know more to prepare for the changes.
v15 does not exsit and has no release window or timeline
So modal support will arrive in v14?
yes, next release probably
and today is it possible to access v14 dev without having to build locally? I mean through npm itself
it isn't
Also, technically v14 already has support for modals, but assuming you're talking about the new select menus in Mobile
Sure, just install discord.js@dev
Oh wait, you mean v14 dev, that doesn't exist no
does that no longer require setting overrides?
I'm having issues with typescript and using Guild#features what's declared as GuildFeatures API Type
I'm wanting to check if STAGE_CHANNEL_VIEWERS_50 is in that array. The issue is it's not declared in that type? At the top of the enum it links to the discord API docs where they have some features declared but not all that I have seen can be returned from the API. Is their a reason why we don't support (the missing features that aren't displayed in the discord API docs) them and is their any reason why it couldn't be pred to the package?
Hmm interesting it makes sense I guess I will need to find a dif way of checking some data so typescript isn't mad
Just cast
Or use expect-error
eta select menu on modal?
Hello guy's where is Discord.js V15?
Currently not planned for released. With no timeline for when that would occur
If ur looking for its current state, check the main branch of the d.js GitHub
Discord.js open source ?
yes
Need a little help here, I'm trying to create my first contribution to discord.js, in particular the discord.js/builders package. I'm following the contribution guide which states I can use pnpm turbo run build --filter=@discordjs/builders -- --watch, however I keep getting:
ERROR unexpected argument '--watch' found
tip: to pass '--watch' as a value, use '-- --watch'
Just go into the package itself and run pnpm build --watch
Thank you
I've just noticed that when using builders, the following:
new SlashCommandBuilder() //
.addSubcommandGroup(
new SlashCommandSubcommandGroupBuilder()
...
will only work if SlashCommandSubcommandGroupBuilder is imported from @discordjs/builders, not from discord.js, otherwise shapeshift throws a validation error. This happens to other builder types too
I think it's because assertReturnOfBuilder fails to recognize it as a valid instance of the class it's expecting it to be because it's imported from a different module, as s.instance is using instanceof to check? I'm not sure at all though
Just think it might be a useful addition to #1115775988857581668 or somewhere else that is more appropriate
Can you make a code sample
how can i avoid massive memory bloat from all the caching djs does? i already do this:
makeCache: DiscordJS.Options.cacheWithLimits({
ApplicationCommandManager: 0,
GuildBanManager: 0,
GuildInviteManager: 0,
GuildMemberManager: 0,
GuildStickerManager: 0,
MessageManager: 0,
PresenceManager: 0,
ReactionManager: 0,
ReactionUserManager: 0,
StageInstanceManager: 0,
ThreadManager: 0,
ThreadMemberManager: 0,
UserManager: 0,
VoiceStateManager: 0,
}),
sweepers: {
messages: { interval: 0, lifetime: 0 },
users: { interval: 0, filter: () => () => false },
guildMembers: { interval: 0, filter: () => () => false },
},
by not using intents you aren't interested in, or not calling it bloat.
also, this has nothing to do with dev version
alternatively, use /core instead of discord.js if you have no interest in built-in caches
You don’t need sweepers for caches that don’t keep anything
I guess interval: 0 causes the sweeper to be invalid and not registered
https://discord.js.org/docs/packages/discord.js/main/APIAuditLogChange:TypeAlias
how come there is no video quality mode key for the AuditLogEntryCreate event?
This comparison appears to be unintentional because the types '"id" | "type" | "flags" | "archived" | "locked" | "channel_id" | "color" | "status" | "description" | "application_id" | "guild_id" | "permissions" | "available" | "volume" | ... 63 more ... | "widget_enabled"' and '"video_quality_mode"' have no overlap.
Where did you get that property from
What do you mean?
where did you get that key from that we don't have
well, you just listen to the audit log entry create event and then edit a voice channels video quality and then it will send the entry that can be seen on the fist screenshot
It’s what the discord API sent
it’s in the audit log so it’s definitely a thing
discord.js just doesn’t have a key for it 
it is a documented channel prop at least
yeah...the discord docs essentially just say "any prop on the target prop is a possible key" but djs has a manually defined union that never gets updated
Not djs specifically but discord-api-types. PRs are always welcome there to add this property
could the union be changed to a keyof Target? i forget exactly how it's set up
No, as that would be wrong. Especially considering camelCase vs. snake_case in properties. But also not all properties of the djs structure are valid properties of the API. That's what API types are for
the text on Guildmenber#pending should be updated
- Whether this member has yet to pass the guild's membership gate
+ Whether the user has not yet passed the guild's Membership Screening requirements
https://discord.com/developers/docs/resources/guild#guild-member-object-guild-member-structure
That's just the same thing
Also that's a lot of edits haha
I type the best ist
I guess but Membership Screening is a Discord feature. not membership gate or at the very lest it was renamed
And that page basically states "we haven't really documented how this works yet, stay tuned" and did so for years now
Membership gating was how it was referred to whilst it was rolling out iirc
the text was updated in api types
APIBaseGuildMember#pending uses the text "Whether the user has not yet passed the guild's Membership Screening requirements"
Maybe it could change then since I don't see any "gate" in the documentation... @boreal knot^
I just noticed yesterday and wanted to being it up
we use w/e is in the docs, with minor adjustements
sooo, feel free to PR it
XD
fair
if you do it in discord-api-types though
That has no notion of Target and thus no keyof
for anyone wondering, this and a few other missing keys have been added in discord-api-types@0.38.31
hope the version in discord.js can be updated to that one eventually
That type is actually re-exported from Discord-api-types
D.js v14.24.0 already requires -types v0.38.31
Guess I should still check main
Main requires -types ^0.38.30, so you could just update it right now without any issues
In case anyone was using overrides like #djs-in-dev-version message or #djs-in-dev-version message, you can remove them as they are no longer required
Do we know approximately when discord.js v15 will be released?
Whenever it's ready
any specific reason you want v15?