#djs-in-dev-version

1 messages · Page 2 of 1

fervent dock
#

Have you seen python code recently

shy willow
#

Yes, according to some people, creating functions to change a function is an anti-pattern, because it changes what that function does, and makes it harder to understand, or some other stuff they said, idk.

#

Though it's nice to see in PHP8 they now have decorators 😄

fervent dock
#

I can understand an issue with mixins, decorators imo don't change a function, they just augument how it's used

#

But that's getting a bit off topic haha

shy willow
shy willow
fervent dock
#

To sum up basically what I've spent the past hour talking about, DJS should look at deno as a way to support more recent web standards, and then backport this into node, even if some of it requires polyfills to work in node, as I reckon web standards are the way to go, even on the server. Node support is still essential however, as there's just such a big community around it and djs on node currently

#

Also look into wasm instead of native modules

#

</rant>

shy willow
#

Definitely agreed, would love to see discord using rust or something under the hood (like Prisma) 😮

fervent dock
#

Native modules are just a pain to get working on some platforms, wsl and arm can be problematic, as it needs to be recompiled for every platform, but I digress

#

I need to get ready to leave for uni, good chat @shy willow

knotty plover
#

I'm confused as to why web standards are relevant to what discord.js is though. A server side API wrapper

#

Or what rust/prisma has to do with... anything here

eager ingot
#

its like to simple and the syntax is stupid

velvet jasper
#

who tf is saying python is one of the most hated languages

shy willow
copper jetty
#

everyone

shy willow
# eager ingot i dont get why people like it

Neither, I always look it, and I am aware that I am the problem in this, but I look at it as like "my first language" 🤣 I am sure it's a good language, but syntactically, I hate it 🤣

shy willow
knotty plover
#

Fair enough

shy willow
# knotty plover Fair enough

Apologies if there is a better place to have this discussion, but I couldn't find anywhere, and this channel, seemed somewhat relevant due to it being a suggestion.

knotty plover
#

Yes

shy willow
plush monolith
#

Yes its bad

knotty plover
#

We aren't dropping Node support

copper jetty
#

Why not

knotty plover
#

Because it would be super fucking dumb

mellow ember
#

djs is a main language or it's library from JavaScript language.

knotty plover
#

It's a library written in TS and JS

fervent dock
#

this is probably more of a personal opinion than anything too, but i feel like it just makes sense that rather than having say, nodejs specific buffer, and request / response apis (for http servers), we may as well already use the standardised apis that exist on the web for both front and backend

#

thats the part of deno that i like

#

and thats why i think embracing deno as a potential (additional to nodejs) target to write code for, could be an interesting idea to discuss

#

especially as nodejs seems to be moving this way at the moment too

#

