#djs-in-dev-version
1 messages · Page 36 of 1
download a newer installer
Please update node.js to version 16.6.0 or newer!
• Download
• Linux (nodesource)
and next time please use the appropate support channel, #archive-djs-help-v13 for v13, #djs-help-v14 for v14
npm ls discord.js
ok
Does discordjs@dev support djs v15 ?
I don't think v15 is a thing yet
Someone told me it supports v15
v15 isnt a thing
ok
It is for upcoming v14.1 correct?
Alright thanks!!
Until such time as something that would be classified as "major" is introduced
The whole point is that it's unstable, latest, no version yet
Can someone help me with this
add intents to client constructor
Can you tell me how to do that in dms
do what?
• Websocket intents limit events and decrease memory usage: learn more
• See what intents you need here
I am trying to learn djs can you suggest me with docs that I can read to start
can anyone give clear information on this
On what exactly
in the line 3 instead of "data" can we keep anything like embed and other?
is it compulsory to have slash cmd only like I don't want to learn abt slash since I want to make my bot usual cmd I don't see guide for that
We strongly recommend slash commands for the huge number of benefits they have over the old way
Which Discord is moving developers away from
So no, we do not provide a guide on that
is there no option to learn on normal Commands atm
@hoary fox How to add intents to client constructor
Slash commands are normal commands
Tag suggestion for @lavish bay:
• Websocket intents limit events and decrease memory usage: learn more
• See what intents you need here
@knotty plover can you help me
Can you read the guide
I mean prefix Commands
Yeah, those are not normal anymore and we dont provide guides for that
still prefix Commands works so what's the problem I remember it had before
Monbrey can you help me
I'm kinda a noob at coding so I don't know how and where to put intents
any usefull website that could help me make prefix Commands
Thats why I provided a guide on how to use intents
🙄
Is this the guide
Or, you could just use slash commands since thats how bots should be developed now
yes
How do I make it slash commands
is there any way how i could easily modify the djs code locally without the pain of having to build it and replace all internal package references with my own copies of it?
...but why
i want to make some changes to v14 (ew enums)
and yes i can modify the files installed from npm, still they may get overwritten if something is changed upstream
enums are terrible changes, yes
Objectively wrong
(i dont want to discuss this here but me and some other people dont like some/most of the v14 changes, still staying on v13 is no real option)
¯_(ツ)_/¯
Half the methods still support strings because JS/TS is kinda bad at enums anyway
So while the enum is the better development approach, the string still works anyway
that sounds like they might not be supported in a future release
Ideally. Enums allow API wrappers like ours to handle changes in the API in a non-breaking way
If Discord decided to rename all of the constants for something we have an enum for, we could mark the old ones as deprecated but repoint them to the new values under the hood
However overall yeah, the current PascalCase conventions, enums etc are pretty firmly the direction discord.js is taking moving forward and in line with how the TS rewrite of the main lib will be handled. /rest, /builders are already TS, /ws on the way
yes but thats not going to happen xd
maybe for some parts of it, but that isnt hard for me to change, compared to the changes i would have to do when switching to v14
It has happened
But... you'd rather change and maintain your own version of discord.js than change your code?
I mean its open source, you can
maintain? no, the code is way too complicated for me to do that - i have no clue from building the modules, without building only parts of it work
also i'm lazy, i dont want to include the enum things in every file, i just want to use the strings like before...
lmao
making my own lib only bc i hate enums seems dumb too xd
either i find a solution with djs which is probably the best, or i might use eris... idk, djs is/was better imo
Yeah sorry lol. If you really wanted to maintain your own conventions, fine, we cant/wont stop you
But you'd only hurt yourself later missing out on every other new feature if you dont maintain it
You could write utility functions, kinda like the resolveColor one
I personally used to use all of my own constants when I started out using slash commands, updating to d.js v14 was quite easy tbh
Anyone know how to take your bot off do not disturb
ClientUser#setPresence()
Sets the full presence of the client user.
no, thats the reason i want to update to v14... if i wouldnt care about new features i would just stay at v13 and maybe change the api version
thats what i'll probably do, still on most parts i would have to edit the djs main/builders code which is my main problem xd
Anyone
@lavish bay
@lavish bay
What does this mean
Yeah but 14.1, 14.2, 14.3 etc
my plan was to just diff the djs files with my versions of it (i hope its only like 5 files or sth, i dont plan on changing every enum) and just apply my changes again
@daring latch can you help me
why do you ask me xd
you probably have an error in your code, check ready.js in line 20 and see whats wrong
There is nothing in line 20
you need to have basic knowledge of JavaScript/nodejs to start working with discord.js...
that's probably the problem- make sure you have the correct amount of } and ) to close functions and whatnot
I put this and it said that
Ok I'm leaving this server cause it's no help
👋
TypeError: MessageActionRow is not a constructor im getting this error
#djs-help-v14 channel topic has an update guide.
Found a bug, idek if its even discordjs tho
alr I'm convinced its discordjs
So, I have my standard /commands command, inside a cmds.js file
Can you show us the error and the code?
no error
interesting
heres my embed, nothing wrong with it, i just added custom emojis
my output:
Does the @everyone role in your server have USE_EXTERNAL_EMOJIS perm
one sec, but that wouldn't be a problem, bc I even added a console.log('hi')
no hi in here
so basically the command doesn't runs?
it does run
just the old version
even after I restart the bot
like ctrl + c
so after updating to v14 the command doesn't runs?
nope, i been on v14, just decided to change the cmd
oh i see
made sure it wasn't vs code
Do you think this is a bug?
Hmmm did you save the file?
i mean you didn't tell what's wrong
discord.js doesn't caches your commands or any files
whats wrong is that discordjs isn't running the new file, its running the old file
djs doesn't caches or stores any files
idk, pretty convinced its discordjs
should I reinstall discordjs
but djs doesn't stores files so it can't be it
i would rather say restart your pc or something 
fr ok
also do you use any sort of bundlers like webpack or rollup?
i never heard of that so no
probably not then
ok reinstalling discord.js didnt work
restart pc time, wooo 🎉
yeah well discord.js doesn't stores your files so
alr it worked, i restarted pc, said that discord.js wasnt installed, so i installed it, and it works ty

