#djs-in-dev-version
1 messages ¡ Page 8 of 1
OkIt's something very cool and useful, thank you.
anyone have screenshots of what it'll all look like? am curious what to expect đ
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?
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)
#djs-help-v14 next time, this channel is for the dev version of d.js
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
eta select menu on modal?
we don't give etas
watch the github for commits re:dev and #announcements for releases
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
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
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?
Dev builds don't seem to get published as of yesterday. Somewhere in the workflow it seems to fail.
Thanks for the report, looking into it right now
Issue found, will be fixed later today
Aight cool, thanks.
so can u give poetfolio.
You're in the wrong place for that question
In v15 i understand you wont be able to set emojis in setEmoji() etc as just the emoji id but have to pass an emoji object?
What class are you referring to? For the dev version builders are a completely decoupled optional package. So they won't be in discord.js v15 but in @discordjs/builders v2
stuff like buttonbuilder?
yh so in v15 youll have to set emojis in stuff like buttonbuilder as an emoji object? just a string wont work anymore?
Again. There will be no ButtonBuilder in v15. There will be one in /builders v2 and yes, that one only takes an object as parameter
Well, there's no ButtonBuilder in v2 either. There's PrimaryButtonBuilder etc.
so you mean u wont be able to import buttonbuilder from discord js anymore but have to get from builders?
Yes. Because you won't even have to have builders installed at all. They are a completely separate additional package in main
discord.js doesn't depend on them anymore
Drop your Q's we will find some A's
â ď¸ You are using a development build. Things might break at any new commit.
please provide the full version (output ofnpm ls discord.js|yarn list discord.js|yarn why discord.js(yarn v3+) |pnpm list discord.js) you have installed when asking for support!
Please open threads for questions you anticipate might take some more time or back and forth to resolve
[0;31mnpm [0;0mremove discord.js
[0;31mnpm [0;0minstall discord.js@dev
[0;34myarn [0;0mremove discord.js
[0;34myarn [0;0madd discord.js@dev
[0;33mpnpm [0;0mremove discord.js
[0;33mpnpm [0;0minstall discord.js@dev
[0;32mbun [0;0mremove discord.js
[0;32mbun [0;0madd discord.js@dev
⢠Requires version 22.12 or later of Node.js 
⢠Documentation: https://discord.js.org/docs/packages/discord.js/main
What can you expect from the development version?
Use without crashes
Free of bugs
Consistent API (Things may change drastically from one commit to the next)
Refactor a large code base that a lot of people depend on to use this build
why i can type here
@dawn phoenix
dats dope
did u forget to lock the channel or what
what?
is that normal to type here?
this is a support channel for people trying out v14 by installing the at-dev build
no this is a discussion channel for discord.js@dev
oh ahem
cool
sorry abt that bois
ohh ok i was confused too
Anyway, back to the channel topic
I know that I shouldn't ask it, and I know that I might not receive an answer to this question, but: is there a general ETA? Like before discord makes reading messages privileged intents?
I have been procrastinating updating my bot from v12 to v13, but if this comes before that discord intent update, I might be able to update straight to v14.
And again, sorry for this question. And I understand that there might not even be a date for a push to main (yet)
What alternatives are there to .deleted? Is there anything stopping me from unknowingly storing a reference to a now-deleted channel? I suppose we're just expected to .catch() all our function calls, is that correct?
the alternatives are laid out in https://github.com/discordjs/discord.js/issues/7091
I think the intention was to have it out before then, but its probably not a hard requirement. The privileged intent for access to message content would probably be compatible with v13 as a minor change if it was required (e.g. 13.7)
Is the "Ask to join" button for RPC a v14 feature? Because I can't find any way to integrate it right now.
Oh yea, I don't think it would be a major update, but it would be nice if I could update my bot to v14 in one go, instead of going for v13 first and then (after some more procrastinating) to v14 đś
RPC is not a discord.js feature at all
Oh ok, I thought it was following the same updates
Im not sure what button you're referring to anyway
When you play a game, there's a button called "Ask to join" that user B can press and ask player A to join in that game lobby
I've asked for support in #archive-rpc-help, but's like 2 days and no answer
<:_:874569322742308864> Activity#buttons
The labels of the buttons of this rich presence
You can read the buttons on a presence with discord.js
But otherwise, bots cannot create/set/interact with them
It's not a presence button, is a default button that discord create when you put the secrets in the presence, so other user can join the game
Are you sure? Because the game is definitely an Activity
Yeah, pretty sure
And its not a "presence" in the way bots use them, its RPC and its coming from the game on your local machine
I've also checked the docs here https://discord.com/developers/docs/topics/rpc, there's an event called ACTIVITY_JOIN_REQUEST
But if I subscribe the client to that event, it never get fired, both on user A client nor user B
That is RPC
Bots cant join activities
You're looking at entirely user-land features here
These are not features of discord.js, because a bot
A) cannot set activities that can be joined
B) cannot join activities
Yeah I know, I'm talking about RPC, I was writing here asking if somebody knows if that is already a feature or it's planned to be added
Then this is the wrong channel, because this is for discussion of the discord.js dev release
RPC is not part discord.js
Sorry, I thought the new version 14 brought updates for the rpc as well
all changes arenât in the guide 'cuz v14 is still in dev right?
I mean, all current changes are in the guide.
https://deploy-preview-1011--discordjs-guide.netlify.app/additional-info/changes-in-v14.html#before-you-start has what I'd presume is all current ones
Should we make threads for ongoing issues to draw more attention to them?
I've already opened an issue on GitHub but it got no attention and it's pretty important
Which ones are these?
only referring to https://github.com/discordjs/discord.js/issues/7342 atm
Noice 
Wouldn't work imo, nobody looks at threads
#archive-library-discussion is the place to discuss development, issues etc
aight I figured, just asking cuz of Souji's message above. There isn't much to discuss, the bug is reported and it's pretty straightforward, just need someone who knows how to fix it because I've tried it and I can't figure it out
Yeah idk, I did the initial component design but theres been so much change, especially with typings, since then that I dont want to touch it lol
The only issue with that bug is the fact that some types are made out of unions, so Omit doesnât work on them
So
Embed.addFields([/* Some api fields */]);
is throwing
ZodError: [
{
"code": "invalid_type",
"expected": "object",
"received": "array",
"path": [
0
],
"message": "Expected object, received array"
}
]
which i assume is a bug?
can you show what you're putting in your array?
Heres the actual embed
new Embed()
.setColor(grass)
.setTitle('Welcome to #help')
.addFields([
{ name:'Please keep conversations related to questions and answers.', value: 'Take other off topic conversations to their appropriate channels.' },
{ name:'You will be pinged when someone asks for help in #HelpDesk', value:'To avoid the ping, remove the help role using the button there.' },
])
i assume the parser doesnt hate trailing commas but idk
Oh I see, don't put it into an array, it's a variadic parameter so just put commas between them
like this:
.addFields(
{
name: 'Please keep conversations related to questions and answers.',
value:
'Take other off topic conversations to their appropriate channels.',
},
{
name: 'You will be pinged when someone asks for help in #HelpDesk',
value:
'To avoid the ping, remove the help role using the button there.',
}
);
oh... would be nice if the docs reflected that
current docs are relatively misleading in that case
It's probably spread and doesn't show that
probably, the link to src not working currently makes checking that annoying as well
What page is this?
Builders module, main branch, Embed
i assume main is on @digital dust @ dev
woops sorry about that ping
Yeah it accepts a spread and seems the documentation don't wanna put that in
in the function its spread, is it spread in the jsdoc?
because the documentation reads from jsdoc
Ah uh this is TypeScript, we use typedoc
its typescript theres no types in the jsdoc
oh wait right
welp i guess its just a matter of whenever the documentation website gets updated
Should I update my bot to v14 now? Or wait until the stable version is released.
You can update, just expect some breaking changes sometimes
What is changed is v14?
Hey checking out the guide and I saw this
In addition, #isCommand, now indicates whether the command is an application command or not. This differs from the previous implementation where #isCommand indicated if the interaction was a chat input command or not.
- https://deploy-preview-1011--discordjs-guide.netlify.app/additional-info/changes-in-v14.html#interaction
but I don't really get what it means? Is application commands more broad then chat input commands? Is it only triggering for actual application commands and not guild ones for some reason?
Is application commands more broad then chat input commands
yes
you can have chat input commands, user commands, or message commands
So isCommand now triggers for all 3 cases?
it's true for all 3 of those cases yeah
wait what's a chat input command vs message command
user and message commands are the context menu commands
chat input commands are slash commands
ahhh, ok
Out of curiosity do you know any use cases where someone would use the more broad one over the specific ones?
they're all technically commands
context menu interactions extend the base command interaction class
oh i guess in djs they are
One such use case could be to handle the application commands (chat input + context menus) together in one handler
yes my command handler handles any kind of command, so having a typeguard that checks if it is any command type is useful
it's that way on the discord api, it's not really a djs thing
they're registered the same way you register any application command
just with a USER / MESSAGE type instead of CHAT_INPUT and other stuff like lack of options
Oh yeah, don't know how i forgot about that
So i use numbers for types in slash commands, are they subject to change?
(e.g. i use type: 1 for chat input, and for options i use type: 3 for STRING)
Is it better to use exported values or are they the same?
Numbers are fine
alright, thanks
For readability of your code itâs better to use the enums, otherwise no since enums hold numbers
i prefer numbers, probably since I've used them a lot now
ah alright then
Is there a Whatâs new page of sorts for the dev branch?
Or is it just the refactoring for the name changes and enums?
theres the commit history if you want a full list but theres a WIP migration guide page ^
Oo thanks, didn't think of checking commit history

Okm
Is it intentional that <User>.flags.toArray() always returns None, even when user has flags?
well, did you fetch the flags
Yes
Sounds like unintentional behavior, if you could, can you submit an issue ticket?
Sure
Will modals be implemented in v13 or v14?
most likely v14
oh alright
Why djs v14?
Why not?
lol
lmao

damn
hey discord..js v14 not support @dry tulipjs/builder
what
thats a separate package siris is more intelligent than me 
Builders are re-exported from djs now
_- no becuase
+ const { ApplicationCommandType, ApplicationCommandOptionType } = require('discord.js');
const command = {
name: 'ping',
- type: 'CHAT_INPUT',
+ type: ApplicationCommandType.ChatInput,
options: [
name: 'option',
description: 'A sample option',
- type: 'STRING',
+ type: ApplicationCommandOptionType.String
],
};```
we need to change if (!interaction.isCommand()) return;?
<Interaction>.isCommand() checks if the interaction is a CommandInteraction
so, thats up to you
what interaction.isChatInputCommand()
CHAT_INPUT -> CommandInteraction -> isCommand()
so we need change it?
I have no idea what you want xD
<Interaction>.isCommand() checks if the interaction is a CommandInteraction
so, thats up to you
Imma go with the raw types, djs does so many changes, so you can't stay on one.
You should avoid magic numbers, people are less likely to know what â1â means compared to ApplicationCommandType.ChatInput
Also letâs assume discord changes the type of chat input to â2â, if youâre using an enum you wouldnât be affected by this change
just curious, has that ever happen (ik it's subject to change, but has it changed in the past)
doesn't that checks if the interaction is an application command one?
yea i was thinking the same thing coz
How to install discordjs dev version using yarn
yarn add discord.js@dev Read the pins
or the channel topic, whichever feels closer
only npm in pins
You don't need anything special for yarn
oh ok
just add the @dev tag
I should stop looking at stable docs when giving support in here
guild get response undefined
@median jetty client hasn't logged in yet, the cache hasn't filled up, that's expected
Always responds undefined
yes, thats intended behaviour.
Not sure what you expect.
The client isn't ready, thus has no data.
v14 preperation? đł
Why isn't Embed#setColor("BLURPLE") not working
It doesn't parse strings iirc
oh
For now you can import resolveColor() from Util and do <Embed>.setColour(<Util>.resolveColor("BLURPLE")) or something
It gives me this error
ZodError: [
{
"code": "invalid_type",
"expected": "number",
"received": "string",
"path": [],
"message": "Expected number, received string"
}
]
oh ok
Yea it's currently a known issue. I think something is gonna be done to remedy it, but not sure just yet
Thanks
I can made video on youtube on djs v14
You what
I can make a video on v14
Hello, does anyone know where the list of permissions?
What is a permit
anyone?
I mean nothing has changed
Do you mean this from discord-api-types?
https://github.com/discordjs/discord-api-types/blob/main/payloads/v9/permissions.ts#L14
yes, thank you
You're welcome!
i think the second thing is supposed to be "YARN" instead of "NPM"
you'd think correctly
"GUILD_MEMBERS",
"GUILD_BANS",
"GUILD_EMOJIS_AND_STICKERS",
"GUILD_INTEGRATIONS",
"GUILD_WEBHOOKS",
"GUILD_INVITES",
"GUILD_VOICE_STATES",
"GUILD_PRESENCES",
"GUILD_MESSAGES",
"GUILD_MESSAGE_REACTIONS",
"GUILD_MESSAGE_TYPING",
"DIRECT_MESSAGES",
"DIRECT_MESSAGE_REACTIONS",
"DIRECT_MESSAGE_TYPING"
what is the name of these intents in v14?
Same, but PascalCase instead of SCREAMING_SNAKE_CASE iirc
I ask your name and none of them have a name
The names are here https://github.com/discordjs/discord-api-types/blob/main/gateway/v9.ts#L174
the names are the same, just the style's have changed
You import from discord-api-types
.
GUILD_MEMBERS become GuildMembers
and so on
When will version 14 of djs
tthanks
there's really no telling.. yet
is it still possible to use them as string (like intents in v13) ?
@uncut kelp how to import?
literally the guide i've sent
You were told above
docs say yes, you can use an array of IntentsResolveable - which include strings
Version 14 may be buggy
yeah but it would be like so intents: ["Guilds", "GuildMembers"]
same for partials?
No itâs uses the enum so GatewayIntentBits.Guilds and so on
I using
hmm so docs aren't updated?
Which docs?
because i checked the main branch and the IntentsResolveable accept strings
These, because this includes the string variant
I guess they're not updated
nice thanks
Oh yeah gotta fix that
Correction this: #djs-in-dev-version message
@tame gazelle
Lol
Hmmmm
i checked strings, it worked, then i updated, now it doesn't work
I'm confused now
it's the latest dev right?
lemme check npm
14.0.0-dev.1643544396.388f535
then this works fine ^
even partials?
I didn't get error like BITFIELD_INVALID so yes ig
hmm alright
I highly doubt thats working
Are you receiving guild events?
gonna try
interactionCreate only needs Guilds intent right?
so I can test a / command?
I'll add guildCreate event
for make sure
just add GuildMessages (with Guilds of course) and a messageCreate listener
you can try using GuildMessages
what error?
Discord.MessageEmbed isn't a constructor
ah
Embed
Are you trying to make an embed on your end or are you just receiving that error regardless?
regardless
Ok thatâs a bug then
I didn't update all the code yet
Do you have more than one listener for guildCreate?
Ok
Weâll look into this
I'm assuming this is the same for JSON embeds as well?
Iirc that would work there
what's that?
hmm ill try and see s
Util.resolveColor
Documentation suggestion for @tame gazelle:
<:_:874569335308431382> (static) Util.resolveColor()
Resolves a ColorResolvable into a color number.
and VSC is saying that <GuildChannel>#isText() is still a method
it is
ah yeah
It's doing something slightly different now.
<:_:874573924988518500> GuildChannel#isText()
Indicates whether this channel is a [TextChannel](<https://discord.js.org/#/docs/discord.js/main/class/TextChannel>).
only for TextChannel now?
TextBased includes GuildNews , Text and so on
isTextBased() is the old isText() and is isText() is now only a guild text channel
also I'm assuming this is a discord bug right? (links not resolving) or is it docs
works for me
*android
can confirm, doesn't work on android 
so this will not get removed? ._.
what will not get removed
using strings for intents
and partials
alright
in the latest dev I can so it means that you will remove this?
probably, since it isn't intended
most likely
is this right js const client = new Client({intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.GuildVoiceStates, GatewayIntentBits.GuildMessageReactions]});
looks fine, try it
idk how much changes happen
so this changejs const { MessageEmbed } = require("discord.js"); now js const { Embed } = require("discord.js");
yup
what change happen in button?
check the guide in the pin
const but = new MessageButton().setCustomId("ne").setLabel("1").setStyle("SECONDARY");``` is this change?
nope
so it same ?
no, please check the guide
it not open in my country
you need enums instead of strings
Did you mean discordjs.guide?
The site you just tried to visit looks fake. Attackers sometimes mimic sites by making small, hard-to-see changes to the URL.```
what you mean can you explain me pls
sorry I can't spoonfeed this, if you don't need v14 right now please just stick to v13
Click "Ignore", whatever that warning is about.
no asking for example
not say for spoonfeed
you not change my code
just give ma small example
that not call as spoonfeed
what is this js const { EnumResolvers } = require('discord.js'); const enumValue = EnumResolvers.resolveButtonStyle('PRIMARY');
its explained there...
just a question, why do you use the dev version and not v13
so js const but2 = new MessageButton(); now js const but2 = new ButtonComponent();
thats... what the guide says, yes
we need to change this to js const { MessageActionRow, MessageButton, MessageEmbed } = require('discord.js');
Obviously, yes
so i need to do js const { ActionRow, Button, Embed } = require('discord.js');
You should prioritize learning JS instead of using an in-dev version of djs.
what expect day to release discord.js v14 in main version?
its a very early in-dev version
client.on change now?
Please, stop.
i have dout so i am asking
doesn't work as well. Throws an error saying embeds[0].color[NUMBER_TYPE_COERCE]: Value "GREEN" is not int.
The guide tells you all major changes.
so int it is
client.on didn't change
no just last thing is client.on change now?

no strings allowed for button style too?
or use the magic numbers but i think it isn't recommended
can i ask you something
ask here ._.
also @tame gazelle strings for intents actually does work, it's a side-effect of us using the bitfield class
I'm assuming it will be patched soon?
is client.on change
oop sorry for ping
don't think so
we'd have to change how BitField works
^
all changes are documented in the update guide + vape told you no
idk what happen on that
maybe in the guide, add the changes about .setColor() or color as well? I mean it's the same as button styles, so maybe a tip or something?
i don't think a decision has been made about wheter we'll allow color strings or not
it just so happens the /builders version don't support color
oh, it currently throws an error if I use a string
using JSON
.setColor()?
what error does it throw?
yeah I think we're missing a step in serializing the json
hmm alright
this is what the old code is doing, so I think this needs to be added into the new code
ah
is this right way js const embed1 = new Embed()
Looks about right
looks like I've finished that are in the guide
thanks for help
something.hexColor still returns a string
do I have to do Util.resolveColor(someting.hexColor) ?
Yeah, or you use .color
.color would be better, thanks
is there a reason that Embed is not in docs?
not added yet ig
it's in the builders docs
oh
does 0xDD000 still works for .setColor() ?
Embed is part of builders now??
you can import it from discord.js
should work
it should
what about the other things from builders, can you import those?
dunno
i use json so idk
you can import message components, and embeds from builders directly from discord.js, they're reexported
msg.reply({
embeds: [someEmbed],
components: [{
type: 1, components: [
{ style: 1, label: "TestLabel", customId: "testing", type: 2 }
]}
]
})
this gives me an error components[0].components[0].custom_id[BUTTON_COMPONENT_CUSTOM_ID_REQUIRED]: A custom id is required
try using custom_id instead of customId and see if that works
no that's a bug, if you don't mind can you create an issue ticket so it doesn't get lost
sure no problem. Should i test this with other stuff as well (message embeds, slash commands and so on)?
if you can that would be greatly appreciated
alright
the class ContextMenuInteraction has been renamed?
ContextMenuCommandInteraction
thanks
@velvet jasper hmm if i look at the builder docs, all of them use snake case. Could it be because of that?
possibly
alright
I made an issue just in case
#7376 in discordjs/discord.js by 3061LRTAGSPKJMORMRT opened <t:1643649229:R>
[discord.js@dev] Using JSON structures do not accept camelCase.
list of all intent
you know the docs exist, right?
okay nvm, docs suck
No the intents is changed
ah we had that talk already in internals, nvm then
and partials?
look at Partials in the main docs
<:_:874569310025179188> Partial
A Partial object is a representation of any existing object. This object contains between 0 and all of the original objects parameters. This is true regardless of whether the parameters are optional in the base object.
thats stable
hawyeah
yea they aren't linked.
the list of partials i remember are
- User
- Channel
- Message
- GuildMember
- Reaction
i took this from the guide https://discordjs.guide/popular-topics/partials.html#enabling-partials
The new permission is this
yes
siris do you know where partials went
yes, PermissionFlagsBits.CreateInstantInvite
it's required PermissionFlagsBits
yes
strings are allowed for this?
Perms: [
"CREATE_INSTANT_INVITE",
"KICK_MEMBERS",
"BAN_MEMBERS",
"ADMINISTRATOR",
"MANAGE_CHANNELS",
"MANAGE_GUILD",
"ADD_REACTIONS",
"VIEW_AUDIT_LOG",
"PRIORITY_SPEAKER",
"STREAM",
"VIEW_CHANNEL",
"SEND_MESSAGES",
"SEND_TTS_MESSAGES",
"MANAGE_MESSAGES",
"EMBED_LINKS",
"ATTACH_FILES",
"READ_MESSAGE_HISTORY",
"MENTION_EVERYONE",
"USE_EXTERNAL_EMOJIS",
"VIEW_GUILD_INSIGHTS",
"CONNECT",
"SPEAK",
"MUTE_MEMBERS",
"DEAFEN_MEMBERS",
"MOVE_MEMBERS",
"USE_VAD",
"CHANGE_NICKNAME",
"MANAGE_NICKNAMES",
"MANAGE_ROLES",
"MANAGE_WEBHOOKS",
"MANAGE_EMOJIS_AND_STICKERS",
"USE_APPLICATION_COMMANDS",
"REQUEST_TO_SPEAK",
"MANAGE_THREADS",
"USE_PUBLIC_THREADS",
"USE_PRIVATE_THREADS",
"USE_EXTERNAL_STICKERS"
]
}```
I use this
for permission validation
is required js PermissionFlagsBits
yes
if it's a bitfield strings are allowed
since we can put bitfield for intents, does it mean that we can also put intents as strings?
yes
this is fine?
at this moment you can use strings, yes.
you could have tested it
took me 3 minutes to test that
What happend with e.g. Discord.Permissions.FLAGS.KICK_MEMBERS. Will it be removed?
already tested and it works
ah shit... here we go again...
already is
but Crawl said that it will be removed so ._.
time to rewrite my bot...
do you have any benefit in using v14, lurker?
me?
i just wanna be up-to-date
no, but when it comes out i'll need to rewrite
that will still take some time
I can't understand, whats the reason.
I literally had to change 1000 of lines for v13 to UPPER_CASE permissions.
Now it is being removed, seriously?
With this kind of breaking changes, it is pointless to keep your bot up-to-date with the upstream
then dont do it, we use discord-api-types now
and we already used upper case permissions in v12
Feel free to fork
write the bot in typescript, makes upgrading much easier
but string at first, then enums, now other enums lol
Same mistake has been done with Application Command types. Its obviously the same thing, string to enum and it was predictable.
you are able to use strings in v13 too
in v14 you will be able too
I am talking about permissions.has() , did not accepted a string at v13.
it does
yes it does

- The v12 - v13 migration guide suggested it.
yes, thats the recommended way of using it, doesn't mean its the only way
are builders getting better errors?
So now, I have to do PermissionFlagBits.Administrator?
Thats the recommended way, yes
Not sure if they already implemented it, but yes, they will
looks like it hasn't been implemented yet
And Discord does not has it on Uppercase?
I cant tell you why they switched to how it is now
https://discord.com/developers/docs/topics/permissions#permissions-bitwise-permission-flags
They have it as Uppercase.
Plot twist:
v15 changing it back to Uppercase.
I may sound rude, but I do not mean it on this way.
SNAKE_UPPERCASE :P
This is because the style for enums for ts/js should be PascalCase
we're following the microsoft style guide for this
Does anyone know if there is already a discord.js v14 guide?
Yes, it is linked in the pinned messages
Thanks
Q: What happened with Intents?
A: You can import theGatewayIntentBitsenum from discord-api-types https://github.com/discordjs/discord-api-types/blob/8e13cd80c66d11d93157a053e329ad98ece4a457/gateway/v9.ts#L174
Q: What happened with Partials?
A: You can import thePartialsenum from discord.js https://github.com/discordjs/discord.js/blob/0803665183f62e5aeb3b708c1bf9cad598cb2087/packages/discord.js/src/util/Partials.js#L13
Hey, I understand your point, but on the other hand. Discord.js major version comes out every year or so, and you make so many major changes that I think are sometimes unnecessary. Wouldn't you like to take a slightly different tactic? I'm sure you wouldn't want to keep rewriting it either. For example, there was RichEmbed, then MessageEmbed, and now there will be Embed. Ok, that's enough just replacnut but there are also changes that require manual rewriting.
events?
events didnt change
Thereâs more reasons than just a consistent style, Iâm going to make a discussion on gh explaining the reasoning for all of these changes beyond aesthetics
Okay, then send link please
Someone knows how to put the buttons I get the error TypeError: MessageButton is not a constructor
Thanks
v14 already??
and the fact that the guide is a deploy preview 
Q: Why are you changing "X" for "Y"?
A: https://github.com/discordjs/discord.js/discussions/7380
Spoiler: because we can
How can I search in the guide that the search engine does not load anything
Weird, agreed, doesn't work.
The deploy preview has probably been built before some breaking internal changes, so the search keys are still outdated
Then someone can pass me the section of embed and buttons please xd
Thanks
ow my a lot of changes yay
I left to send an embed but without color xd
what is this?
Read the pinned messages 
guide seems to have conflicting info - it mentions both EnumResolvers#resolveButtonStyle and EnumResolvers#buttonStyle
You can use both. Some people want to use strings so they use EnumResolvers#resolveButtonStyle("PRIMARY")
the other one doesn't use an enum resolver, it just exports ButtonStyle. That is there so you can use ButtonStyle#Primary
so dumb btw
đ§
look at the pins if you want to see why it happened. Obviously no one wants to rewrite thousands of code, but they have to change it for consistency so that it's easier to spot bugs and actually not make the code hard to maintain
will read
how to fix?
I couldnt find it
I'm assuming channel.type will also return a number right?
so we would have to do if (<Channel>.type === 2) right?
or use the enum resolver
Use enum resolver probably
channel.type should return what the api returns to you, so or it returns a string or djs itself implemented the enum resolver inside the type function
W8 lemme check, bcz i think you can just do "DM"
I think it would Dm since they are changing from SCREAMING_SNAKE_CASE to PascalCase
So GUILD_TEXT becomes GuildText
Idk, i just woke up saw the "news" abt djs v14 and im going to start converting stuff now
But im pretty sure channel.type will still return a string
@velvet jasper Hey, sorry for ping but https://discord.js.org/#/docs/discord.js/main/typedef/ChannelTypeEnumResolvable still uses SCREAMING_SNAKE_CASE, is it supposed to be like that or is it suppose to be PascalCase
docs didn't state ChannelType yet, so idk
my code;
const { MessageEmbed } = require('discord.js');
const embed = new MessageEmbed()
.setTitle("Something went wrong...")
.setDescription(`Sorry, you have **blacklisted** the bot by its \`Founder\` or \`Developer\`. You cannot use the bot's commands. `)
.setTimestamp()
return interaction.reply({ embeds: [embed], ephemeral: true})
it's Embed now
uh, thx
use the enum resolvers
yea using that rn
numbers so?
so either magic numbers or enum resolvers
iirc you can use numbers, but if discord changes it, you will have to implement the changes yourself. If you use EnumResolvers, then you won't have to change anything
@icy dew just import ChannelType from djs and do like so
Oh yes that
this should fix your problem without enum resolvers
EnumResolvers would be better but does discord.js calls the resolver internally?
but shouldn't it be ChannelType.Dm? or ChannelType.DM? DM is an acronym right?
caps
i mean, if you use vscode intellisense should do it for you
MessageButton and MessageActionRow Did it change?
ActionRow and ButtonComponent
- const button = new MessageButton();
+ const button = new ButtonComponent();
- const selectMenu = new MessageSelectMenu();
+ const selectMenu = new SelectMenuComponent();
- const actionRow = new MessageActionRow();
+ const actionRow = new ActionRow();
thx
ah alright, and no I don't use vsc
I have it, but it's gonna take years to load so forgive me if you hear me saying this, but I am using good ol' Notepad
idts
i mean only this thing changed:
- new ActivityFlags()
+ new ActivityFlagsBitField()
yeah i mean the activity type
yea it isn't listed then
they also changed that to enum but i didnt see it properly mentioned
if isDM returns a boolean then there is no need to call it
but the code for it would literally be the same
the only reference i could possibly find about the changes in the activities is here (screenshot) but i think this should be listed anyways
yea
Most stuff isn't documented yet, and is subject to change, so we'll just have to wait ig
or notify one of the contributors or smth
i mean, im fine bcz of vscode i just think that it should be documented for anyone who starts
how to fix?
its what it says on the error, you are sending a string instead of a number
also, that doesnt look like a djs error
but maybe try to look at this
There was no such thing before the discordjs error v14.
.setColor(ctx.config.color.default)
your embed color has to be an integer.
yea, this is a string
how to fix?

use Util#resolveColor()
https://discord.js.org/#/docs/discord.js/main/class/Util?scrollTo=s-resolveColor
Do I need to send numbers?
yes
.setColor(resolveColor(ctx.config.color.default))
true?
you need to import Util
also, there is other thing missing on the documentation for v14, just leaving the note here that dynamic got removed
how?
so ```js
const { Embed, Util } = require("discord.js")
const embed = new Embed().setColor(Util.resolveColor("GREEN"))
thx
why not use hex??
just .setColor("#00FF00")
it only accepts an int
or if you prefer setColor(0x00FF00)
according to docs
yea i use this
its the same
int !== string
0x00FF00 === "#00FF00"
nope
both represent hex values
but the type is different
did they also change it?
yes
bcz using #00FF00 used to work
welp thats pain
it's not listen in change logs
that explains it but also doesnt make sense
at first i was confused, until someone said to use util.resolveColor in this channel
if you want RANDOM, then use util.resolveColor
na
i think im fine,
biggest part of the embeds i use just grab the color from the user
ah, then you should be fine
yeah
- i have my own
fromHexfunction if needed
but i will take a look at djs one just for curiosity
uhh
use the enum values
how?
where you are creating the buttons
use EnumResolvers for button styles
create them with the new enums instead of "PRIMARY" and stuff like that
^
context.js
thats one of the main changes
either import ButtonStyles and do ButtonStyles.Primary
database of buttons
or import EnumResolvers and use EnumResolvers.resolveButtonStyle("Primary")
hmm, the guide shows caps
it looks better
'cuz it's in caps
ye, mb i thought it changed
Because it's ButtonStyle.Primary
so i thought it should be the same with resolveButtonStyle()
I think something isn't intended
then why is it ButtonStyle.Primary
why isn't Primary in caps?
should I ask in #archive-library-discussion
oh one uses discord-api-types and one is from djs itself
Does this little make a big difference?
they do the same thing.
<Message>#type is a number now?
so it can be big or small
ButtonStyle.Primary or EnumResolvers.resolveButtonStyle("PRIMARY")
for caps, use EnumResolvers, for the other, use ButtonStyle
mb
how can I display <ChannelType>#type as string?
bcz thats a function and the other is a string, even tho it doesnt make sense thats developer choice
wdym?
Property actually
<ChannelType>#type returns a number right?
const SECONDARY = EnumResolvers.resolveButtonStyles("SECONDARY")
can it be used like this (by definition)
idk, i just use <Channel>#isX()
should work
it's for channelinfo command ._.
actually i havent logged it but it should since they moved it to enum
they import ChannelTypes from discord-api-types, so i assume they return numbers
even tho idk why they did that bcz if you compile enum from ts you can use both number and string
so it doesnt make sense to me the route they went
I want strings (also we can import it from discord.js)
not all ppl use ts
the compiled version tho
oh
idk
if we do resolveChannelType(2), will it return a string?
how are you putting your emojis?
like...
so both return numbers
yes
thats why they could keep string, and if its string you index it to the enum
your emoji has to be a raw object
i.e client.emojis.cache.get(config.emoji.button.delete)
config
and so on
will i use this?
yes
okay
can you show the code?
the error said that it's line 79
Shouldn't it be { name: "name", value: "value", inline: true }?
isn't that for .addFields() ?
they changed it
._.
AA
addFields its Array<APIEmbedField> while addField its only one
show code
using customId:
it's custom_id: now
array of objects?
yes
addField: { name: string, value: string, inline: boolean | undefined }
addFields: [{ name: string, value: string, inline: boolean | undefined }]
so instead of spamming addField you can just create a bunch in 1 function
yeah but I add fields in a if statement ._.
its valid to just do addField a bunch of times
I do that
that's not how it works
it should be type: 1, components: [....]
what you have is the completely wrong format
again, show your code
ofc if you use if statments to define them there isnt much to do
it's button.custom_id now iirc
fr?
v15: Embed => MessageRichEmbed .D
welp i havent messed with buttons for a while
welp time to refactor my code
i think all camelCase properties for classes in builders will be changed to snake_case
at least the only thing i had to change in my client was the DM type and interaction isCommand
yea
commands will be the problem
it isnt
you just press enter all along the way
but some of my bots i do not maintain anymore so i gotta ask the current coder to learn how to do that bcz he uses webstorm
the only thing im rly wondering is if people rly use the collection functions
still not working
show how you are doing it
can you show your code?
system.on('collect', async (button) => {
if(button.custom_id == 'delete') {
interaction.deleteReply();
await button.deferUpdate();
} else if(button.custom_id == 'previous') {...}
where error?
hmm, that returns a ButtonInteraction
maybe wrap it in a try...catch to see the error?
no errors
it doesn't take an array
can you log button.customId
Interaction failed error occurs when pressing the button
it takes an object too
then reply to the button bcz i dont see where interaction is defined
wdym?
.addFields() doesn't take an array
"await interaction.deleteReply()" normaly ?
what?
are you using .addField or .addFields?
fields is not field
I know
Oh okay, thx
to where
in your event just now
and I get this error ^
bruh
undocumented changes
not documented, you can see on my screenshot they added ...
yea, i guessed it
now you can just do it without the []
not working
which is pain
can you console.log(button)?
doesnt djs have a format timestamp option?
yes
I've never used it
discord.js v14 !?
its an in dev version
unsure what you expect as an answer to that query
what features will have ?
and what happened to v13 guide
all you need to know so far is pinned
I remember there is a another site explaining think better
nothing happened to the v13 guide, it's still the deployed version of https://discordjs.guide/
oh that one i was searching that tysm
also linked here
ok
I did but there is no movement in console
then it doesn't even reach that point of your code
what could be the problem?
hard to say, try to find out where your code stops execution/differs execution wise from what you expect
Souji, should i open a issue about the types?
i have no idea what's going on there, but i did update a bot yesterday with the recent at-dev release and did not encounter any errors
I can't find any buttons are not working
and how are we supposed to find it then?
it isnt giving any errors with what im using but someone might have issues + djs types shouldnt have any errors
I think it doesn't send custom_id?
Definition:
button.customId
Button:
custom_id
Interaction failded
Popular Topics: Display Components
Use without crashes