#djs-in-dev-version
1 messages ¡ Page 1 of 1 (latest)
what would that diagram even show
API broken. #769862166131245066
ty everyone <3
test
when im having issues with my code(whilst using discord.js) where do i seek help? In this channel? Or should i open a new thread in "developing-djs"?
Hi
Hey
this isnt a channel for small talk
i suppose djs v14 wont use @discordjs/ws, since it will be major change
Yeah, most probably it won't
When they implement @discordjs/ws in discord.js?
v15 i suppose
i see something that called "set shard on the fly" on @discordjs/ws. does it resume the session if we set the shard on the fly?
That question isn't DJS-related
Hey, why is the bots switching to slash commands?
The message intent is becoming a privileged one (or has already?), and only bots whose function absolutely requires the message intent will be given it (and commands don't fit in this category as you can use slash commands instead)
but slash commands are not good though. Prefixes are better so you can just do ! and there you go the command can respond.
And why has it become a rule in September? Surly we have a choice to decide on if we want slash commands or not.
Well, you kind of don't, Discord makes the rules đ¤ˇââď¸
I asked I didn't say I made them.
I wanted to know why did they're made it a rule?
I think it was some sort of privacy concern to have bots collect every message sent in a server so they had to have stricter access to it, but you'll probably get a better answer from someone more experienced than me here
And you know who this person is I should asked?
They'll reply to you here eventually I think, don't mention people at random
So you don't know their username?
Oh no I won't talk to them in here I will message them in DMs if you got their username....
Please don't... Just wait
whys that?
What question even
Starts here
Discord has articles about that on their help pages
And a dev isnt going to give you another answer
Or an answer that satisfies you probably
They are going to force slash commands and theres no way around that
well discord doesn't care about their users then do they're... stuff them.
So the builders package is bundled with djs 14 now.
Is there any plan to also bundle the rest package?
you can still use them, limited.
if your bot reaches 100 servers, you need to apply for the message content intent, without it you only get the content of messages if your bot was pinged
and I'm pretty sure that they dont give out the intent just so you can continue using message commands
ohhhhh that's good then I didn't know that. oh I see what you mean.....
I dont see how this is djs related, nor has anything to do with me
its obviously a promise
I dont see how this is djs related, nor has anything to do with me
its obviously a promise
#useful-servers #resources
Pls tell how to change my bot to idle status
Documentation suggestion for @scarlet tangle:
ClientUser#setStatus()
Sets the status of the client user.
migrating from bot commands, can anyone point me in the right direction to grab the message posted before the slash command is executed?
A message isn't posted when using a slash command. It fires an interaction create event to which to application responds to
yes, but i was hoping to grab the message before the slash command in the channel the command is fired
Well you canât really
theres no way to access messages within a given channel? what about message list from the author that triggered the slash command?
Oh
Thatâs what you mean lol
Well you do get a channel id
So you can just fetch the messages and check what the last message of the author was
But it could be like the first, or idk, 500 messages ago
Youâd have to do a lot of fetching in that case
this is an edgecase for the mod use, i want to post a breakdown in the channel then trigger the slash command right after to send it somewhere else with the API
so it would always be the last message from whoever is triggering the command
But what if the last message was 10h ago
Before that person used that command
And others write stuff in between
Itâd be hard to find the last message
only one use writes in this channel so if im pulling by channel it shouldnt really matter
I donât think I understand
So i have a channel that only I have access to and I make a post about the weather. Immediately after I make this post i want to then run the slash command and have the API get that previous post text so I can do something with it
dont mind the error but this is basically what im looking to do
So you want to grab âpost what I want to sendâ
Sure, so when you use the command, you can defer it
And with the command usually comes a channel id or even a whole channel class
This way you can fetch the last X messages and filter them by your user id
Or just fetch the last message if you donât care
The result is the message
Just make sure you defer the slash command so it doesnât time out
After deferring you have enough time to do whatever till you answer
@polar briar
Sorry for late answer
no worries at all so thats what I thought, im just not sure on the syntax to actually grab it from within the slash command builder
async execute(interaction) { console.log(interaction.member.guild.channels); const channel = await interaction.member.guild.channels.get(interaction.channelId); channel.messages.fetch({ limit: 10 }).then(messages => { console.log(Received ${messages.size} messages); //Iterate through the messages here with the variable "messages". messages.forEach(message => console.log(message.content)) })
Currently i have something like this and just get undefined in my console log
Interaction.channel should work
Which of those gives you undefined?
And do you have message content perms?
Like the intent
Needs to be enabled on the dev portal and provided as an intent on your client
intent gets me every time. Working now thank you very much I appreciate the help
No problem
Also please make sure to defer the interaction
Otherwise if you take longer than 3s it will time out
will do!
it is possible to do that only if he have premmision he can click on the button?
if it is possible can I get example
u can use filter but not block clicking
if it is possible to make in discord components ,button only those who have premmision canclick on the button.
if it is possible can I get example code?
you can send me examples code
Simple check of e.g. user's id, role or whatever u want during interactionCreate event
Can someone help me?
destructor it from discord.js
hu
pressing CTRL + SPACE and clicking TAB will do that
wrong chat
Can you try {} catch () {} discord api errors without .catch()?
It's regarding my eval command
yes, you will need to resolve all the promises
And how-
Resources to understand Promise:
⢠MDN: learn more
⢠Guide: learn more
⢠JavaScript info: learn more
Hi, how can i make a crud system in discord js
persistence has really nothing to do with this library, you can find some approaches in #resources and otherwise #useful-servers has general programming servers
if you actually mean something that has to do with this library, please elaborate on what you are trying to do
Update the embed message using buttons
updating the values that are in each user's own embed message with buttons
Example:
Dex: 3
Damage: 3
Buton: Up/Damage (1/point)
Dex: 3
Damage: 4
you respond to the button press with an #update call and supply the state of embed(s) you want to be there after the edit
v13: #archive-djs-help-v13
v14: #djs-help-v14
or you can get help in #986520997006032896 with a tagged version
I accidentally did something better. Gave it streaming status instead of idle status.
Help pls
Theres a v14 update guide in the topic of #djs-help-v14

shitpost elsewhere, k thx
any idea?
filter found nothing
worked that time
Oh okay
Because you used filter
An empty array is "true"
If you use find, you'll get null
Which is false
This really has absolutely nothing to do with the discord.js development version though?
i think xD
i mean to embed or smth like this
how you defined client.commands
If you have not pre-set client.commands to a map/set, you canât use client.commands.set.
However Iâd advice you not to do this, as itâs technically an unknown property. (TypeScript would by default disallow this, however pure JavaScript does not)
Instead create a ClientCommands variable, and if needed send to commands.
This is not a discord.js dev version question
Formatters class is gonna be deprecated. Everything in there is already a top-level export, so just use that.
Old way:
import { Formatters } from "discord.js";
Formatters.bold("bold");
Preferred way (which works even now):
import { bold } from "discord.js";
bold("bold");
nooo why
Because its pointless
Why? Well, I guess since everything is exported at the top level already, it's just... code duplication
I just dont want them at the top of the docs menu
You can collapse them though right?
"should move the top level exports down" sounds odd 
but yes, should, because they are all utilities and not as relevant to the overall library functionality as the structures are
pins in #archive-djs-help-v13 , nothing to do with @ dev
Arenât the classes top-level exports too though
and Class comes before Function in dictionary, so reasonable to move them downđ
hey is it me, or embeds now have a fixed static width?
they used to vary depending on the content
yeah nothing here
Itâs discord client. Some version at least, no idea if canary or stable or which one though
Hi guys, do you think it's possible to use a excel sheets with a discord bot ?
yes
You can use any node/npm package with discord js
Depends on what you want to do with it
hello, do you know when v12 version will end?
it will end when discord decides to discontinue v6 which v12 uses
around early 2023
doesnât v11 and v12 use v6?
well yeah, didnt really remember it correctly
meh, seems like discordjs-button-pagination isn't working under v14 .-.
then tell them to upgrade
Did it by myself and made a PR
Hi guys!
.setImage("https://c.tenor.com/M9fgYFTTCqQAAAAC/anime-cute.gif");
Shows, the image as expected.
return new EmbedBuilder()
.setColor(0x0099FF)
.setAuthor({
name: `${user.username} pinches ${mention?.username}!! Aaa, that hurts`,
iconURL: user.avatarURL() || ""
})
.setImage("https://c.tenor.com/M9fgYFTTCqQAAAAC/anime-cute.gif");
But I have a list of random gifs in an array!
you kinda forgot the question here
Oh yes! I was formatting 
I have an array like so...
export const PINCH = [
'https://tenor.com/view/anime-pinch-face-gif-14114215.gif',
'https://tenor.com/view/hestia-cheek-pinch-cute-danmachi-is-it-wrong-to-try-to-pick-up-girls-in-a-dungeon-gif-19893304.gif',
'https://tenor.com/view/horimiya-anime-shota-hori-siblings-gif-19989089.gif',
'https://tenor.com/view/anime-cute-pinch-tanakakun-is-always-listless-gif-14725930.gif',
'https://tenor.com/view/anime-hibike-euphonium-asuka-tanaka-oumae-kumiko-pinch-gif-16488937.gif',
'https://tenor.com/view/squishy-cheeky-anime-gif-15322355.gif',
'https://tenor.com/view/rikka-takanashi-so-cute-chuunibyou-pinch-face-anime-gif-13451272.gif',
'https://tenor.com/view/slap-butts-anime-hit-gif-14179587.gif',
'https://tenor.com/view/anime-pinch-cute-gif-14117814.gif',
'https://tenor.com/view/anime-pinch-nose-uzaki-uzaki-chan-wa-asobitai-cry-gif-17305037.gif',
'https://tenor.com/view/anime-asia-highschool-dxd-pinch-gif-12410790.gif',
'https://tenor.com/view/itsuki-gotobun-anime-pinch-squeeze-gif-16237877.gif',
];
And I am trying to show random image everytime from this array but it doesnt show..
const getEmbedWithUser = (user: User, mention: User) => {
const image = PINCH[Math.floor(Math.random() * PINCH.length)]
return new EmbedBuilder()
.setColor(0x0099FF)
.setAuthor({
name: `${user.username} pinches ${mention?.username}!! Aaa, that hurts`,
iconURL: user.avatarURL() || ""
})
.setImage(image);
}
The image does not show and its a poop image
then log image and make sure its the right one
Yes, I have logged the image and it shows the image in logs and if i click on the image it goes to the right url. eg:
https://tenor.com/view/itsuki-gotobun-anime-pinch-squeeze-gif-16237877.gif
looks fine to me
registerEvents() {
const eventFolders = readdirSync(path.join(__dirname, '..', 'events'));
for (let folders of eventFolders) {
const eventFiles = readdirSync(path.join(__dirname, '..', 'events', folders)).filter((file) => file.endsWith('.js'));
for (let files of eventFiles) {
const event: Event<keyof ClientEvents> = require(path.join(__dirname, '..', 'events', folders, files))?.default;
if (event.event && event.run) {
this.on(event.event, event.run);
}
}
}
};``` IDK why is my event handler doesnt work
nothing to do with the dev version of discord.js
DiscordAPIError[0]: 401: Unauthorized
at SequentialHandler.runRequest (/Users/abhi/Spherity bot/node_modules/@discordjs/rest/dist/index.js:748:15)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async SequentialHandler.queueRequest (/Users/abhi/Spherity bot/node_modules/@discordjs/rest/dist/index.js:560:14)
at async REST.request (/Users/abhi/Spherity bot/node_modules/@discordjs/rest/dist/index.js:1000:22) {
rawError: { message: '401: Unauthorized', code: 0 },
code: 0,
status: 401,
method: 'PUT',
url: ,
requestBody: {
files: undefined,
json: [
SlashCommandBuilder {
options: [],
name: 'ping',
name_localizations: undefined,
description: 'replies with pong',
description_localizations: undefined,
default_permission: undefined,
default_member_permissions: undefined,
dm_permission: undefined
}
]
}
}
why do i get this error, with correct guild and token??
the application you are trying to deploy commands for and the token you use do not match
that is what that error means
nothing, that is what that error means
Then itâs not the correct applicationID
hey, is it possible to give one user immunity to slowmode on a channel?
the bot creates a thread that anyone can type in and I want staff and the user who solicited the thread creation to have slow mode immunity
immunity to slowmode is handled via the manage messages permission
Or manage channel on the channel
thx
im trying to handle some sort of voting system with reactions...
i need to allow a user to react only once to a message by removing the second reactions
is there a way to check if a user has reacted already from inside the collector's collect event?
Documentation suggestion for @rich mason:
Collector#collected
The items collected by this collector
@white nebula im actually trying to get all the other reactions other than the collected
@rich mason why not use a select menu?
client wants reaction
also, reactions in this case indeed looks better
it is kind of a pool system, and ther eis yes or no options.. so... i made it so it removes your other reactions when you add a new one
for(const emoji of config.reactionEmojis) {
const mr = message.reactions.cache.get(emoji.name);
if(mr.emoji.name !== messageReacton.emoji.name) {
await mr.users.remove(user);
}
}
a bit slow.. but works
What is the component used to add an emoji (normal or animated) to a button in json code in a webhook send? [sorted out]
#7616 in discordjs/discord.js by suneettipirneni merged <t:1648151930:R>
refactor: allow builders to accept emoji strings
Hii, does anyone know how to avoid your mongodb being sharded at the same time as index.js?
Connect in the sharder file, not the clients?
Help
bot isnt logged in / ready
What is this mean
Importing Formatters as a class is deprecated, they'll just be top level direct exports in future
Making DB calls over IPC channels doesnât sound like a good alternative to me
when ever someone types anything in any server the bot is in, it sends this error
(link gone)
Nothing to do with djs, as we donât use axios, especially not to connect to sadyn.it
Also nice token, should reset that
thats not the token i already checked it, but how do i fix it
Refer to the first half of my first sentence
yeah alr
And it definitely is a token. Just not for discord
what? how tf
How would I know, itâs your code
ik but i have never seen that token
Do you know that domain though?
noo?
Then why is your code trying to login to it? Did you code it yourself? Or is there a framework involved?
there is a few command that r not mine but i removed the lastest command it still does that same thing
hi guys, why embeds seem unnecessarily long? It wasn't like this before
not like that's out fault in any way, but it's also not the first time ever that discord changed embeds
embed messages used to be longer the longer their content is now it's getting unnecessarily long
It looks like Discord simply standardized the length instead of having it vary, but there's nothing DJS can do to affect the width
but some bots look different messages work as before how do they do it
they don't
Show one that does
The SlashCommandBuilder does not have a .from method.
Correct
Any reason for that? Every i there builder has a static .from method
There isn't much use for it
It should be added for consistency
what's the use case? command templates?
but then you have the command already and the builder is useless
the use case for other builders is to use existing structures as templates
so you can, say, fetch an embed from a message and build on top of it instead of starting at 0 when editing it
Regardless of the use case, this method should be added for consistency. Im sure theres gonna be people that are gonna find a use case.
usually the people demanding that have one, hence me asking
regardless, we accept contributions, so if you want it feel free to implement it in a pr (quickest) or suggest it in an issue, so we can track it at https://github.com/discordjs/discord.js
đ
The use case for the other commands is to convert a received immutable embed into an EmbedBuilder, so you dont try to mutate cache
SlashCommands dont really have a 1:1 property equivalent, ApplicationCommands are a fairly different structure to a SlashCommandBuilder
Hi, I am trying to send an image embedded in v13, v14 dev and v14 versions, but it is not sending...
card.build()
.then(data => {
setTimeout(() => {
const attachment = new MessageAttachment(data, "rank.png");
const newEmbed = new MessageEmbed()
.setColor("#2f3136")
.setDescription("You can earn 20% additional exp by voting for me on my Topgg page.")
.setImage("attachment/rank.png")
interaction.editReply({ embeds: [newEmbed], files: [attachment] })
}, 2000)
});
When I send it as a regular file, it is sent without any problems ("The code belongs to the v13 version, but did not work when converted to v14")
I said above that I adapted it to the dev version and tried it and didn't get any results, but I'm still going to the v13 channel.
card.build()
.then(data => {
setTimeout(() => {
const attachment = new AttachmentBuilder(data, "rank.png");
const newEmbed = new EmbedBuilder()
.setColor("#2f3136")
.setDescription("You can earn 20% additional exp by voting for me on my Topgg page.")
.setImage("attachment//:rank.png")
interaction.editReply({ embeds: [newEmbed], files: [attachment] })
}, 2000)
});
These are the dev version codes
Come on, it's pretty silly to not send that dev code here
Anyway this protocol is wrong
yes, you're right, it was a bit like that, sorry
what should I do ?
Well it should be ://
You know, like https://
Second parameter of https://discord.js.org/#/docs/discord.js/main/class/AttachmentBuilder seems to be an object additionally (click the link), rather than a string of "rank.png"
I guess I can't see well, I thought I wrote that part correctly and I never felt the need to look at it.
Thanks for your help and sorry for not posting the dev code in the first place, it was irrational behavior.
It's okay don't worry about it
can anyone tell me how i can see my bots permissions in code in a server? I do coding in v14 but this doesn't seem to work for me?:
interaction.guild.me.permissions.has(PermissionsBitField.Flags.Administrator)
Thank you :)
I need to fetch a file (.lua for example) and turn it into a code block, the bot can take inputs from "` ``" but not from files appaciarate any help
fs not djs related
I'm having a fit today, i don't know if many people have the same issue, but damn node.js 16.16.0 just refuses to download onto Ubuntu 22.04
How are you trying to install it?
doing a curl install, here is the thing, on another pc, it works, dose the hardware matters?
heh, even 14.x spits out the same error
dpkg: error processing archive /var/cache/apt/archives/nodejs_14.20.0-deb-1nodesource1_amd64.deb (--unpack):
trying to overwrite '/usr/share/systemtap/tapset/node.stp', which is also in package libnode72:amd64 12.22.9~dfsg-1ubuntu3
Errors were encountered while processing:
/var/cache/apt/archives/nodejs_14.20.0-deb-1nodesource1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
bruh, when did they drop d.js v14?
18th July
please I want someone tell me the details about _fetchMany and _fetchSingle funtions inside GuildMemberManager.js
you shouldn't directly use them, is all you really need to know
ok but if i want to make a feature iside this file and i want to fetch something so i am asking about it is details
Use the fetch method and let djs worry about the detailsđ
then you need to elaborate about what you are planning
else an explanation is a lot of writing with not all that much information density
ok so i want add feature that if member passed the membership screening or not and i want check if guild enabled membership screening already or not
go to pending? inside discord api https://discord.com/developers/docs/resources/guild#guild-member-object
mhmmm i think i didn't search correctly
please where is Auto Moderation in discord-api-types?
#418 in discordjs/discord-api-types by vvito7 opened <t:1651396604:R> (changes requested)
feat: add support for auto moderation
ok so i found out that the problem was the token but now im getting a different problem now, nothing happens
Hello, I created an embed on which there are buttons I would like to make sure that it deletes the embed sent before
nevermind, I've just succeeded
I know this server is about discord.js only but the Puppeteer server is dead and I was hoping maybe someone here was familiar with the lib. I'm using it in my Discord.js bot if that helps. Basically the issue is, I get stuck on this prompt and seemingly have no way to interact with it. Doesn't trigger a dialog event and I can't interact with it through page keyboard inputs or mouse clicks. Any ideas?
Your inquiry is answered by the first half of your first sentence. #rules 3, thanks, bye
Ask in some of the #useful-servers or on the #869652447881207858 thread or if they have, their own server
can someone you help me with this error, ||(and please for the love of f-ck if you send me a link to the front page of the d.js guide (Which provides no specific information or help) your a psychopath and I'm leaving the server))||
code which through the error (If you need more information please ask):
const { REST } = require('@discordjs/rest');
const { Routes } = require('discord-api-types/v9');
const fs = require('fs');
module.exports = (client) => {
const { commands, commandArray } = client;
client.handleCommands = async() => {
const commandFolders = fs.readdirSync("./bot/commands");
for (const folder of commandFolders) {
const commandFiles = fs.readdirSync(`./bot/commands/${folder}`).filter(file => file.endsWith(".js"));
for (const file of commandFiles) {
const command = require(`../../commands/${folder}/${file}`);
commands.set(command.data.name, command)
commandArray.push(command.data.toJSON);
console.log(`Command: ${command.data.name}`)
}
}
const clientId = '';
const guildId = '';
const rest = new REST({ version: '9' }).setToken("TOKEN");
try {
console.log("application (/) command refreshing!");
await rest.put(Routes.applicationGuildCommands(clientId, guildId), {
body: client.commandArray,
});
console.log("refresh successful!");
} catch(error) {
console.error(error);
}
}
}
error code:
Command: ping
application (/) command refreshing!
DiscordAPIError[50035]: Invalid Form Body
0.name[BASE_TYPE_REQUIRED]: This field is required
at SequentialHandler.runRequest (C:\Users\kech8\development\comp\node_modules\@discordjs\rest\dist\lib\handlers\SequentialHandler.cjs:287:15)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async SequentialHandler.queueRequest (C:\Users\kech8\development\comp\node_modules\@discordjs\rest\dist\lib\handlers\SequentialHandler.cjs:99:14)
at async REST.request (C:\Users\kech8\development\comp\node_modules\@discordjs\rest\dist\lib\REST.cjs:52:22)
at async Client.client.handleCommands (C:\Users\kech8\development\comp\bot\functions\handlers\handle_commands.js:29:13) {
rawError: {
code: 50035,
errors: { '0': [Object] },
message: 'Invalid Form Body'
},
code: 50035,
status: 400,
method: 'PUT',
url: 'https://discord.com/api/v9/applications/1003740423463903233/guilds/1002060483735605328/commands',
requestBody: { files: undefined, json: [ [Function: toJSON] ] }
}
command is missing a name is what the error says
Its because you pushed the toJSON function instead of calling it
commandArray.push(command.data.toJSON);
wow ...
thanks
thats was dumb simple lol
Things often are
yup
Anyone know if this has been fixed?
I dont see any PRs that look like theyd be addressing it
https://github.com/discordjs/discord.js is where to follow issues and PRs fixing them
Hi! The "try catch" functions don't work for me when sending messages to the user. Can you tell me how to fix it? Or implement it in a different way?
^
DiscordAPIError[50007]: Cannot send messages to this user```
My code:
bot.users.cache.get(UserID).send({embeds: [embed]});
} catch (error) {
console.log(error.text);
}```
await the promise from .send() or use .catch()
is error.text a thing?
okey, thanks, i'll try!)
in what sense?
Error
Error objects are thrown when runtime errors occur. The Error object can also be used as a base object for user-defined exceptions. See below for standard built-in error types.
aaah, I understand what you mean) thanks
I made the function async, and set await before sending. it finally worked! thank you!
There is a problem for collectors concerning Modal submits.
When creating a modal and awaiting the submission, if the user cancels or clicks off the modal, the program has no way of knowing so the collector will wait until it times out.
It would be useful for collectors to receive a cancellation event, so that the modal can be requested again before waiting for the time out.
From what I can see the discord API doesn't actually provide for this situation yet though.
Exactly, the api doesnt provide a way.
Nothing we can do.
Do you think it is a very niche situation, or something worth trying to make discord aware of in hopes of expanding that API
No idea.
All good, thank you for confirming that the API doesn't provision for it anyway!
Excuse me, I run the same robot on multiple servers. For example, will guildMemberAdd events be triggered multiple times? How to solve the situation of triggering multiple times
not having the bot on multiple servers would be a way, or simply not listening to that event on the other servers
Okay, thanks
I think I might have found a bug and I'd like to create a PR.
The file in question is packages\discord.js\typings\index.d.ts. The union ApplicationCommandOption is missing ApplicationCommandBooleanOption.
- Is this a bug? If so, I'm gonna create an issue on GH.
- How do I work on this? I think it would be a good first issue. Is
index.d.tsautomatically generated by a tool? - Related to question 2: This is related to the main discord.js package, right?
Well maybe I shouldn't call this a bug, but rather incorrect typings.
it doesnt have much options like User ot Integer
But it should, right? Hence me asking.
idk 
- I'm not sure where this type is used. You could show us an example that should be valid but where TS shows an error. You could also create a post in #992669226403909652
- It isn't automatically generated (afaik)
- yes
if I do client.application.fetch().commands.fetch().first().options[0] I can easily get an instance of ApplicationCommandOption.
And using it's type property, I should be able to compare it with anything in ApplicationCommandOptionType. It works with .String, but tsc errors once I check for .Boolean.
Barebones example:
import { ApplicationCommandOption, ApplicationCommandOptionType } from 'discord.js'
let test: ApplicationCommandOption
if (test.type === ApplicationCommandOptionType.Boolean) {}
I can reproduce. Not sure if I'm missing something tho
anyone know how to create a message.channel.send({blah blah blah}) that performs like so?
I was thinking of having a switch tree where if a user inputs "luciddreams", "lucid dreams", or "lucid dream" then the variable would be set to simply "lucid dreams" for the message.channel.send({}) to read.
But I also wanted, say if they do enter "lucid dreams" and I have that switch tree that sets the variable 'title' as lucid dreams. Every cover art in my lucid dreams folder to be messaged into the server. Either through my local folder I have or if it's easier just through a discord message link that's linked to a message of image files that the bot can somehow pull the image from the message and display in the send.
just a switch case with overflowing cases?
Is there any way I can use Timeout in discord.js?
Yes
Documentation suggestion for @carmine wadi:
GuildMember#timeout()
Times this guild member out.
Thank you
Hello
Is it possible to make a command of a whole category work in DM only?
I don't think that's possible from Discord itself, but you can allow the command to exist in DMs and check when you receive the interaction to see if is present from a guild & return out
I'm coming from discord py where they is something like this
@commands.dm_only()
So at the start of the function i can check if its a DM if it is i should return?đ¤
?
Yes
You can create global commands that are usable in guilds but not DMs, but you cannot create ones that are usable in DMs but not guilds
So basically its not possible to create a command that can be used only in dm?
Not so that Discord can disable using it in guilds altogether, but you can still manually return within your function
Please how can i add something like this to my bot?
in-app authorisation
Tag suggestion for @pseudo thorn:
"Add to Server" button
⢠Developer Portal > Your app > OAuth2 (General) > Default Authorization Link
⢠Set authorization method to "In-app Authorization"
⢠Check scopes bot and applications.commands
I mean the button
yes
read the thing
"Add to Server" button
explains how it works
do it, will have it
Thanks
So what if i use custom
I can style the button or do it as i want ?
Any guidelines on that too?
no
Will still be same button
?
no. you cannot customize it
Okay thanks
interaction.guild.channels.create( {name:category}, {type: "GUILD_CATEGORY"});
whats the right way to create a category in version 14?
no..
this is outdated?
that was never correct
Documentation suggestion for @viscid forge:
GuildChannelManager#create()
Creates a new channel in the guild.
thanks its fixed now đ
if you select "stable" you get to see "interaction" in the search bar
https://discord.js.org/#/docs/discord.js/stable/class/Interaction
but if you change it to another version, then you cant see anything coming up if you search "interaction"
why is that?
v14 type is BaseInteraction
ohh i found it!
how do i stay updated with that info? like Interaction is BaseInteraction now?
Suggestion for @viscid forge:
Additional Information: Updating from v13 to v14
read more
@jaunty vault that resource was very helpful but I could not find the info that interaction was BaseInteraction in new version there
guess they didn't put it in there
quick question, is there a way to use the emoji selection without being kicked out of it as soon as I select something?
No idea what that has to do with discord.js but hold Shift
@here can Anyone give me a Refresher on Importing discords library and replys to messages it's been a long while since I coded so I need refreshing
What major bots are made with djs
@plain rover
I am currently trying to develop a custom discord api wrapper (in python), but I have a question since this library works really well from my experience: how do you do heartbeat? Do you use JS/ES/TS-specific functions or an async loop?
Look at GitHub, the source code is free to view
is there a way to get a channel or a category by its name rather than the id?
you can use find
const channel = client.channels.cache.get("222086648706498562");
const channel = client.channels.cache.find(channel => channel.name === "general");
⢠Caches in discord.js are Collections which extend the native Map structure.
⢠learn more
thanks đ
How to i check if the interaction is happening in DM
interaction.guildId would be null
Okay thanks
So all servers must return guild?
what is the hex code of this
Thatâs probably Blurple, no hex code needed
what is the code of blurple
Can i hide some specific commands from been shown when / is typed
You know by default discord suggests you all the possible commands any way to hide some from showing?
Hey, what's the latest v13 stable version?
what the code of blurple
The â ?
Colors.Blurple
??????
what code
I just told you
You can configure by the server integrations or pass an default permission for the command when deploing it
Documentation suggestion for @pseudo thorn:
SlashCommandBuilder#setDefaultMemberPermissions()
Sets the default permissions a member should have in order to run the command. (more...)
I GOT IT LES GO

open your discord on your pc using Firefox and open developer menu and go to inspect look at the top right corner of the menu you will see a hex code pick us it to
This still means the command will be seen but can't be used because no correct permissions
I want it to no been seen at all
Then if they actually type the command i can check for the permissions stuffs
?
No, it wonât. You can only see commands you have permissions for. Unless discord has bugs (which it obviously does)
Absolutely wrong channel for that
Okay
Okay thanks this is more straightforward thou
Remember that you need an special OAuth scope from a mod in that server to edit this permissions using your bot
do u know this color as well?
Not related to this channel. I let the first one fly, but #archive-offtopic
Still doesn't solve it
Because it's not hidden
what is there
This has been updated they are now hidden
Do you see Yuudachiâs slashcommands? That support article is outdated
Okay thanks
Sorry about the outdated articles
Nođ
pls the last one
Where can i host my bot free?
i use orancle free vps
how do i setup rich presence on my bot?
You donât.
what if i do?
Then it would be a self-bot and get banned
@plain rover is using rich presence for "add to server" or is it something diffrent?
why on earth are you asking a bot
Tag suggestion for @cinder moth:
"Add to Server" button
⢠Developer Portal > Your app > OAuth2 (General) > Default Authorization Link
⢠Set authorization method to "In-app Authorization"
⢠Check scopes bot and applications.commands
what? im asking @steel haven and tagging bot for reference
And now you tagged me for no reasonđ¤Śââď¸
yea yea you guys are just making drama, ty

we arent making any drama we are just telling you theres a difference
it's not possible to add rich presence to bots
lol
Oracle?
https://oracle.com/cloud/free probably
yes, misspelled
hosting discussion goes elsewhere, thanks
Xd?
Noted
Hi, this is normal on the function 'addNumberOption' it is impossible to use the functions 'setMinValue ...'
No
Hi, please ask a question. The connection BOT reports this network error. Is there any solution or VPN
Is there any recommended VPN
No
use hulkvpn
and stop. this channel is for issues and questions regarding the development release, not hosting
Hello, how to start on creating a bot?
thanks
While the Forum's Channels aren't added, the message event will trigger under the Unknown channel type?
I don't think it will emit at all
We check if a channel is text-based before emitting that event. Since forum channels are not yet implemented, it will ignore it as it is not included in the text-based channel check
arent forum posts just threads
Dunno lol
the event should emit, @plain rover uses it
iirc it's the channel's parent that is null
https://discord.com/developers/docs/topics/threads#forums
Threads can be created in a forum channel. All threads in a forum are of type
GUILD_PUBLIC_THREAD.
So yeah, it'll emit
djs docs doesnt use djs tho 
not for interactions but I think it does for the ws connection to this guild
Ow, nice, ty
That part of it actually doesâŚ.
@steel haven can you check mine's and @scarlet tangle's post in #986520997006032896
please don't advertise questions in other channels
we look through forums regularly
Oh ok sorry
When support for new gateway for reconnection event is planned XD ?
?
#discord-dev-news message You mean this?
yes
It just got announced lol
If you want, open a Issue on the repo
Yeah I feel like you knew this question was basically a troll so kindly don't
I actually didn't though that tbh, but sorry
I suggested as a way to start to have a proper place to talk about the implementation
Oh no you, I meant the original question about when its planned
Oh đ
Hey -- so I've got a djs bot that's gotten pretty popular -- I'm wondering if there's any best practices or tips for optimizing getting that interaction.deferReply out so the user doesn't see "interaction failed" when a lot of people are clicking buttons at the same time
Feels like since node is single-threaded there's kind of a hard limit on scaling with djs -- maybe worker threads are a solution? Though I expect you'd have to spin up a separate client on each thread and use a ton of memory, and deal with "unknown interactions" as well. But any thoughts or ideas on running a single djs bot on multiple processes?
dude use sharding
Hmm interesting - can u link me an example? I'm not familiar with this
Ah I found it in the docs, ty!
Question about sharding -- if I set the totalShards value to a number, does it automatically divide all the guilds the bot is in by that number and put them into the shards? Is it possible to force certain higher-activity guilds into separate shards?
My bot is only in ~600 servers but it has a lot of interactions, especially in ~100 of those servers
So leaving it on auto doesn't seem like it will do anything for me
No, Discord would have to override that, but thatâs only done in extreme cases
Guilds are assigned a shard based on the number shards you have and the created timestamp part of the id of the guild
Ah good to know, tyvm
Well this seems to work fantastically! And heroku gives 256 processes so tons of room to grow! Thanks you guys for helping me
hello, can somebody help me with something?
One channel suffices, you got answered elsewhere
please in MessageDelete.js file in actions folder, there is variable called message message = this.getMessage(data, channel); , so how can i know if this message is an embed?
Check if message.embeds.length is bigger than 0, also I dont really see how this is dev related
please i have been discovered a bug so if i made pull request how can i explain the bug like what i put to make pull request accepted
You just... explain the bug and your fix... if its an actual bug it gets merged
ok but if i made a changes in the coding of the file how can i explain that đ
There are contribution guidelines, you should read them
ok i saw it but i can not understand that what i put in the comment
What you changed, what was broken, how the code make the thing break
Look at other prs for example
so how can i show the code i have been edited
GitHub already do this
i am sorry but i can not understand
Look at other prs commit pages, those are changes to the code
When you post your pr and commit something it will have those changes there
But look at some tutorials of Git and Github on the web
Probably the best for now is to open a post in #992669226403909652 and explain you issue
Before PR something
ok i must make a commit to the forked repo right?
i want to do , in any voice , using command will generate an invitation to enter that channel
Documentation suggestion for @cold crown:
VoiceChannel#createInvite()
Creates an invite to this guild channel.
just upgraded to v14 on djs and
node:events:505
throw er; // Unhandled 'error' event
^
DiscordAPIError[50035]: Invalid Form Body
0.type[NUMBER_TYPE_COERCE]: Value "CHAT_INPUT" is not int.
1.type[NUMBER_TYPE_COERCE]: Value "CHAT_INPUT" is not int.
tried exploring about it to fix it but still unable
read the update guide, need enums
I want to make an invite from the voice channel I'm on, not the chat channel ?
The docs are for the voice channel
I can't find any material I can use
please it is a problem if it shows merged blocked?
what PR is this?
i closed it it is invalid anyway
please if i made a feature that if someone added role or removed role from the member, and it will get the executor that added role and all details without user making a complex code,
are this feature is exists or not?
Itâs not what discord.js as a library should include. That would be part of a framework in my eyesâŚ
please i searched this link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure on discord-api-types docs, so are is it in discord-api-types or not?
It is
sp can you share the link pls?
Itâs prob named ApplicationCommandOption
it is APIApplicationCommandOptionChoice not APIApplicationCommandStructure
i think i can not find APIApplicationCommandStructure
Remove Structure
I literally linked you the thing with the actual nameđ¤Śââď¸
The link does seem to be scrolling to the wrong one
Nvm, worked when I reopened it like a 3rd time
bro in discord developers it has application-command-option-structure đ
Structure is not part of the name
Thereâs no reason to suffix every interface w/ Structure anyways
bro i want this exact features
That looks like a received/fetched application cmd
Only bc the version is non-nullable, but ur not allowed to set that when creating/updating a cmd
But thatâs under APIApplicationCommand
ok thx
My bot is not coming online, something with Discord?
Probably not. What does this have to do with developing discord.js
what is the use of discord.js v14?
What
how is it differant from the other api versions?
Read the update guide
oh
I have a question. If v13 still has updates coming then wouldn't that be seperate from v14 updates? Like wouldn't they be different versions so v14 wouldn't end up getting those improvements from v13 updates
V13 only gets what V14 gets
Makes sense
not even slightly
This isnt a topic for this channel, please dont ping people for answers to questions #rules
RangeError: Non-link buttons cannot have a url
how to fix this?
set the style to Link
ah oke
How can i copy attachments from message into a embed that u can see it as the Image of the embed?
and can gif be also in the embed image
Wrong channel, #djs-help-v14
oh shit
Hi
Idk if it's the right channel for ask that but does last discord gateway change (see #discord-dev-news) will be supported in next djs version ?
Haven't found recent commit or PR about that in discordjs/discord.js repo
Mb
Not related to the development release of djs, wrong channel
#7938 in discordjs/discord.js by Jiralite created <t:1652824011:R> (review required)
feat: Auto Moderation
Discord needs to finish their documentation of it first, then djs can release it. We donât release undocumented features.
ok
export type RESTPostAPIWebhookWithTokenJSONBody = AddUndefinedToPossiblyUndefinedPropertiesOfInterface<{
/**
* The message contents (up to 2000 characters)
*/
content?: string;
/**
* Override the default username of the webhook
*/
username?: string;
/**
* Override the default avatar of the webhook
*/
avatar_url?: string;
/**
* `true` if this is a TTS message
*/
tts?: boolean;
/**
* Embedded `rich` content
*
* See https://discord.com/developers/docs/resources/channel#embed-object
*/
embeds?: APIEmbed[];
/**
* Allowed mentions for the message
*
* See https://discord.com/developers/docs/resources/channel#allowed-mentions-object
*/
allowed_mentions?: APIAllowedMentions;
/**
* The components to include with the message
*
* Requires an application-owned webhook
*
* See https://discord.com/developers/docs/interactions/message-components#component-object
*/
components?: APIActionRowComponent<APIMessageActionRowComponent>[];
/**
* Attachment objects with filename and description
*/
attachments?: (Pick<APIAttachment, 'id' | 'description'> & Partial<Pick<APIAttachment, 'filename'>>)[];
/**
* Message flags combined as a bitfield
*/
flags?: MessageFlags;
/**
* Name of thread to create
*
* Available only if the webhook is in a forum channel and a thread is not specified in {@link RESTPostAPIWebhookWithTokenQuery.thread_id} query parameter
*/
thread_name?: string;
/**
* JSON encoded body of non-file params
*/
payload_json?: string; // new here....
}>;
please if i added payload_json in RESTPostAPIWebhookWithTokenJSONBody it will make sense or what?
Hello,how to add ban user cmd to bot?
you want to go to one of the help channels, correspondent to your discord.js version. the only supported versions right now are v13 and v14.
....why are you adding that? Where's the documentation for the property you're adding?
OK
payload_json would be a valid property for multipart/form-data requests only. But that Payload you have there is for json requests (as the name already implies). So itâs not a valid property here, no.
ok
please if i added in audit-log.md like who edited message or who made role and more... , my pull request will be valid or no?
Why do you need to make a PR so badly when you didnât even know what git was some days ago? What do you expect to gain from it? PRs should be done because there is something that needs fixing, not because you frantically look for anything you could send without any need
bro i know git from years. but i didn't made pull request before in github but i learned git already lol, and when i said i am beginner ( i said i am beginner at pull requests or contributing on open source projects)
and i mean that it will make sense if i made this changes the contributors will accept my changes or not ( i am not talking about git)
please what is js {2-7,9-10,12-14,16-22} in the .md file like ```
js {2-7,9-10,12-14,16-22}
..coding
code highlighting
line 2,7,9,10,12,14,16 & 22 are the lines that are highlighted in the codeblock
the contributing guide explains it here: https://github.com/discordjs/guide/blob/main/CONTRIBUTING.md#code-block-line-highlighting
hello
please i can not understand what is diffrence symbol do - in highlighted code , like that js {2-7,9-10,12-14,16-22}
Itâs a range, not difference⌠line 2 to 7
mhmm ok
Am i able to ask a question about threads here?
this channel is for users of the preview in-dev version.
if you have an unrelated question, #djs-help-v14 #archive-djs-help-v13 are available, based on the version you are using
#986520997006032896 if it's more elaborate (please tag accordingly with your version)
Got it. Thank you so much! đ
What is the code to add permissions on V14
To a role, a member, permissionOverwrites, � #djs-help-v14
how do i fix this error? sv RangeError [BitFieldInvalid]: Invalid bitfield flag or number: GUILDS. at IntentsBitField.resolve (C:\Users\user\OneDrive\Dokumenter\discord\SZ Bot\node_modules\discord.js\src\util\BitField.js:168:11) at C:\Users\user\OneDrive\Dokumenter\discord\SZ Bot\node_modules\discord.js\src\util\BitField.js:163:54 at Array.map (<anonymous>) at IntentsBitField.resolve (C:\Users\user\OneDrive\Dokumenter\discord\SZ Bot\node_modules\discord.js\src\util\BitField.js:163:40) at Client._validateOptions (C:\Users\user\OneDrive\Dokumenter\discord\SZ Bot\node_modules\discord.js\src\client\Client.js:482:41) at new Client (C:\Users\user\OneDrive\Dokumenter\discord\SZ Bot\node_modules\discord.js\src\client\Client.js:78:10) at Object.<anonymous> (C:\Users\user\OneDrive\Dokumenter\discord\SZ Bot\index.js:5:16) at Module._compile (node:internal/modules/cjs/loader:1120:14) at Module._extensions..js (node:internal/modules/cjs/loader:1174:10) at Module.load (node:internal/modules/cjs/loader:998:32) { code: 'BitFieldInvalid'
GUILDS -> Guilds
doesn't work
or
now the error is RangeError [BitFieldInvalid]: Invalid bitfield flag or number: Guild_Messages.
No underscore
Thank you very much to both
please why it shows 2 changed things in PR i want only 1 change !!!!
u changed Emoji class and
MessageDelete action
ok i want MessageDelete doesn't show
so remove changes in this file?

why it shows this hole commits in the PR i want only one commit !
Because youve messed up your branches
or quite literally made that many commits
It can only show commits that you made
ok how?
ok, so it should have only 1 commit for 1 changed file in PR not 10 commits so i want show only one commit in PR how?
I mean its technically possible to reset the entire thing and cherry pick one commit
Or rebase and squash them all but like
Thats not how commits work, you dont get to choose what it shows
You made 10 commits, it shows 10 commits
ok now i am understanding thx for help bro
That solution is still very incorrect though
The maintainers would never accept it in that state
what are you talking about?
The PR you opened
that has this ?
url(extension) {
let final_result;
if (extension === 'png' && !this.animated) {
final_result = this.id && this.client.rest.cdn.emoji(this.id, 'png');
} else if (this.animated && extension === 'gif') {
final_result = this.id && this.client.rest.cdn.emoji(this.id, 'gif');
} else if (extension === 'webp' && !this.animated) {
final_result = this.id && this.client.rest.cdn.emoji(this.id, 'webp');
} else if (extension === 'jpeg' && !this.animated) {
final_result = this.id && this.client.rest.cdn.emoji(this.id, 'jpeg');
} else if (extension === 'jpg' && !this.animated) {
final_result = this.id && this.client.rest.cdn.emoji(this.id, 'jpg');
} else if (!extension && !this.animated) {
final_result = this.id && this.client.rest.cdn.emoji(this.id, 'png');
} else if (!extension && this.animated) {
final_result = this.id && this.client.rest.cdn.emoji(this.id, 'gif');
} else {
final_result = undefined;
}
return final_result;
}
yeah, no
We would never use an else if chain like that, its pointless duplication of code
The method also isnt correctly documented and typings werent updated
so what you suggest to use?
uhhh, none of the above? the existing code was essentially fine, extension just needed to be a variable instead of hardcoded .png
Optionally you could probably use one of the existing url options types for { forceStatic, extension }
@upbeat mantle we see you want to contribute and thatâs fine. However, it seems youâre missing the foundational JavaScript prerequisites here. I think it would be better if you took some time to learn more of JavaScript before trying to contribute again.
exanple like?
Mate if I'm going to write an example I might as well do the PR myself
Not going to spoon feed you contributions
no i mean forceStatic and extension what type of it?
Contributing to the library should not be an exhausting support conversation
Its ImageURLOptions or something idk
ok 
please why it shows this when i do commit?
I dont even know at this point

something wrong with your dependencies installed for discord.js
i think because i made it by yarn install ?
because when i make npm install it shows an errors
have you followed the contributing guide?
ofcourse , i tried npm and it shows error and problem from my computer
i will fix it
yeah thx there is something i forgot to do
@upbeat mantle please refrain from duplicating PRs any further, you can just edit existing branches (and PRs) by pushing new code to it. One PR is enough, 3 is too many, and it only places a further burden on the maintainers as well as the notifications of the 433 people who watch the repository.
All of the last three PRs contain code that either:
- Introduces invalid JavaScript (#8490)
- Introduces code duplication (#8491)
- Introduces code that does not adhere to our style (#8491 and #8493)
- Introduces tests that cannot be tested by others (#8493)
Also, all three PRs do not have the description filled out, this is a bad practice and edges getting an "invalid" label. I would suggest you write them in the future.
On top of that, the change is a breaking one, this means it would have to wait for v15, which is still very far away from happening (we don't even know if it'll be JS or TS!). The only correct way to implement this change is by creating a new method (getImageURL) and deprecating the getter, updating everything else accordingly.
If you are not confident in your Git or JavaScript skills, then I must remind you that Discord.js isn't really a playground for beginners, we require code to be up to our standards. We try to help anybody who struggles, but sadly we can't be holding your hand all the time, there's a limit on how much time we can spend helping.
If all you want is to contribute, you can always open an issue explaining what you want, then you or somebody else can pick it up and submit a PR, this is generally a very accepted approach to contributing in many repositories: they're very welcome and often easy to make (just a bit hard to spot! And you spotted one, that's great! \o/)
hello kyra,
firstly thanks for telling me about that and it is good note,
so i am not beginner at well i have 4 years experience in javascript and typescript already 
my problem is i can not understand the system that discord js in the pull requests,
so i am trying and i am doing effort to make a feature in discord js or fixing a bug in it , i am just trying at all methods,
so i will wait for the reviewers to review my pull request and i will see if they will accept it or not.
at all i am sorry for annoying and open many pull requests i will not do my fault again and at all we do mistakes
and we will see what reviewers can suggest to do !
and yeah, i do not knoow why this error comes and i am doing everything well !!
we will see everything\
why aren't you leveraging those 4 years of experience
i think because this is the first time that i am contributing on open sources for the first time.
On a side note, what Discord.js uses is pretty much industry standard, we don't require special stuff or extra steps before contributing, so if you have at least some knowledge in Git and GitHub, you should be fine with Discord.js as well.
Making mistakes with Git because you never used it in the 4 years of JS is understandable, they're different technologies with different purposes.
What Crawl is saying here, is that you claim to be an experienced JS developer, but it doesn't add up with what we're seeing in your code.
yeah you are right my mistake in git , because i didn't use it for long time and i should make a revesion in git đ
please can someone from reviewers see this PR it has been 1 day and no one from reviewers made any response and from 5 hours i have been made a new changes.
i don't know i made many PR's before and it replys in minutes only , so if it takes many days no problem .
That was me replying to those
yes, the initial replies to a PR. but you did 3 PRs already, and most of the comments you would get would be just copy pasted anyway.
Hey quick question, what "coverage" is it talking about in PRs?
"coverage" is referring to covering all the lines of code
for instance, when you add an if-statement, you need to have tests that execute the if. similarly, if you also have an 'if' and an 'else', you need to have tests that execute the lines in the 'if' as well as the lines in the 'else'
a reduction in coverage % indicates there are lines of code that don't have tests executing them (and would then be "untested code")
ah
this channel is for the in-development version of discord.js specifically
this seems to be an issue with your storage setup and is not on topic for this server
???
we dont support discord-buttons
What?
We, the discord.js server, did not make, publish, and do not support the use of the npm package discord-buttons
It has nothing at all to do with us, and it's use is not recommended
discord.js includes support for buttons natively
ok
The #992669226403909652 does not have an tag for the bot (@d.js docs#1083) , makes sense tho
I would like to suggest the bot to have an delete button for the first 10-15 seconds on all the queries
Or an way to preview messages before they get sent
you can preview in #app-commands
Yeah, I know, the reason I think a delete button is useful is to when:
- Clicked the wrong tag or the tag content isn't the one you wanted
- The documentation sent isn't the one necessary for the user, making the support probably more difficult and confusing
- The less reliable queries like
NodeandMdndoes not point to the location you wanted them - Guide has a lot of duplicated names and sometimes it's is difficult to find the exact topic you wanted
Yuudachi had when it was the main bot for docs
Make an issue
https://github.com/discordjs/discord.js/issues/8084
Having a single state store and using a message broker would be handy.
Have the client be orchestrator agnostic and have RPC be pluggable.
I'm a fan of https://dapr.io/, CNCF hosted OSS ect.
There are tons of projects that can do the hard parts already, building on top of them seems like a smart choice. Lifecycle handling, secret management, state management, message delivery can be made to be plug and play.
Q: Why is eval necessary?
Q: Why is eval necessary?
A: Legacy, discord.js has had broadcastEval since it has a sharder. I find it unnecessary and want to remove it in favour of safer and faster alternatives.
dapr looks interesting, I already had plans to make all components of the sharder pluggable, via strategies.
My experience with many tools in the ecosystem is pretty negative, though, many of them limit our options, are legacy software, have some kirks that blocks our projects, or some other reason. My idea was to try to implement it using what I have learnt over the last years of this, although my knowledge falls limited when it comes to remote sharding (aka cross-server sharding), I feel confident about my skills with local sharding.
Then again, my idea of the remote sharder is to make it, just like the local sharder, customizable to the point you don't even need to use it, as long as you follow the protocol.
If some tool has a protocol that could be useful for our sharder, please let me know and I'll investigate if I can include it in the RFC for implementation.
Agree with the eval removal, eval and object poisoning are always what get people.
Building on top of Dapr would create some lock in*, But it's CNCF (aka TONS of funding and support) and allows people to use whatever they want. Redis, postgres, Kafka, nats, cloud services, blob storage (S3 ect). It can run on normal docker, bare metal or k8s, and is super super light / fast. Also has telemetry (tracing ect). I would recommend giving it a look and popping in their discord. They are super responsive, have active community calls and again , backed by major company with deticated engineers.
Protocol wise: grpc gets my vote
https://cloudevents.io/ or having a standard for RPC is always nice.
Other projects are probably to heavy for the normal users tho (consul/zookeeper)
I must also add, while the sharder will have some sort of RPC, I discourage the rather over-usage of it, they're optimized for talking to other processes across the... tree, but not between leaves, you should use Redis streams, RabbitMQ, gRPC, or any other similar tool for that.
I'm a fan of gRPC too, used it on .NET projects and it's wonderful how nice it works. But the tooling for Node.js... 
Still, because of the first sentence, the sharder will be kept simple and rather low-level with high control. Simpler things are harder to break after all, and the low-level API allows you to use whatever you want.
Mind you that the tree communication is irreplaceable in some cases, you can't replace how Node.js's child processes work and talk to the parent. Network sharding is easily replaceable, yes.
That would be the good thing about Dapr, communication across shards can be done directly or over a message broker.
As an added bonus, the rest of Dapr opens up to devs, so they can create functionality without having to pull in other libraries if wanted. Would also open up having "commands" living outside of the client process, so the shared clients would be privileged (has token in memory) and commands would be outside of the node process. (Node sandbox is a thing but it's not the best...)
Yeah, the tie in with Dapr would be a dependency.
I'll have to think about what the client really needs to expose to allow easy extensions.
Of course, I'm not saying we're going to replace things like gRPC, those have dedicated tools like source generators that would otherwise be too painful to maintain for us. We would just expose whatever is needed to make gRPC (or anything else) easier to use.
Also, a sharder's job should be to shard, it doesn't include communication between them, that's just an extra I added for convenience and for small setups.
But if there is sharing, there is still going to be some level of shared state.
I'll think a bit more about the topic and see what else I can find.
I believe adapting the client a little while working on sharding could make DX a lot better.
Uhm... I'm not really a fan of this from Dapr
Oh wait, I misunderstood it, sorry, the slides were moving too fast and made me mix some stuff.
Yes, keep also in mind that /sharder needs to register some basic commands for basic functionality, such as shutdown, sharding, and re-sharding, so there must be a base interface that cannot change.
That's a bit overkill of a design (the photo)
I image Dapr as being a small helper for discordjs to either:
Give if free RPC to the other shards (http, grpc built in)
State store if the project desired (redis, postgres, internal) rate limiting, command registering, shard client stats, client stats,
Telemetry (logging, tracing, metrics)
Super easy Dev exp
Shared ratelimiting can already be achieved with @discordjs/proxy, by the way đ. There's also a Docker image for it.
Command registering, I believe the guide recommends it must be done manually by the developer, and not automatic by the bot.
Shard and client stats are easily retrievable through tree communication, current discord.js already does that. But yeah, with the current RFC, you would need to make the brokers yourself, or wait for us to release said brokers (I believe Crawl had plans around them) which simplifies this enormously anyways.
Telemetry... that I don't know much about what the industry standards for it are, there are way too many possibilities, you still have all the hooks needed to make your own, though, or at least, that's the idea. With current RFC, that would probably be a separate package to keep the main package simple.
With a shared state, it wouldn't need a proxy, it could just query a shared state
Command registering would just be a helper, not exactly a built in.
Registering allows a client side shared state to push up, this can then be built however the person wants(polling for changes, pushing new code, registering it with invoke)
Currently you can call across all shards, but they each have their own state and you then have to reduce across. Now adays state stores are so fast you can share them network side for almost free*
Telemetry is standardized nowadays with https://opentelemetry.io/
As for Dapr having HTTP/gRPC built-in, I'll need to see tooling and code examples, see how they compare, if they're user-friendly and have first-class TypeScript support.
With a shared state, it wouldn't need a proxy, it could just query a shared state
/rest supporting shared state is in our backlog, that's absolutely not the sharder's job. And /ws supports strategies for shared state as well, /sharder would just hook it to its shared data and update accordingly so they don't hit it.
Command registering would just be a helper, not exactly a built in.
Current RFC makes this inevitable, because we need a way to distinguish between a shutdown and a re-shard request, for example. đ
Registering allows a client side shared state to push up, this can then be built however the person wants(polling for changes, pushing new code, registering it with invoke)
Are you talking about blue/green deployments? If so, I have many questions about it, primarily, how do they work alongside Docker containers.
(side note: if discordjs has auto instrumentation for tracing that would be sooo nice)
I'll pull up some docs / examples or make poc one really quick.
While it's not the shaders job, if you are going to be adding a dependency or DIY, might as well plan for shared usage
Yes, kind of, I'm more looking towards the decoupling of the shards, clients and the business logic
Currently you can call across all shards, but they each have their own state and you then have to reduce across. Now adays state stores are so fast you can share them network side for almost free*
That's because the current (and RFC) way is to have tree communication, since it's a side-effect of processes having a parent they can talk to in both ways. Supporting inter-leaf communication is outside of the sharder's job. Shared caching is too, but we'll support it via hooks to help making network sharders more resilient by not having the data in a single point of failure.
side note: if discordjs has auto instrumentation for tracing that would be sooo nice
May I ask what do you mean with tracing? đ¤
Docker containers are just a host, the control plane on top does blue green (nomad, k8s, swarm, custom IAC)
This kinda blurs the lines of the shaders job. I imagine a case where the goal is HA, rapid releases.
Tracing: moment on that one, just manually did a opentelemetry Jaeger one last night I can make some screen caps for, lemme find a link tho for ya
Oh, tracing is part of opentelemetry, I also see the package is written in TypeScript, that's a relief. Kinda looks like Sentry SDK too đ
Open telemetry is a standard
It just defines a spec so other tools can use it.
It's just for tool introp, since it was starting to get fragmented. Think of it like a protocol like grpc that also comes with helper libraries.
You'll have to elaborate more on the gRPC example, I never used it as a protocol or as a spec, but more as a CLI (to generate the JS/TS code) and a library (calling the generated code), kinda like how Prisma does, except for RPC.
gRPC is a spec / standard that encodes binary data
It has a specification that allows others to develop libraries to handle it
gRPC also comes with implementations of the standard/ spec that can consume a proto file and create client libraries to use.
it's like http, http is just an old RFC that people built tools around. gRPC just happens to have centralized premade tools.
Opentelemetry Is a spec that was meant to give a common ground for players like sentry, datadog and tools like Prometheus, Jaeger ect to use
gRPC is a spec / standard that encodes binary data
Is it? I thought that was more protobuf's thing. And gRPC more about about the whole system combining HTTP2 with extra stuff and protobuf đ¤
Apologies, you are correct, protobuf is the underlying format, tied the two together in my mind.
The http example still works
Wrapping up:
I want to keep sharder simple, I also want to have the local sharder done first, the 99% of djs users use it. In remote sharding, I also want to encapsulate the local sharder as if it was a single shard rather than a cluster of shards, it simplifies the process even more.
Furthermore, with the possibility to make HTTP-only bots, the needs for huge infrastructures is reduced, and one can handle slash commands and interactions in a more standarized stack for HTTP servers, if not in a single server due to how lightweight those bots are. Making a hybrid bot isn't too hard at all, and if done correctly, it can easily scale very well as long as things are kept separately.
Custom message formats are supported by the RFC, so you can use JSON, V8, ETF, protobuf, or whatever else. And so are commands. I might need to look into authentication for the shards as an extra security step.
Both local and remote sharders will have hooks to have an easy way to store state information in a shared place (e.g. Redis), and of course, this also comes with a way to recover with it.
Do we want to support custom protocols for remote sharders? Like TCP (raw, HTTP1.1, HTTP2) or UDP (QUIC). Or stick to one for simplicity? The strategy system abstracts it away anyways, so not like it makes the sharder code any more complex.
Leaf-to-leaf communication will not be supported out of the box, tree communication will (most methods of sharding open a channel we can use for this. Besides, shards need to talk to the parent and vice-versa, but doesn't need to talk to others, that's extra complexity). We may publish message brokers in the future to make leaf-to-leaf easier. Most likely powered by Redis streams, but other brokers may be done.
Telemetry (and tracing) are missing in the RFC.
Did I miss something else?
Only thing I would like to emphasize is keeping in mind dev experience. From adapting the bot to support sharding to operations and deployment, some have roots in client deployment and sharding itself. This includes security.
I plan to make sharder use sensible defaults, so it runs a reasonable level of security and user comfort. The very low-level serialized data would surely be abstracted to give the user's hooks/strategies the ready-to-use deserialized one. I also want to keep in mind that in some cases, the OS can do some of the security for us (e.g. firewalls), so there isn't really much of a necessity for a secondary layer. Of course, most users don't know how to configure the OS, so such things would be opt-out if anything.
There are also SSH tunnels which I plan to support once I learn the how.
I would avoid using ssh tunnels.
Security should be as easy as possible, and encourage safe use. This point should steer protocol choices away from unauthenticated or poorly deployed options . (I would go so far to say that tokens should ONLY be loaded from process env and discordjs should integrate secret loading with SOPS or have more tutorials on secret management. There are to many tokens on github)
The threat model for discordjs should be defined a bit.
Instead of ssh tunnels, normal VPN's (WG). Other options would be a tad better but the easier the better
Right, the VPN model might be a lot easier to adopt in large projects.
I believe we mention the usage of ENV for secrets (including Discord's token) in the guides, but as for any library, values must also be specifiable without ENV.
(Also, what's SOPS? We use dotenv or dotenv-cra for loading ENV files anyways)
https://github.com/mozilla/sops
helper for keeping secrets
SSH tunnels mean users have to secure SSH on their systems. WG and ssh both need key management, but one gives access to an entire machine and the other to a network.
Ok, it's too late for me now (2:28 AM) to understand the advantages of SOPS over... dotenv-cra or something.
I'll update the RFC tomorrow to include some of the stuff we talked about, and talk internally about the brokers.
SOPS it just encrypts files,
The ideal would be force people to only pass in the token at the commandline or heavily discourage leaving tokens around, SOPS is not really a full solution
Goctha, Have a nice night / sleep!
https://github.com/discordjs/discord.js/blob/main/packages/discord.js/src/client/Client.js#L143
https://github.com/discordjs/discord.js/blob/main/packages/discord.js/src/client/Client.js#L213
Then have the token passed in at CLI with D_T=rarsras node /dist/main.js or at the container
I just find SOPS very... overkill, dotenv-cra allows you to have .env (always loaded), .env.production (overrides for prod), .env.production.local (local overrides for prod), .env.development (overrides for dev), .env.development.local (local overrides for dev), and .env.test (overrides for Jest, Vitest...)
You write the secrets in the .local files and absolutely never upload those. Alternatively, dotenv is simpler and loads only from .env.
If they're never uploaded in the first place, they can't be stolen, so secret encryption becomes a bit unnecessary. Keep also in mind that security is good, but also inconvenient, and the average developer dislikes inconvenience.
Do not also forget that we're building a library here, not an application, we don't have a say on how users must secure their stuff, only provide them with recommendations.
That is the main point, env files are either behind .gitignore or saved in the code.
If a dev gets compromised, the token is gone, If someone gets RCE, fs is very commonly imported already, and could be taken (they are also in mem but thats another story.)
At the library level, making the developer exp as smooth as possible while pushing towards secure setups is possible.
I still think its well out of scope
In no way are you wrong about development practices, but thats what they are. Development practices are largely the responsibility of the developer, the libraries just need to make sure they arent making it more difficult
Or preventing the developer from implementing these solutions in some way
The token is already read from proc env, increasing the difficulty to make a less secure choice or making it easier to be more secure could be as simple as having another bool on a login_unsafe(token, I_secured_my token)
SOPS is an example, but having quick blurbs with (hey, you can secure the token at rest with xyz)
Yeah if you want to write a discordjs.guide page on security principles / suggestions that would be welcome
I really don't see how providing an unsafe method with a bool is in any way an improvement though
That only solves half of the security around tokens, DX still allows people to pass in as string:
https://discordjs.guide/creating-your-bot/#creating-the-main-file
It is guidance, it promotes the thought of how secrets are handled.
The guide could just promote dot env and env
We could, but you also have to remember that the guide starts with VERY beginner concepts
A lot of what we, as IT professionals with big enterprise careers, know is good practice just doesn't fully extend to a bunch of kids learning to program for the first time lmao
A=123 B=456 DISCORD_TOKEN=your-token-goes-here node index.js is already there
and the 2nd point is exactly the reason why secure practices should be promoted
At the right time though
The guide is a bit of a mess at the moment, its fragmented and doesnt flow well
But it would make sense to have a "Securing your bot before you go live" page/section
If you look at the page for config files, the only client.login() shown is with the token passed into it.
yeah
I agree, there's definitely ways the guide can be improved, but we're not about to start implementing SOPS or anything like that into the library
That could go under Useful Packages maybe https://discordjs.guide/miscellaneous/useful-packages.html
The starting developer (and almost all tutorials) will focus on that bit, heck, even I'm lazy and thow it in there
SOPS is just for at rest, it would be more like gitignore guidance
btw, that only works on Bash and I believe Zsh as well. Powershell on Windows is $Env:DISCORD_TOKEN=token-goes-here; ... iirc, so whatever it is, not only it needs to be typed all the time, it's not portable, so using dotenv (or dotenv-cra) would be more preferred
Of course they'll just go an upload that to git anyway
Which file it is doesn't matter
The important lesson still has to be "dont make it public"
env and dotenv already have examples, just not with an empty login
and again, thats why there is the side of making it easier for the "right" choices to be made and harder (a unsecure flag or i know what im doing) for discouragement
unsecure flags are bad
Because trust me, we know our community
They'll just immediately start using that because its easier
What difference does this make really, if login is empty or not?
Newcomers don't care, they'll copypaste the bool from the guide or from somebody's code and call it a day
yup
and then post a screenshot in support that shows full token
// const dotenv = require('dotenv');
// dotenv.config();
client.login();
// client.login(token);```
and while gh does scan for tokens in public repos, discord doesn't do that for screenshots
The changes to promote security would be removing the json part of the guide or having a warning, showing an empty login is possible, and in a more drastic measure, only allowing login with a token when a bool is passed in
If you do the non-portable CLI way, somebody will post a screenshot of the token when somebody asks "what command are you running?"
The former would require us to support multiple different shells, and I still maintain that passing a bool is a bad approach
you're new here, basing on your new member badge
the commandline is already an example in the guide, dotenv would not change
I really think this whole thing is a mountain out of a molehill, people are going to want to keep their secrets in a file in which they are managed
go to support channels and see how many people pass "32767" for intents
and then look at how many have literally any idea what that means
Yeah, an example nobody uses because its not an easy approach
your boolean would end up with literally the same fate
A .env file is common, and some people will use that and not pass the token to login
The token thing was an example of something simple to think about when creating the sharding system, since security is part of DX
But these examples have nothing to do with sharding
And the sharder doesn't throw tokens around
Security should be as easy as possible, and encourage safe use. This point should steer protocol choices away from unauthenticated or poorly deployed options . (I would go so far to say that tokens should ONLY be loaded from process env and discordjs should integrate secret loading with SOPS or have more tutorials on secret management. There are to many tokens on github)
This was the segway to this topic
Unless you send tokens yourself (in which case, it's your responsibility), they're as secure as they can be
Yeah, and we've all said that no
discord.js should not integrate with a secret management tool because its out of scope of an API wrapper
It's a library, not an app nor an ecosystem
and if it is, it's made into that by you, not us
so it's kind of your burden to secure it
Yeah, that is a for Hashi vault ect,
The point was to think about how they are handled
SOPS is again, more like gitignore guidance
Again, it is up to the application developer to handle it, not the sharder tool
Provided we're not like, passing a token in plain text between processes of course
Which it wouldnt
It wouldn't even pass the token between processes
Encrypted or not
They already have it in env anyways
Yes, exactly.
The point Im trying to make is that users will take the easy option, which i believe we all agee on.
So that should be a thought as well for what RPC to go over, They wont set up ssl for tls, ssh keys are also hard and require some os hardening.
The token example was to point out how people will use what they are given.
Network sharder would use encryption by default, and I'll look into how can I make a secure default that's reasonably easy to set up.
But for most intents and purposes, H2 with an auth token (not necessarily Discord's) is enough security for most
Or we can even use the Discord token to build a crypto key using webcrypto, encrypt the payload, and send it under a verification header just like Discord's HTTP interactions work. Now disabling security is one extra step, and encryption is guaranteed by HTTPS/H2/H3
I would say the 2nd idea is a bit verbose,
Sharing the token across containers / node instances is good enough.
The client has to be made at some point, having them in env is fine.
It really isn't, because users define nothing, and they also don't send the token, just a verification string that was the payload in the body, but encrypted using the token as a key. Receivers use the same key to verify it.
https://12factor.net/ is a decent frame of mind
The token is under user control, the user are in control of the infra, I don't think there is a reason to distribute secrets from the manager itself
Re-read my message, please
The token as a key?
I already stated that the technique doesn't send the token, just the payload encrypted using the token so the receiver can verify it's legit
Yeah, by default, they can make their own
I'm not sure I fully understand the intent of that
Just a fallback to make something decently secure easier than no security at all
Discord's HTTP interactions as well as Twitch subscriptions use that technique to verify it's them and not some random trying to hijack your app, I believe the algorithm used is Ed25525
I would personally let the transport layer handle that
All of those concerns are out of scope for a library. And we already brought this up.
If you develop an application you are free to construct however complicated you want it to.
We donât even do anything fancy. We just wrap a http/ws api. Whatever you do on top of that is up to you.
Itâs not like we put barricades in your way
^, as Monbrey said earlier, development practices are that, and what we can do as library developers is not make them any harder to follow
I know, this is a very long sidetrack over the original topic lol
I don't think I made the point about security, but yes, we are in agreement with that as well
Anyways, it'll be a long time since I'll have to start considering anything security, because local sharder doesn't really need it since IPC channels aren't exposed anywhere, it's more for the remote sharder, and I don't see myself doing that for the time being
And by then I may forget this entire topic, so it's best to keep the important bits we agree on in the RFC's comments
Hi, do you know how to get the person who invited a member in the guildMemberAdd event?
What version of djs are you using? #djs-help-v14 I figure? This channel is for the development release of djs
Okay, yes i'm in v14. I Ask ma question in this Channel ?
this is specifically for things diverging from stable in the dev release
if you are running stable, please use the channels for that
why this channel keep changing nanes
Bc why not?
v15?
Tomorrow

TypeScript rewrite?
Day after tomorrow
đ
I didn't saw I was on the djs-dev, sorry
If I might ask a question, in the Docs for AutocompleteInteraction there is guildId...so why was commandGuildId added, is this not duplication?
.commandGuildId
The id of the guild the invoked application command is registered to
vs
.guildId
The id of the guild this interaction was sent in
one is registered to, so if its a global command its null?
no idea why it exists, but in that sense it makes sense
ah I see yes...so a way to work out if it's a Guild/Global command I guess đ¤
pointless, but yes
Perhaps.
Welp, that's my first pass through the upgrade guide done to move to v14 (from v13) đ
Have a good one
are updateSessionInfo called every dispatch emits? (@discordjs/ws)
cool. what's new?
If you're asking about what's new in v14, #djs-help-v14 has a pin with a link to changes from v13
is this dev version basically a newer version of v14 or like v15 beta?
a newer version of v14 (14.2.1 for now ig?), and v15 soonâ˘ď¸
nvm 14.3.1 or 14.4.0 probably since 14.3.0 just got released
probably because api v9 is still supported, i think v13 will be deprecated when v9 gets deprecated
We said we werent going to drop v13 support yet
v14 gets priority new features, but if they can be backported and someone can be bothered, we'll do so until we decide to drop support
v13 is still being used by a large amount of people and we should give them the chance to move over to v14 for quite some while, without suffering bugs or missing features.
of course we recommend people to upgrade to the latest stable version (14) as soon as they can, to be future-proof
Some people (including me) are waiting for sapphire to support v14 before we update
A large amount of people using deprecated versions
But that time I don't think it's more than a year
A year of what
._.
English please
A year of what
support, We are talking about continuing to support v13
Asking cause the entire conversation doesn't mention any dates whatsoever
So what year are you talking about
Year since v14? Year until v9 gets dropped? Arbitrary day?
The versions of djs so they continue to be supported only one more year since the last one came out
v9 end
I don't want to imagine the work of those who develop discord bots alone, and they are multifunctional bots XD
idk, maybe in the next year? I think so
Both january 1st and December 31 are in next year, with a span of a full year between them.
Anyway, it still works. Until there's some actual timeframe for dropping v9 there's not much reason to deprecate v13. v14 and v13 are essentially the same thing feature wise, but that's because we wrap external API. This wasn't like that with v12 and v13, and there was no point in backporting entire interactions portion of the API to a lib version that runs on deprecated API anyway
anyone can help me
not djs
There are any projects/forks going on for the TS rewrite of djs?
Most of the modules are TS already
That will most likely come naturally as d.js becomes modularized
I'm dumb sorry, but just for clarification, for now there aren't any plans going on regarding the TS rewrite of the main library that can be contributed?
Thatâs correct
Okay, thankss
When is discord.js 13 going to not be useable?
when discord turns off the v9 api
how can i install the dev version?
npm i discord.js@dev
okay thx!
@woven grove not sure where's the proper channel for this, but deno has announced upcoming support for node packages apparently
Ngl it would be nice to see deno support with nodejs polyfills
Or even just making some parts of the system completely standards complaint so they'd work across deno and node
I know deno has some node polyfills but I don't know how good they are
Haven't used them yet
Also gotta consider that there are like, 10 different discord bot libraries being worked on for deno, so you have some competition
Half those libraries only exist because we don't in the Deno ecosystem honestly
This is fair too
So I am a little out of date here, is there a legitimate concern/thought process to move to Deno? đ¤ or drop CJS support?
Just wondering, so either I can avoid this library entirely (and fallback on the API) or find alternatives?
I feel like dropping node support would be a bad idea
There's an entire community that has been around this library with node for like, 5 years
But also cjs is quite legacy at this point imo
I mean personally I don't like Deno, I think it's a cool concept, but I just see it as the "new thing out" like everything else, Deno does not seem to have many features that make me go "wow, this is amazing".
Additionally, importing from a URL is a big fat NO NO in my company.
I agree there, but I wish ESM support was better, because import .js files instead of just the file name (because for some reason - in the last setup I had, that is how it worked with ESM and TS).
On top of that, node has been around longer than a lot of web standards, so personally I think it would be a good idea to make some parts of the system more up to date with web standards, i.e. typed arrays instead of nodejs buffers
Especially as a lot of these are being brought back into node now, I feel like there's an ability to support both, to some degree
it would be painful to support both though
I definitely agree with supporting both, or building for one, and poly-filling/transpiling for the other.
I agree that deno is a fad, however there is some merit in developing for it as we can start moving away from some of the more outdated nodejs specific tools and non standard features
Fair, but importing from URLs... đ¤Ž
package.json my beloved
I used deno for a bit when it came out, and while I loved the idea, no one will reasonably use it, nodejs has too big of a community, and deno is a big move for a lot of people
If they had a proper package manager, I would be all for Deno, because of the security things it implements.
Not being able to run installed packages against security checkers, etc, is a straight no no for any security focussed company.
Bit I also like a lot of where they have gone with deno, the capability based permissions, adhering to web standards
So I'd say seeing if supporting deno without dropping nodejs support would be nice to see, but that really depends on how much effort it is
Yeah they have some features which are great, but like if I am being honest.
When was node used for web applications?
It wasn't... it's a server-side software.
Yeah
I don't see the obsession of trying to make node (a backend, server-side software) something for the web, it's not.
A lot of the web standards are still useful on the server
What's wrong with using Request and Response and fetch etc on the server
You're flipping things around slightly to how it's done on the client side
But having a single standardized api makes it quite nice for people to transition between the two
I agree, some features, are great, fetch being added to node, was of course a huge win.
But again, as noted above, the web has restrictions that the server doesn't need.
I guess I'm not trying to treat node as a web application, I'm more trying to treat web standards as designed for more than just front end, which we're seeing more and more commonly, even with wasm and wasi
What was originally just a simple compile target on the web, now has a proper server side interface in the making
Yeah that is true, it's definitely becoming more in-depth and way more functionality, like JavaScript is becoming a very different language than it was ever intended for.
And I feel like while nodejs is nice, it's certainly behind, or to be more precise, the current community is quite behind
But I think if node was to implement the standards that ECMAScript release, (like it would be freakin' nice if they damn support decorators already - this is more of a dig at tc<insert-numbers-here>), it would be not an issue.
Nodejs has had some great improvements recently with standards
But imo I don't see them being used too much for some time
Cos everyone's used to the node way of doing things
Yeah, I mean Yarn 2 has made great strides in handling node modules much better.
Haha tc39 being stupid slow
I hate them all!!! 𤣠I just want decorators đŚ
Before anyone complains, I am aware it's an anti-pattern, but they are awesome, and are very useful, and I will die on this hill.
Composing functions is an anti pattern??