cache issue on windows part i guess
when will a stable version of djs 14 will be released?
also there are many properties and methods missing from djs 13 in 14
how long can i expect?
i was building bot in v13 but now i shifted to v14 as i dont want to close development in 13.
i am waiting for forum channels too
idk how you missed it, but v14 was already released.
Refer to the update guide in #djs-help-v14 channel topic.
Hey I am sorry I am not sure in which channel I should ask this
But would it be a problem if I run the same bot twice?
I mean with the same token...
Could lead to problems with interactions yes
How do I make my bot show me the commands it has with eval?
client.application.commands.cache
Thx
it's not all always cached btw
how can i solve this? i just get this error when more than 1 member uses the same command
use
interaction.deferReply()
why?
• DiscordAPIError: Interaction has already been acknowledged
• [INTERACTION_ALREADY_REPLIED]: The reply to this interaction has already been sent or deferred.
You have already replied to the interaction.
• Use <Interaction>.followUp() to send a new message
• If you deferred reply it's better to use <Interaction>.editReply()
• Responding to slash commands / buttons / select menus
same
and it just happens when more than 1 member is using this command
if only one use it, it works fine
....
Just wanted to say thanks for all the work that went into v14.
Appreciate it
@inland coral this channel is specifically for the dev release, please use a help channel appropriate to the version you are using npm ls discord.js and show your code and error there
if it's a longer problem #986520997006032896 might be a better place
if you are new to js, check out #resources
oh sorry ! ty 🙂
Question, Command Localization, is this including or 'Coming Soon(TM)' to DJS?
I assume the latter since it is in Beta?
also yes
Double nice.
Have to look into it when I've upgraded to v14
Humm?
I read that bit.
I assume that if I had it supported, not everyone would benefit...yet
i didnt know its available on ios
Ah I see.
Its in v13 too I think
Oh cool.
Well first jobs first, second jobs second 😀
You might as well set it up if you're going to. Not every will benefit, but as soon as they either turn on the override or it gets rolled out to everyone they well
Yea my thinking too, have it ready
TypeError: String.prototype.matchAll called with a non-global RegExp argument someone can help me?
// 'member' is a string, and I receive the error when I insert an 'a' for example
const userMention = member.matchAll(UsersPattern).next().value;
if (userMention) mentionedMembers.push(`<@${userMention[1]}>`);
I'm trying to get the user id from a string
And I'm using the UsersPattern from MessageMentions
string#matchAll should work
but your issue isnt related to djs
ah ok, ty
guild.roles.cache.get(roleMention[1]).members, why this isn't giving me all members with that role, is just returning 1 and the role has 2 members
you need to fetch all guild members before accessing role members
Some intents are missing, I put all intents and it worked, I'll just find which one is missing
lefting?
help
Documentation suggestion for @open copper:
ChatInputCommandInteraction#inCachedGuild()
Indicates whether or not this interaction is both cached and received from a guild.
Use this typegaurd
Can someone help me get the voice channel the author of the slash command is currently in please?
interaction.member.voice.channel(Id)
ty
wait i need the id of the vc?
or optionally .id?
.channel and .channelId are both properties, the latter in case the first is null cuz uncached channel.
how do I get the members from a channel, example, I have a ticket and I want to get the members that can see the ticket
filter members with <channel>.permissionsFor(<member>).has("ViewChannel")
also u should fetch members
Why are we helping in the Dev JS channel?
Help for the dev version
Gotcha 🙂👍
The selects menu inside a modal does not appear on the cell phone, how can I solve it and if it is possible to solve it
Is there any prediction that they will fix this?
Thought of a very cool system with them
Yes, they will eventually document and support this
Do you have any predictions?
no
Ok, thanks ❤️
hi

Interactions: Slash commands