completely up to you guys which way you go ofc, this is just my take on the whole backend javascript situation (also note that i haven't actually done too much server side javascript in the past year or so, so i could be missing a bit of context)

gloomy kayak
#

Pretty sure most of the users here uses Nodejs and do not have any intention to move to Deno soon, which actually doesn't seem to have so many advantages

upbeat mantle
#

why when i run yarn build it shows it can not install zlib-sync and i have this log?!

steel haven
jovial cypress
knotty plover
#

Technically a feat, since it wasn't intended to be a typeguard originally

scarlet tangle
#

does anyone know how can i actually solve this issue? or even catch this, it results in some of my shards requeing or becoming of zombie connections

undone yew
#

How do I check if the authorization I entered is in the bot?

glad vale
#

What is dev version btw

vague coyote
#

its the version that is actively being worked on for future versions?

glad vale
#

Yeah but

#

What’s the numbers

#

V15?

steel haven
#

No, it’s not a release, so no number assigned

copper jetty
#

on npm it says dev is 14.3.1

dull spruce
#

Hello, I have been a bit off since february, and I was searching about select menus being added on modals during this time and it seems so, but I can't find any info on how to do it, am I wrong? or where I can see an example? Couldnt find it on discord.js.org

vague coyote
#

select menus on modals are not a thing yet, not in djs and also not on discord

dull spruce
regal quartz
#

Hey guys, hope this is the right place to ask this question. I'm attempting to fix an issue in /ws and I'd like to build and test it out. I figured out how to build it from the docs, but I'm unsure how to move my changes over to the project where I'm testing the changes

uncut kelp
#

Might be a good idea to make a post in #992669226403909652 about the issue? Then you can elaborate on it

regal quartz
#

Will do! Thank you

slim wharf
#

Nightly build, whats that

rich cipher
#

built by all-nighters ig

formal kernel
dawn phoenix
#

i give up

#

there is no name that stops this from happening

uncut kelp
#

Lock channel

rich cipher
#

you think "nightly build" is a clear name?

dawn phoenix
#

yes, actually

uncut kelp
#

Yes?

slim wharf
#

djs-canary or djs-dev-branch

knotty plover
#

Built every night, at night time, nightly

jovial cypress
#

How long does it usually take for PR's with not much change to be reviewed?

woven grove
#

Like?

jovial cypress
#

wdym like?

dull mulchBOT
steel haven
#

This I figure?

jovial cypress
#

for example, but i was also just asking out of curiosity

upbeat mantle
#
@discordjs/docgen:build: 
@discordjs/docgen:build: ERROR: command finished with error: command (packages\docgen) yarn run build exited (1)
command (packages\docgen) yarn run build exited (1)

why!!?

upbeat mantle
gloomy kayak
#

Wdym it doesn't exist?

upbeat mantle
gloomy kayak
#

If you run the test script do you receive the error? Or you just see it in the IDE?

upbeat mantle
#

no it is the ide that the failOnWarn it is not in the function already

gloomy kayak
#

Well, then you can ignore it ig

#

Lemme check if I get it

#

I do not get any error

upbeat mantle
gloomy kayak
#

You should've changed only this

upbeat mantle
#

ahaa ok i put it wrong

#

thx

gloomy kayak
#

Np

upbeat mantle
#

what does mean by blocked?

knotty plover
#

That it cant be merged yet

upbeat mantle
#

lol

upbeat mantle
#

and what is the reasons for that

cinder wraith
#

Approving changes isn't merging, usually, but in our case we have auto merge. This label disables the auto merge

hushed glade
#

hiii

#

can anyone help me with a bot im making? 😄

#

it is a fork from github so the repository is available if that makes it easier 😄

steel haven
dark minnow
frail root
uncut kelp
#

No, but it's in /ws

frail root
#

Ahh

#

Was slightly concerned since it does disconnect my bots more often, hopefully it reaches stable branch soon

steel haven
frail root
#

Got it

cinder wraith
#

afaik we can't just randomly replace current ws with /ws in the main lib

#

also, assuming reconnections count towards identifies, it would have to reconnect you every 90s or more often for that to be of any concern at all.

#

which i heavily doubt would be the case.

foggy dome
#

👀 Is there a reason that a lot of the API types are marked as type exports only in the typings, when they're actually available as enum imports in plain JS?

dark minnow
foggy dome
#

They're not just for the docs though, you actively consume them for checking types of things 🙂

dark minnow
#

Docs I mean the autodocumentation of vscode too

patent ermine
#

Hey guys, should my bot's client id be the same as guild id?

forest elm
#

it's not

patent ermine
#

1015734069931294812 <- This is copied ID with developer setting on

cinder wraith
#

copied from where

patent ermine
#

and this is client id from application window on discord applications

patent ermine
cinder wraith
#

yeah but where exactly

patent ermine
#

uhm, on my private server? I don't know how to answer this differently

cinder wraith
#

what do you right click to get the id

patent ermine
#

right clicked the bot on the server and copied his id

cinder wraith
#

where's the issue?

patent ermine
#

shouldn't guild id and client id be different?

cinder wraith
#

but when are you even getting guild id

patent ermine
cinder wraith
#

...why would it?

#

you right clicked a user

#

not guild

patent ermine
#

uhm, the website said so?

#

aghaaaa

#

hmm

cinder wraith
#

like

#

you right click message, you copy message id

#

not channel, not guild, not user, not role, not command or virtually anythign else.

uncut kelp
#

What website?

patent ermine
#

how should I get the guild id automatically when the bot joins a new server?

cinder wraith
patent ermine
#

alrighty

#

Thanks for the assistance

jovial cypress
#

Hi, so I opened a pull request recently (https://github.com/discordjs/discord.js/pull/8565) and Jiralite reviewed it saying that InteractionResponseFields seems to no longer be referenced anywhere. Now some tests failed, because it is actuall referenced in index.test-d.ts. Below are the pictures for this. Would these three references just need to be replaced with the new RepliableInteraction type that I introduced to replace InteractionResponseFields?

The problem is that InteractionResponseFields was an interface and RepliableInteraction is a type, and I don't know exactly what this code does, so I'm not sure how to properly fix this.

#

Looking into tsd, expectAssignable should need a type, so just replacing it with RepliableInteraction would be right. I hope i'm not breaking anything

dark minnow
jovial cypress
dark minnow
jovial cypress
#

ah nvm

#

well now idk what to do though

dark minnow
jovial cypress
#

seems that everything was successful

#

all the tests

undone yew
steel haven
forest elm
#

or that receivedQueueData doesn't return a promise

undone yew
forest elm
#

is receivedQueueData an async function?

steel haven
undone yew
#

but I'm not used await

#

i fixed thanks

scarlet tangle
#

this channel is for d.js contributers?

if yes can i request a functionality
just asking dont be offended 😓 😓

vague coyote
copper jetty
#

I would prefer djs in bun

vague coyote
#

and why are you telling me that

knotty plover
#

"sry for ping" when you could literally have just not pinged

lone nest
#

@knotty plover sorry for thw ping, but pong

dark minnow
#

I've seen a lot of issues related to shads disconnecting and not reconnecting anymore in the last, I've read that could be memory not beeing available and I'm not sure about it, I've also read about it could be related to the new reconnect logic using local specific ws. I'm sending this here looking for other opinions about it

#

Some post I foud related to it

scarlet tangle
# dark minnow I've seen a lot of issues related to shads disconnecting and not reconnecting an...

well it was the same issue for me they would turn into zombie connections this might be a issue with the memory i had some shard arguments for it and it seemed my memory was exceeding and then shards would go down to fix this i couldn't migrate to a better vps or try to solve discord.js memory usage since djs has lots of validations i might break so i instead increased the shard count more than the gateway recommends and now that seems to fix it for many guilds i still face it but with a less amount of unavailable guilds

upbeat mantle
#

there are pull request has been 1 month and no one from maintainers made any reply or anything!

#

and 2 pull requests has been 1 week

dark minnow
upbeat mantle
dark minnow
#

And tbh, all of your prs have a milestone set on them

#

Meaning that in a future version they could be implemented

#

So be patience

upbeat mantle
#

ahaa ok , understood now

steel haven
knotty plover
#

You ignored the PR template on all 3 entirely

upbeat mantle
#

what if we do the collection and caching in discordjs by c++ instead of javascript, it will be very fast

knotty plover
#

And how do you plan to have discord.js do that in C++ instead

upbeat mantle
knotty plover
#

And you think that will be faster than having native hashmaps

upbeat mantle
#

because big bots that in thousands of servers it will need cache it all and will be very slow, but if we did by c++ it might be very fast

knotty plover
#

No no I want you to try it

upbeat mantle
plush void
#

use rust, it will be faster than C++

#

discord.native.js

knotty plover
#

We're a JS library of JS packages though

#

Well, mostly TS now

plush void
#

discord.ts?

upbeat mantle
knotty plover
#

I still dont know what you're basing this on

#

You want us to develop an external hashmap package using node-gyp and C++ to increase in-memory storage performance?

cinder fjord
#

the bridge from js -> native is way slower than storing in js

plush void
#

as someone who did js dev in 2015 can I just say

#

node-gyp is a trigger word

knotty plover
#

Even though the V8 runtime Javascript/Node natively uses is written in C++ anyway

plush void
knotty plover
#

Bun is 🚀 BLAZING FAST 🚀

knotty plover
#

You sure did

velvet jasper
#

What about hash maps in zig instead of rust

upbeat mantle
#

rust is not easy in coding

velvet jasper
#

Yeah C++ is much easier

upbeat mantle
#

yep

plush void
#

yeah that's why c++ is slow compared to rust

upbeat mantle
#

zig is good and it is syntax very simple and very fast

velvet jasper
#

I love C++ templates!!!1!

upbeat mantle
#

and there is something called carbon made by google it is syntax like kotlin and has same speed like c++

velvet jasper
upbeat mantle
knotty plover
#

Yes but I dont think you understand anything outside that single statement

upbeat mantle
#

i know that

knotty plover
#

Thats not what I mean

knotty plover
#

It doesnt work how you've assumed it works

upbeat mantle
#

mhmmm ok

copper jetty
#

guys why is LimitedCollection in discord.js instead of @discordjs/collection

uncut kelp
#

More context?

copper jetty
#

i wanted to import LimitedCollection from @discordjs/collection but only discord.js exports it and i dont need the whole discord.js package for my project man

uncut kelp
#

It's an extended class that's used for discord.js primarily in conjunction with sweepers. For example, LimitedCollection#keepOverLimit would not make sense in that package. It would do nothing

#

Similar to LimitedCollection#maxSize - not sure how the utility package @discordjs/collection would define that property

copper jetty
#

i used it wrong then because i dont use sweepers lol

steel haven
#

What do you use it for then?

copper jetty
#

I thought you can use them like normal collections but with limited size

dark minnow
#

There is any way to mock websockets? This could make the djs tests more automated

woven grove
#

we dont use jest though

dark minnow
#

We could mock the REST (gatewayBot) request to force the ws to use an localhost url

#

And use a normal websocket

dark minnow
#

I will open a forum post

dark minnow
#

Finally, all the prs of 7791 have been merged

dull mulchBOT
wheat pewter
#

Incredibly poggers

dark minnow
#

Probably a dumb question but, whats the use of the lazy() functions on djs?

cinder wraith
#

iirc importing optional modules at runtime

dark minnow
#

To reduce memory usage?

cinder wraith
#

to not crash when the module isn't installed

#

and not have some weird workarounds

dark minnow
#

But it is used to get internal structures too Thonk
const getCategoryChannel = lazy(() => require('../structures/CategoryChannel'));

uncut kelp
#

It also handles circular imports

rose nymph
#

sup folks, does anyone know if this guide https://discordjs.guide/ aim for discord.js v14 or v13 ?

jaunty vault
rose nymph
#

thanks!

dark minnow
nova hamlet
#

I presume messages will be postable / editable in forum threads once the lib is updated? the FAQ says bots cannot do such things

cinder wraith
#

the faq doesn't say that "bots cannot do such things". it just says that currently d.js doesn't support forums

nova hamlet
#

A GUILD_FORUM channel is very similar (from an API perspective) to a GUILD_TEXT channel, except only threads can be created in that channel; messages cannot be sent directly in that channel.

#

I understood it wrong, thank you

wheat pewter
copper jetty
#

yes

#

not in the message components section but it should

wheat pewter
#

Ty, I will make a pr

#

Should anything be mentioned about now having to write

- new Discord.MessageActionRow()
+ new Discord.ActionRowBuilder<Discord.MessageActionRowComponentBuilder>()
// or
- new Discord.MessageActionRow<Discord.ModalActionRowComponent>()
+ new Discord.ActionRowBuilder<Discord.TextInputBuilder>()
#

MessageActionRow -> ActionRowBuilder is mentioned but not the type changes

jaunty vault
#

guide is made for js afaik

copper jetty
wheat pewter
#

yes I did, thank you

wheat pewter
#

I have another (potentially stupid) question
EmbedAuthorOptions https://discord.js.org/#/docs/builders/main/typedef/EmbedAuthorOptions doesn't list out the actual properties it has. It'd be nice if it did.
Clicking on EmbedAuthorData indicates it's IconData & Omit<APIEmbedAuthor, 'icon_url' | 'proxy_icon_url'>
But APIEmbedAuthor isn't linked, so it's not obvious at all what properties are allowed or what they are called

#

Is there a way to changes this / would it be worth changing?

pseudo igloo
#

when I try and get all members in a text channel the bot only returns me and the bot IDs, not everyone in the channel. Any ideas on why it's not returning everyone?

const channel = interaction.member.guild.channels.cache.get(interaction.channelId);
channel.members.forEach((member) => {
    console.log(member.user.id)
})
hoary fox
#

fetch all members

and move to support channel bc it's not related to dev

wheat pewter
#

Is the need to use GatewayIntentBits.MessageContent new in v14?

hoary fox
#

u can even use bot without any intents so no

knotty plover
#

v14 uses v10 of the gateway/Discord API, where the MessageContent intent is enforced

wheat pewter
#

thanks

wheat pewter
lyric cargo
#

what event is fired when a forum post is archived

steel haven
upbeat mantle
#

crosspost message

plain roverBOT
#

method Message#crosspost()
Publishes a message in an announcement channel to all channels following it.

jaunty vault
#

wait wrong thing

forest spade
#

lol

upbeat mantle
#

it is not creating a crosspost it shows only crosspost

#

or i am wrong?

forest elm
#

what?

upbeat mantle
warped lake
uncut kelp
warped lake
#

the docs don't load

#

it's stuck on the homepage

uncut kelp
#

I do not have that issue. It's likely a problem with you

warped lake
#

oh wait i know why

#

fixed thanks

rough token
#

make it possible that you can use images that you use in the bot that you can use them as avatars

knotty plover
#

I'm not quite sure what you're asking - it's already possible to set the bot's avatar using discord.js

plain roverBOT
formal kernel
rough token
knotty plover
#

No, that accepts local images. Filepaths are buffer resolvable. The example even shows that

rough token
#

When u use webhooks

knotty plover
#

That one is a Discord limitation I believe, it cannot accept files

modern surge
knotty plover
#

Creating or Editing a webhook does, setting avatar on send doesn't

plain roverBOT
zinc oracle
uncut kelp
uncut kelp
#

Also where did you get that link from?

zinc oracle
kind plover
zinc oracle
#

👍

zinc oracle
#

wait I can close it nvm

kind plover
jovial cypress
#

in index.d.ts, theres a lot of ChannelTypes mentioned that don't exist anymore. Can't find the AnnouncementThread one at all anymore, others like PublicThread have been renamed to GuildPublicThread. Should I open an issue?

forest elm
#

your discord-api-types version is outdated

jovial cypress
#

how do i update it?

forest elm
#

running an install should do it

jovial cypress
#

it's my local fork of discord.js

#

not a personal project

forest elm
#

yarn

jovial cypress
#

The errors still exist sadly

forest elm
#

its an issue on your end

#

delete node_modules, reinstall

jovial cypress
#

a window reload fixed it

jovial cypress
#

im trying to do yarn test but it crashes my pc

#

i think it uses too much RAM

#

i got it working now but im not sure what im supposed to do with this error message. where in the builders folder do i look for the error?

forest elm
#

there should be more info above? prefixed with @discordjs/builders:test

jovial cypress
#

this doesn't really mean anything to me tbh

forest elm
#

does it happen consistently? have you tried running the tests again?

jovial cypress
jagged marsh
#

is there a reason why ForumChannels don't include the nsfw key?

dull mulchBOT
jagged marsh
#

perfect tysm 👍

copper jetty
uncut kelp
#

It can

#

I am literally making a pull request for that as we speak - it's just not documented nor typed to

hoary fox
#

ok but I wanted to dogeHaHa

#

yeah you did it better woah

jovial cypress
#

whenever i try to commit on my local repo rather than the virtual workspace, this happens. any ideas why?

idle galleon
jovial cypress
idle galleon
#

Then manually commit it via terminal

#

git commit -m "..."

scarlet tangle
#

isnt this for v14.4.0?

vague coyote
#

this is for the development for djs in general

scarlet tangle
#

oh ok

scarlet tangle
#

Can I help develop djs?

copper jetty
#

yes

scarlet tangle
#

Ok

scarlet tangle
#

Had some trouble install vscode 😐

upbeat mantle
#

so why all this errors and i didn't make anything in the files

forest elm
#

seems to be a problem with windows

#

use -n when committing

upbeat mantle
#

so how when i make a commit it will test discord js only not all packages!!

jagged island
#

@still shadow

scarlet tangle
#

what is the code for send a embed with my bot? without /commands

dawn phoenix
#

this channel is specifically for the 12h at-dev release, please use other support channels for v14/v13

upbeat mantle
#

in the collection of discordjs can we batching keys together instead of adding keys one by one

#

that will increase performance of caching

knotty plover
#

no it wont

#

Thats not how hashmaps work

upbeat mantle
upbeat mantle
#

we should find a method to increase performance of caching, because it kills the memory and the bot will set long time to start

#

bec, v15 we want it have good performance

knotty plover
#

This aint it chief

#

If memory is your concern, the problem is the amount of items in cache, which is why we allow caching behaviour overrides

#

The TypeScript rewrite is also looking into ways to reduce the size of the actual objects, more raw data storage and getters rather than large classes

upbeat mantle
#

like if bot in 1m server

#

i think more than 1 billion data will cache

knotty plover
#

Not if you configure the cache

#

Besides, what does that have to do with changing a Map() to a far-worse performing object?

#

Please read the link I provided

upbeat mantle
knotty plover
#

If you can find a more performant key/value lookup than the native Map, sure

upbeat mantle
knotty plover
#

Like I said, if your concern regarding caching is memory consumption, the solution is simply to cache less things

#

It doesn't matter what structure they're cached in - do it less, and make the objects in the cache smaller

#

Which is already a goal of the TypeScript rewrite

upbeat mantle
#

yep

#

there are another thing we should do

#

we should make less functions

#

i saw that discordjs has a lot of functions and that will decrease performance

knotty plover
#

I really have to wonder what you're basing this on

#

Yeah a library that doesnt do anything is very performant. The problem was functionality all along! Doing things is slow, doing nothing is instant!

upbeat mantle
upbeat mantle
#

there is a solution ofcourse

#

anything has solution

#

so yeah how can i find the design of discordjs?

knotty plover
#

Not when you're inventing the problem

upbeat mantle
dark minnow
knotty plover
#

Go for it

silent hedge
#

so, how are you going to lookup elements from the array based off of the key?

lavish dagger
#

💀

woven grove
#

Just stop

#

Your improvements are no improvements

#

It’s pointless

tulip tendon
#

Hi I have this issue with the bot where I gave him all of the GateawayIntents needed and when inviting him I gave him administrator perms=8 but I still get this error for trying to change usernames

#

This is how I define my client

lavish dagger
#

how to learn discord js

woven grove
#

Wrong channel you 2

lavish dagger
woven grove
#

In the support category like everyone else

#

Ok?

#

It’s still not better

#

What performance lol

lavish dagger
woven grove
#

Inserting items?

silent hedge
#

and now lookups are O(n) yepge

woven grove
#

Inserting items is a one-time deal usually. You aren’t inserting a million items constantly

#

No, reading is O(1)

#

How faster would it be lol

dawn phoenix
#

there really is nothing to explain

#

you don't seem to understand the fundamental idea of a hashmap

woven grove
#

It won’t need fast inserting items

silent hedge
#

or whats actually slowing down your bot's startup

woven grove
#

It also won’t insert 100 million of items

silent hedge
woven grove
#

It’s not 100 million still

#

And what do you save by this? 1-2s when starting your bot?

#

All of this for 1s?

#

You aren’t making sense

knotty plover
#

In summary, no, literally nobody agrees

#

discord.js is not a framework, something like Sapphire already exists to make that easier

dark minnow
#

() => (message) => message.author.id === message.client.user.id The double function is intended in the sweeper options?

#

Bc that's how the types define it

#
// How it is
export type GlobalSweepFilter<K, V> = () => ((value: V, key: K, collection: Collection<K, V>) => boolean) | null;
// Shouldn't be
export type GlobalSweepFilter<K, V> = ((value: V, key: K, collection: Collection<K, V>) => boolean) | null;
steel haven
#

Or even use values fetched from database or whatever you want to influence the current sweep run

dark minnow
#

Got it

#

Thanks Qjuh

restive summit
#

from a bot dev perspective anyone know how the dyno custom pfp works or any other similar bot, probot/moo6 etc? does it create a new shard bot instance for every server that wants one?

dawn phoenix
#

not even shard, it needs to be a custom bot, which requires the end user to pass you a token to use, as there is an application limit
i - too this day - have no idea how mee6 gets away with this. generally tokens should not be advised to share with other people
apparently being famous helps

knotty plover
#

Oh so they run the bot on your app token? Wow lol

dawn phoenix
#

yep

#

that is how that works

jaunty vault
knotty plover
#

That also seems like it circumvents verification requirements for being in that many guilds Thonk

dark minnow
#

True

#

How they not get rate-limited per ip is my question

cinder wraith
#

the same way they wouldn't if it wasn't a "custom" instance

knotty plover
#

If people are providing their own tokens, for applications that are only in a single guild, there's no verification needs for applications running on that token to have access to GuildMembers, GuildPresences etc

#

I mean Mee6 is probably verified anyway of course

cinder wraith
#

oh, limitations, not requirements

knotty plover
#

Yeah thats probably what I meant

sand basalt
#

Is there a change log for what is ** actually new** in dev version from stable ?

craggy kindle
#

I think you got the thing other way around (14.5.0..main)

uncut kelp
#

Edited

jaunty vault
#

What's the best way to "bump" a pull request that hasn't been reviewed yet? Is it better to just wait?

dark minnow
#

Iirc, pull requests are organized by id so generally it won't be possible to bump a PR without re-opening it

cinder wraith
#

by default, yes

#

but most people use filters and sort

knotty plover
#

You probably won't get a faster review

#

Maintainers usually find time to go through and review everything pending for them at once, not just some bumped one

jaunty vault
#

👍

hasty moat
#

updatePlayerCount: (client, seconds) => { const interval = setInterval(function setStatus() { status = “status”

#

The status = “status” is deprecated

#

I can’t find the updated version could someone point me in the right direction?

#

Sry if this is the wrong channel for this question

cinder wraith
#

how can assigning to variable be deprecated

hasty moat
#

It says status is deprecated. ts(6385)

#

It works but I just don’t feel safe using deprecated stuff in my code

cinder wraith
hasty moat
#

And how do I not assign to that?

#

I’m confused asf

ashen pawn
#

why is there no "syncId" in the Activity class anymore, even though the sync_id is being sent by the gateway?

hoary fox
#

idk if it is
probably not

dull mulchBOT
forest elm
#

discord.js doesnt support undocumented features

woven grove
#

its merge ready then

jovial agate
#

Does discord oauth support some kind of events? I want to be notified when someone changes their username or profile picture

woven grove
#

nope

#

you can fetch their profile every now and then when they use the site

#

¯_(ツ)_/¯

jovial agate
#

I guess most people who use my website are prob gonna also be apart of my discord server

#

could use it in combination with a bot I guess

woven grove
#

seems a bit much for such a thing

jovial agate
#

Yea

woven grove
#

they wont have the website open all the time will they

#

just re-fetch their profile when they visit the site

jovial agate
#

Its jellyfin

#

wanna sync their profiles

woven grove
#

ah

jovial agate
#

making it so they can login with discord oauth

woven grove
#

hmmmmm

jovial agate
#

Would prob be smart to have a bot

#

cause than I can make the oauth only work if they are in my dsicrod server

woven grove
#

but then you have reliance on it

jovial agate
#

exactly

woven grove
#

I guess

jovial agate
#

wont get weird people registering on my jellyfin

woven grove
#

i mean you can also check their guilds

#

soo

jovial agate
#

true

woven grove
#

without a bot

#

sooo idk

jovial agate
#

Ile see how it goes

#

maybe implement both and see which I like

woven grove
#

just use plex

slate needle
#

does v13 @Dev have forum support?

jaunty vault
#

v13 has a pr for backporting forums currently in progress

dull mulchBOT
slate needle
#

👍

uncut kelp
#

Version 14 already has it, just a fyi

brave beacon
#

By the way, why are the form fields always set to "Required" by default? I don't really find it logical when the slash command builder doesn't set the options to "Required" by default 🤔

steel haven
#

I do, because TextInput get always shown to the user, while slashcommand options only appear if you explicitly select/type them in your chat input. Not saying that's the reasoning behind it, just that that's my stance on it

brave beacon
#

Oh okay, I see

hoary fox
dull mulchBOT
jaunty vault
#

iirc npm i lets you install directly from GitHub

hoary fox
#

as testing okey
but what in pr

jaunty vault
dark minnow
#

Select Menus V2 will be a breaking change?

jaunty vault
#

Yeah I think so. discord.js SelectMenuBuilder probably will be changing its name to align with the new selects. I'm guessing it would change to something like StringSelectMenuBuilder

#

Maybe discord.js can implement it without changing its name until v15

hoary fox
hoary fox
#

but i still cant install the api-types

dark minnow
rain bramble
#

It's still left, but deprecated

hoary fox
dark minnow
#

For some reason, npm does't know how to install the branch

#

git clone -b new-selects https://github.com/advaith1/discord-api-types.git ./node_modules/discord-api-types && cd ./node_modules/discord-api-types && npm i && npm link This should work on bash

hoary fox
#

👌🏼

#

thx

jovial cypress
#

Is someone already working on the new selects?

knotty plover
#

Yeah

cursive raft
#

When will v12 be disabled?

rain bramble
knotty plover
#

It kinda already is broken, it can't support text-in-voice

rich cipher
#

When select menu types?

uncut kelp
#

Whenever someone makes it

rigid haven
onyx perch
#

...

tidal quest
#

Does djs support the automod events yet?

dull mulchBOT
hoary fox
#

mhh missspell

dull mulchBOT
hoary fox
#

^ so it's in progress

tidal quest
#

Alright

open crystal
#

atleast imo, bc all it has rlly is forum support and renamed classes and functions

cinder wraith
#

while true, it won't be maintained forever. additionally, it's using API v9 as opposed to v14's v10, which inherently means earlier drop from discord's side (assuming they don't decide to have any v10 exclusive features)

woeful pollen
#

is there a pr for new select menus yet

rigid haven
#

im working on it

snow crow
#

I think you should open a draft pr so that people know about it on the discord.js github (and wait for discord-apt-types to include them soon)

uncut kelp
#

That's not a bad idea

hoary fox
velvet jasper
#

Wdym typeguard it as normal

hoary fox
jovial cypress
hoary fox
velvet jasper
hoary fox
#

the thing is that we want to make one class

knotty plover
#

uhh, but they arent the same

velvet jasper
#

What mon said they each have different resolved data fields

#

I wouldn’t advise making them one class but instead having be a part of the same base class

hoary fox
#

hmm, ok

#

but what with braking changes?

knotty plover
#

Wouldnt they just be new classes? What would you be breaking?

hoary fox
#

okey

jovial cypress
uncut kelp
#

In /rest, why?

jovial cypress
#

but where exactly? i can't find it

#

the reason why is kind of complicated but it relates to #1021512891385532506, I talked about how I never had ECONNRESET errors before but ever since switching to v14 I get them all the time. I actually found one single instance of getting an ECONNRESET error before, and instead of just pointing to node:internal/stream_base_commons like all the newer ones do (and yes i could confirm that these errors originated when making a rest request to discord, like interaction.reply etc), it pointed to this exact line of code. except, this is v13.8 and not v14.x, so i would like to know how this is handled in v14

jovial cypress
#

okay, so here's my train of thought:

if a rest request (like interactions.reply) is leading to an ECONNRESET error, but with a non-existent stacktrace other than node:internal/stream_base_commons, where before the only time this occurred it did actually point to this place in the code, it makes me feel like this error is not actually getting caught. so instead of djs counting retries and then throwing that HTTPError after some time, it is not even retrying because something gets hung up somewhere. I would have to dig deeper into the code to really know if what im saying even makes sense here, but that's the only way this makes sense to me

uncut kelp
#

Hmm I've not experienced an error like that before in the post

jovial cypress
#

well, im experiencing it all the time right now. the issue is that i updated bot 1 to djs 14, and only ever since have this specific error daily. meanwhile, bot 2 is running without ever having that issue.
few weeks later, i update bot 2, now it has the same issue

#

my other bots who are all still on djs 13 do not experience this issue

#

i am really confident that this must have something to do with djs 14, otherwise i have no idea how it could go from never occurring to occurring daily for two bots independently from each other starting at the day that i update it to djs 14

jovial cypress
#

@uncut kelp I tried looking into how request (L308) works, but i'm not entirely sure:
When would an error be thrown and caught by the catch block (L309) vs when would it return Dispatcher.ResponseData?

In the old version, it called request.make() which came from the APIRequest class which used node-fetch. I didn't find a reference to undici which is where the request in the new version is called, so something changed there i guess and i don't know how different it is.

point is, in the old version, any failed request would be treated the same, giving it some retries before calling HTTPError. In the new version, caught errors only get retried if it is an AbortError, and once done, it just throws the raw error rather than using HTTPError (L316).
And apparently failed requests (like status 500) don't cause a rejected promise, but rather go through an then get caught with an HTTPError when necessary (this is the line you provided to me)

#

So, what is the likelihood that because in line 316 a raw error is thrown rather than it being packaged into an HTTPError object, that this is where the ECONNRESET problem that I am having originates? If so, then a second issue arises, namely that this error never gets retried, meaning that if there is a connection issue once, it will just stop working, rather than retrying in case the connection issue has resolved

#

And then this would explain why this issue suddenly starts popping up this much for me: Maybe the connection of my provider is just spotty enough to sometimes cause a split second connection issue, and with v13 I never noticed this because it would just retry and then work. And in this version, it skips the retry, which makes that error appear far more frequently

#

And assuming that I understood the code correctly here, would this be considered a bug? Since in cases like mine, where retries prevented this error from appearing basically ever, the lack of retries in the new code means that the error appears more often. So it would be cool if another if-case was added that would ensure retries were performed before giving up

#

And also maybe it would be a good idea to transform the error into an HTTPError or something to ensure an accessible stack trace is added

tawdry mantle
#

undici request is significantly lower level than fetch, though fetch and request should only fail in the same places. The only time request fails (outside of an abort error) is due to a system error, most of which should absolutely be fatal to the request cause there's no chance of recovery. ECONNRESET is kinda interesting in that it often is recoverable (and something I often special case). Additionally, the stack direct from the error should be more meaningul than anything we construct at that point, so I'm unsure what you mean there

TLDR: Throwing the caught error there is the correct behavior because the error occurring is not an HTTP Error, however, ECONNRESET should be special cased. I'll make a PR

snow crow
#

and in a semver major should the propety be removed or kept as can be useful in some usecases

knotty plover
#

Already in a PR

snow crow
#

or sorry

knotty plover
#

Which property are you referring to?

snow crow
#

the .ephemeral

knotty plover
#

That's being kept, doesn't hurt to have

snow crow
#

as it was added for that i thought

#

ye nice

knotty plover
#

The Error constant is being removed though

#

Its technically major but will probably be released as a patch since it's a bug fix to an upstream major

snow crow
#

👍

#

thanks for the reply 🙂 (and sorry for not checking for a pr again- checked a while ago but only commented now)

knotty plover
#

No problem

dull mulchBOT
jovial cypress
#

can you notify me when you made the PR so i can enable updates for it and know when it got merged and stuff?

#

and the thing i meant with the stack trace is that my ECONNRESET error basically doesn‘t have a stack trace other than node:internal. That means that it is really difficult to pinpoint exactly where it comes from. I guess it is not necessary to make a more meaningful stack trace, though.

dark minnow
jovial cypress
jaunty vault
#

I'd like some opinions here
https://github.com/discordjs/discord.js/pull/8773#discussion_r1001164364
I'm wondering if it should actually go in the options. If so, would it be a new type name, or just an intersection type? If it's a new type name, what should it be?
Also, if it's going into the options, would it make sense to do the same with the Webhook methods?

rain bramble
#

Since it would be a breaking change I think we should leave it as a separate parameter for now and move it to the options in v15 or TypeScript rewrite with other parameters that should be moved to.

jaunty vault
#

What about the options in the pr? It wouldn't be a breaking change in that case

rain bramble
#

I think we can move it and create InteractionEditMessageOptions type

jaunty vault
#

It would also be weird for the other methods that would get this change
for example, fetchReply({ message }) or deleteReply({ message }), despite it being the only argument

forest ruin
#

What Message Components are allowed in a modal?

hoary fox
#

only text inputs for now

forest ruin
#

thanks!

scarlet tangle
#

LMAO, WE NEED THIS IN v14

formal kernel
#

it’s pointless 🗿

dull mulchBOT
formal kernel
#

what’s the point in deleting ephemeral responses when you can just dismiss them

jovial cypress
#

i don't think this is the place to discuss that? maybe you can open a ticket @ https://dis.gd/contact if you want them to remove it

formal kernel
#

nah i have nothing against it, just confused

dawn phoenix
#

it's changed API behaviour, it will be added in a patch or minor release, although technically breaking
if it makes sense or not is indeed irrelevant, you can do it, d.js will support it

rain bramble
valid sparrow
#

I'd like to report an unexpected behaviour in v14.5 stable version
interaction.member.permissions.has("ADMINISTRATOR") works when the user has admin permission but crashes when it doesn't. I believe it should also crash when the user has the permission as a different method such as interaction.member.permissions.has(PermissionsBitField.Flags.Administrator) should be used.

uncut kelp
#

You should make an issue

uncut kelp
# valid sparrow I'd like to report an unexpected behaviour in v14.5 stable version `interaction....

This was the error I received:

node:events:491
      throw er; // Unhandled 'error' event
      ^

RangeError [BitFieldInvalid]: Invalid bitfield flag or number: ADMINISTRATOR.
    at PermissionsBitField.resolve (/Users/jiralite/Documents/GitHub/Caelus/node_modules/discord.js/src/util/BitField.js:168:11)
    at PermissionsBitField.has (/Users/jiralite/Documents/GitHub/Caelus/node_modules/discord.js/src/util/BitField.js:60:28)
    at PermissionsBitField.has (/Users/jiralite/Documents/GitHub/Caelus/node_modules/discord.js/src/util/PermissionsBitField.js:92:82)
    at Client.<anonymous> (file:///Users/jiralite/Documents/GitHub/Caelus/sourceJS/14.js:11:29)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Emitted 'error' event on Client instance at:
    at emitUnhandledRejectionOrErr (node:events:394:10)
    at process.processTicksAndRejections (node:internal/process/task_queues:84:21) {
  code: 'BitFieldInvalid'
}

As far as I can tell, nothing seems amiss here. What error are you getting?

knotty plover
#

Yeah that's the expected error

valid sparrow
#

but it works when the user actually has the administrator flag

uncut kelp
#

I cannot reproduce that. The error above is returned on administrators and non-administrators.

valid sparrow
#

so it only becomes valid if the user has the flag

#

weird. Maybe it was a 14.5 error that got fixed in 14.6

uncut kelp
#

Actually the error indeed does not happen when checked on administrators - had my permission check-up wrong there

valid sparrow
#

So would you consider it unexpected behaviour in order to open an issue on github? (I would)

uncut kelp
#

No

knotty plover
#

Its probably just because of how checkAdmin works

uncut kelp
knotty plover
#

I think it ignores input and checks for Administrator and returns true

valid sparrow
#

I mean it should at least warn the user that they are checking the permissions wrong

knotty plover
#

If you turn the checkAdmin option off it'll probably still error

valid sparrow
#

So should I report it (or anyone else, I don't care) or just ignore it?

slate breach
#

heyoo

#

I have an stupid* question here 🙂

#

can we get the roles that a user has on a different discord guild? where my bot is not in

tawdry mantle
jovial cypress
#

amazing :D

dull mulchBOT
tawdry mantle
#

@jovial cypress

jovial cypress
tawdry mantle
#

its a subpackage, so it could be released sooner than that

jovial cypress
daring skiff
#

what is this channel used for can anyone explain ?

knotty plover
#

Discussing the development of discord.js or seeking support in using the in-dev version

daring skiff
#

ok

jovial cypress
#

Would it be possible at any point to do things such as fetching/editing/sending a message without having the channel be fetched? Aka do it via the channel id?

idle galleon
#

Fetching w/o the channel being fetched?

#

You could do that w/ rest

jovial cypress
#

fetching a message without having the channel be fetched, correct

plain roverBOT
idle galleon
#

And use /types to get the routes

jovial cypress
idle galleon
#

You would have to manually instantiate the structures

jovial cypress
#

for example, if i want to edit a message, and i want to edit the components specifically, discordjs won‘t do that conversion stuff for me. i have to make sure everything works myself, and possibly miss a bunch of edge cases and introduce bugs when discordjs literally has everything in place already, just requiring a channel object where it isnt necessary

idle galleon
#

Builders exist

jovial cypress
#

again, it is a lot more work than just having a built in method for it

#

why not just have that? it would be much more safe in terms of bugs and stuff

#

and it would require less API calls

idle galleon
#

You can prob make a partial text channel yourself

jovial cypress
#

wdym

jovial cypress
#

my main issue is that i feel like it could make things unnecessarily buggy. yalls rest stuff isn‘t very well documented either

idle galleon
#

Bc d.js was designed to be object oriented, not functional

jovial cypress
#

when i asked about rest in #djs-help-v14 i got sent away. so basically, im not getting any form of support for this, basically no documentation, and its not added natively either

jovial cypress
#

it‘s not like its just for convenience. it‘s for a valid reason, saving both me and discord resources

jovial cypress
#

while feeling safe that it will not introduce critical bugs due to a lack of knowledge/understanding

jovial cypress
idle galleon
#

You said docs

#

client.rest will alr be a configured Rest instance

jovial cypress
#

2 examples isnt docs

idle galleon
#

You want a guide for rest?

cinder wraith
#

docs !== guide

jovial cypress
#

i dont want a guide

idle galleon
#

Well, the docs tells you the methods on the Rest class

jovial cypress
#

i want docs, but two examples isn‘t docs. for example, i tried finding out what it will return when i get channelid/messageid. it‘s an ApiMessage object, but i didnt find any documentation about this

idle galleon
#

And I think it’s fairly straightforward. rest.put(route, restOptions)

jovial cypress
#

and its not typed

knotty plover
#

Correct, its not

idle galleon
#

That’s why we have -types

jovial cypress
#

I wouldnt know where to look on how to create a message object from that that just misses the channel object but is otherwise functional in terms of the .edit function etc. And since even just asking for the type is apparently outside of the scope of this server, how am i supposed to find that out without any docs on it

jovial cypress
jovial cypress
knotty plover
#

discord-api-types.dev

idle galleon
#

discord-api-types provides all of the types used by Discord for ws and rest

knotty plover
#

REST is a basic HTTP wrapper around the API, not a fully typed interface

#

Thats what discord.js is

#

You're expecting the high level QOL that discord.js provides while trying to use a lower-level wrapper

jovial cypress
# knotty plover Thats what discord.js is

thats why i don‘t understand why discord.js, a fully typed interface, doesn‘t have a function to fetch, edit and create messages without having to fetch a channel first when it‘s not required by the API and would save on API calls

knotty plover
#

It does

jovial cypress
#

what would that be

knotty plover
#

Well, actually no

#

I misread

#

types !== functionality though

jovial cypress
#

what do you mean?

knotty plover
#

It doesnt have that because its object oriented

#

channel.messages.edit exists to allow you to edit messages without fetching the message

knotty plover
#

Its not built for functional programming, no

#

But a pure REST wrapper is not designed to be fully typed

jovial cypress
#

exactly, i‘m not asking for rest to be typed

#

im asking for that object oriented wrapper to have some functional programming where it makes sense due to it saving API calls

#

i just want to save API calls, not end world hunger

knotty plover
#

Thats not the design paradigm though

#

The way to save API calls would be for the channels to be in cache

#

Thats how discord.js is designed

jovial cypress
#

i always thought functionality is more important than design

knotty plover
#

Then I disagree

#

You cant throw whatever functionality you like at something and compromise the design in the process

jovial cypress
knotty plover
#

A - you clearly do need it
B - theyre cached by default if you have the Guilds intent, Discord sends all the data for them in the initial payload

jovial cypress
jovial cypress
knotty plover
#

Massive bloat keeping that many messages in another place

jovial cypress
#

or rather object which has cache + those things

knotty plover
#

We've done a fair bit to try to remove that sort of double-caching

jovial cypress
#

it feels like if something is designed in such a way that a useful functionality isn‘t implementable in any way that follows the design, then the design is flawed

knotty plover
#

I mean this is one example but there are probably dozens of others. We can't start implementing shortcuts on Client for every route that takes multiple parameters

#

Just so you dont have to fetch the first one to then make a call for the second

#

If you want more direct access to the API, thats why REST is provided. REST is that lower level shortcut to do whatever you want

#

But you seemed to have an issue with that too

jovial cypress
#

im having a massive problem with having to fetch channels especially at bot startup where it wouldn’t be necessary and i am going to have to resort to having to write my own little solution for it but it feels like im not getting any support here for no real reason.

cinder wraith
#

why do you need to fetch the channel?

#

are you clearing cache?

knotty plover
#

You're getting plenty of support and arguing with every solution provided because its not precisely what you wanted to hear

#

Are you not caching channels, or doing something that cant wait until the ready event has fired?

jovial cypress
# knotty plover But you seemed to have an issue with that too

my issue is that i

  1. werent allowed to ask what type i get from a rest request in here, apparently
  2. didnt really feel like i had access to appropriate documentation
  3. and as a result don‘t really know how to implement this myself without introducing a whole lot of bugs for no reason
jovial cypress
cinder wraith
#

if you were told by "random people" in #djs-help-v14, then most likely they are clueless and just seen that you didn't ask about discord.js directly
so you can mostly ignore that, and it definitely wasn't "not allowed"

knotty plover
#

And these things must be fetched prior to the ready event?

#

Yeah there is a problem with dumbasses jumping at every possible opportunity to send people elsewhere instead of using their brain, I'll agree with you on that

jovial cypress
cinder wraith
#

so instead of waiting couple seconds for discord to send you the channel, you will instead fetch the channel and complain that you have to fetch the channel?

#

seems suboptimal

jovial cypress
#

why would discord send me the channel after a couple of seconds? what channels is it sending, why, and how do i know which channels it is sending?

cinder wraith
#

because you just restarted the bot and it is in process of identifying?

jovial cypress
#

but why would it send a bunch of channels

cinder wraith
#

which means that discord will send you all guilds, their channels, roles, permissions and a bit of members?

knotty plover
#

If your bot has the Guilds intent

jovial cypress
#

it does

knotty plover
#

The identify payload it sends you includes all guilds, channels and roles

#

Everything will be cached

#

Thats how the initial gateway connection works

jovial cypress
#

interesting. then i guess i just need to move stuff around to make that work

#

personally i thought channels were cached when events like messageCreate and interactionCreate were fired

knotty plover
#

Sorry if I wasnt clearer on that earlier when I was talking about design. discord.js is a more memory-heavy library compared to some others because of its caching, but thats the design that allows for you not to have to make as many API calls

#

The channel is already cached (except DMs, theyre an exception), but we do cache the message, user and member when we receive their data with those events

jovial cypress
#

okay, well that‘s good to know. i have disabled much caching where i absolutely do not need it but i don‘t disable channel cache for obvious reasons. i didn‘t know it was provided with the ready event, but if that is so this resolves my issue as long as i just do it after the ready event

wise crystal
#

how can I do a role reaction pls, thanks for your help

steel haven
steel haven
marsh matrix
#

Hey, was told I should bring this here

Is it intended that the default functionality of escapeMarkdown() changed in 14.6.0? (https://github.com/discordjs/discord.js/pull/8701)

Before, escapeMarkdown("test_name"), would return test_name
Now, it returns test\_name

steel haven
marsh matrix
#

Do you know if it's likely to be reverted? (at least the likely unintended part)

steel haven
marsh matrix
#

I'll leave it to the pros, I know far too little about that 😅

rigid haven
#

ahhhh I see what happened there

#

I think I see at least

rigid haven
#

I'll make a PR as soon as I finish my lunch

shrewd aurora
#

@rigid haven can you ping me when you create the PR? I'm currently hard-coding "escape: false" in my project but will remove once your PR is merged

rigid haven
#

ah yes

rigid haven
shrewd aurora
#

Thanks for the notification!

frigid sleet
#

Am I right in thinking that the role and channel select menu builder will come in the next d.js update?

hoary fox
#

also there is user and mentionable menu
but yeah

dull mulchBOT
frigid sleet
hoary fox
#

k

scarlet tangle
#

will djs v15 store cache data ids in bigint?

uses way less memory also like presence stuff statustype
as a bigint status type so you can resolve it like with permissions?

rain bramble
rain bramble
idle galleon
#

Status type is string bc that’s what Discord uses for presence.status

#

It would add unnecessary complexity internally, similar to how channel.type was before v14

#

It also doesn’t make sense to make status a BitField bc it’s not possible to have multiple statuses at once. At most, you can have it in different devices but that’s handled differently

rain bramble
#

Status can be an enum

idle galleon
#

It is an enum

rain bramble
#

But as strings, he wants it to be a number or a bigint

idle galleon
#

Maybe I misunderstood what they meant by their second statement

resolve [status type as a BigInt] … like with permission

#

Yea, we alr have a string enum for status type

idle galleon
scarlet tangle
#

and then u could do stuff like StatusType enum

scarlet tangle
#

to save resources

idle galleon
scarlet tangle
#

ok

idle galleon
#

Basically the same problem as channel.type did before v14 fixed it

woven grove
#

Honestly doesn’t save that much

fringe cypress
#

when trying to run the dev version i get the following error in the file

hoary fox
rain bramble
#

I have answered in #djs-help-v14.
Add the @dev tag when installing

fringe cypress
#

did not help

tall verge
#

uninstall @discordjs/builders, it is already installed by default in discord.js

tall verge
#

ah

fringe cypress
#

still the same

tall verge
fringe cypress
#

weirdly enough i dont even use that file

rain bramble
fringe cypress
#

so the dev version is not usable atm?

idle galleon
#

Run npm why @discordjs/builders

fringe cypress
#

i uninstalled the dev version again

idle galleon
#

You cut off the rest of the output

fringe cypress
#

i didnt

#

thats all

outer bane
#

seems like the dev version of djs does not depend on the dev version of the other packages, you can use yarn resolutions or npm overrides

fringe cypress
#

i have no clue how to MildPanic

outer bane
#

yarn:

"resolutions": {
    "@discordjs/builders": "1.4.0-dev.1667347887-5152abf.0"
}

npm:

"overrides": {
    "@discordjs/builders": "1.4.0-dev.1667347887-5152abf.0"
}
fringe cypress
#

in my main projects package.json or the one of discord.js

outer bane
#

your file

fringe cypress
#

Pog works for npm

#

tested it for ya

#

thanks

feral island
#

does dev version have the new select menu types, like role channel?

jaunty vault
#

yes

feral island
jaunty vault
#

npm i discord.js@dev, as said in the topic of this channel

feral island
feral island
#

thank you so much!!

#

you helped me so much

#

why am i getting this?

jaunty vault
feral island
jaunty vault
#

you shouldn't have rest or discord-api-types installed separately

feral island
#

ah, then how?

jaunty vault
#

it comes with d.js

feral island
#

do i just remove it

#

O!

feral island
#

do i remove "discord-api-types": "^0.37.16" ?

jaunty vault
#

yes

feral island
#

o

feral island
#

do i need that

jaunty vault
#

it comes with d.js
so you don't install it separately

feral island
feral island
silent hedge
#

as far as I can tell this is because we needed to make changes to builders, and while theres a dev release of that as well, it seems our mainlib dev releases don't depend on the sub-pkg dev releases, if that makes sense

feral island
#

that makes no sense to me

#

how do i fix it?

silent hedge
#

tldr the d.js dev release you are using doesn't depend on the needed dev builders release

feral island
#

hm.

silent hedge
#

its an issue with our release cycle; it's not something you can really fix

#

we need to look into it

#

cc @woven grove

feral island
#

cc?

feral island
woven grove
#

You can just use resolutions

silent hedge
#

thats quite a hack though meguFace

feral island
#

what? sorry

silent hedge
#

couldnt we find a way to just make this work

woven grove
#

Not a hack really

#

Using dev can def require that

#

Not all packages will be ready for release all the time

silent hedge
#

fair enough

feral island
#

wait

woven grove
#

Just check pins

feral island
#

so what do i do

feral island
feral island
feral island
#

why am i getting that?

hoary fox
feral island
#

ah

#

action row?

jaunty vault
#

yes

feral island
#

kk

feral island
#

but reply with actionRow

jaunty vault
#

try it ._.

feral island
#

works

feral island
#

how do i get the role the user picks?

jaunty vault
jaunty vault
#

exactly that?

feral island
#

is there any examples? or is it just console.log(interaction.roles)?

jaunty vault
#

yes, that should log a collection of roles

feral island
#

kk

ebon sleet
#

thanks @jaunty vault ❤️

feral island
#

@jaunty vault it logs "undeined"

 interaction.reply({embeds: [embed], components: [actionRow]})
       
const collector = interaction.channel.createMessageComponentCollector({ componentType: ComponentType.SelectMenu, time: 15000 });

collector.on('collect', i => {
        i.reply({ content: `This select menu isnt for you!` ,ephemeral: true });
});

collector.on('end', collected => {
     console.log(interaction.roles)
});
jaunty vault
#

did you mean i.roles in the collect event? I'm guessing that interaction isn't the select menu interaction

feral island
#

what do you mean?

jaunty vault
#

I didn't say that?

feral island
#

what do you mean then?

jaunty vault
#

You are using the wrong interaction object

forest elm
#

you should get the role select menu interaction from the collected parameter in the end event

feral island
#

ahh

#

collected.roles?

jaunty vault
#

well collected is a collection

feral island
#

so then how?

forest elm
#

you can use collected.first() or something else

plain roverBOT
#

class Collection
A Map with additional utility methods. This is used throughout discord.js rather than Arrays for anything that has an ID, for significantly improved performance and ease-of-use.

feral island
#

kk

ebon sleet
#

why this color not green xd

jaunty vault
#

did you try restarting your ide

ebon sleet
#

no

forest elm
#

discord.js is not responsible for your editors language server/theme

#

that is assuming you're using the right dev versions

feral island
#

also when i click on somthing it doesnt do i.reply

silent hedge
#

because your filter isnt right

forest elm
#

seems like you're not using the correct componentType

feral island
#

ah

feral island
forest elm
#

RoleSelect

feral island
#

kk

feral island
#

👍

ebon sleet
#

why im getting this error as soon as i start the bot in dev version

feral island
ebon sleet
feral island
#

i had it too

silent hedge
#

unlucky

feral island
#

add it to package.json

ebon sleet
#

what should i do

feral island
ebon sleet
feral island
#

yes

feral island
ebon sleet
feral island
#

unlucky.

#

I dont know do you have discord api types installed?

feral island
#

well i dont know.

knotty plover
#

These are things you really should be able to know/do if you intend to use code that isn't verified and ready for a stable release

dawn phoenix
#

you should probably not use in-dev versions if you can't tinker around - this is not release-ready plug&play - that's what stable releases are for

feral island
#

Who are you talking to?

feral island
#

me @ebon sleet or?

ebon sleet
#

unlucky, i will wait :/

dawn phoenix
#

everyone that applies to, really

feral island
#

o okay!

dawn phoenix
#

if you want things to just work™️ - indev is not the version for you

ebon sleet
#

well when will the new version come

jaunty vault
#

when it's ready

dawn phoenix
#

when it's ready

feral island
#

isnt that it?

jaunty vault
#

Think that's dev version release

ebon sleet
#

but it show 2016

feral island
#

o 2016 lmo

dawn phoenix
#

that's when @dev releases from the #main branch

feral island
#

ah ok

dawn phoenix
#

it's about time, not date

ebon sleet
#

ok thx