#archive-library-discussion

25085 messages · Page 26 of 26 (latest)

opaque vessel

If it's a number, leave it as it is, else, it's a string, so convert it to a number. And then the default type is a text channel

Then it's sent to the API

pallid ridge

ill make a pr later

mighty bough

why?

copper garden

Bc it’s a bug?

mighty bough

oh wait I missed a few messages

copper garden

v13 should still support string for channel.type

alpine bough

hey @tacit crypt (think its better to talk here? about discord-api-types#502)
even tho the docs says it, i tested myself and it doesn't work, you can test in this url: https://cdn.discordapp.com/banners/277496071897481216/a_114df53592ae20557666470b5e741966.gif?size=

cc @outer raven (you were also in the discussion)

tacit crypt

well iirc they don't support resizing gifts

outer raven

Was that change reverted or did it never land

I know for a fact Discord supports more than just powers of two and ive seen prs to add that on djs

alpine bough

but i still can't get the image with static images 👀
tested with vladdy's banner (only with power of two, of course)

outer raven
opaque vessel

It was asked to be reverted in both linked pull requests, but that never happened

outer raven

Reverted? When

opaque vessel

On both those linked pull requests on what you just linked

outer raven

Those aren’t linked but alright

Did anyone ever revert these tho

Oh it wasn’t “reverted” just was never added to rest and thats what djs uses now

Alright guess I was behind on the news then

tacit crypt

They "work"/worked, that is true, but they're not recommended

alpine bough

so I will leave it with number type and use the docs to say it only accepts numbers power of two between 16 and 4096, thanks guys :)

warped crater
outer raven

@swift zealot no need to close your pr

Just change the target branch to v13

swift zealot

I would have reopened it but I deleted the branch without thinking.
It's been a long day. 😁

honest barn

iirc you can restore branch in the pr page

same button of delete branch

copper garden
outer raven
swift zealot
swift zealot
wild flax

@vernal rose are you sure your root hoisting also makes it possible to run the commands inside the packages too

without having to run them on the root

or use the workspace focus cli from yarn

I know for sure you can't make the changes to the /website directory

Since we use npm on vercel to install stuff from that folder

because yarn doesn't work there correctly

vernal rose
wild flax

yeah its mainly the binaries I need

since for releases I execute most stuff inside the packages folders

and not on root

but youll have to fully revert the changes to the website

vernal rose
wild flax

its not

thx

vernal rose
warped crater

its so underscore('abc') returns '__abc__' rather than string

it's just a stricter type

vernal rose

got it thanks

mighty bough

is djs ever going to remove support to just do channel.send(string), so you need to do channel.send({ content: string })?

opaque vessel

I think it's a very commonly used way of sending a message in a channel and it's the only single helper overload so... possibly not? But idk

stray shell

For my opnion, it can stay as it is.

inland lotus

I dont see a reason for removing it

honest barn

same

wild flax

It won't be removed.

real jetty

I also don't understand, could you explain?

visual hornet
copper laurel

I think they're referring to why we don't allow .send(embed) and it was because overloads like this were unintuitive and break easily, particularly when they then had to send another object for message options.

The content string is friendly enough for both users and maintainers to keep

nova kestrel
unique axle

the idea is that you collect things you want to process, iteration is a valid construct for that, what would indexing help there?

at the end of the day collections are used whenever we can associate a unique key with an instance in a "collection" of structures

visual hornet

if you want to index it, you can just spread the iterator, or you can iterate to process the elements in order

A Map object iterates its elements in insertion order

unique axle

in 9/10 cases where people want an array in here they probably don't need one

outer raven

And a map is easily convertible to an array whereas the opposite isn’t true

solemn oyster

It is true, using the Map's constructor, just requires a few more characters

outer raven
warped crater

new Map(arr.map((e) => [e.id, e]));

winter flume
solemn oyster
winter flume

oo, havent heard of that, can you link it please? sorry for taking ur time

solemn oyster

Yes, it is

winter flume

okay, thanks

magic zodiac

Any news on this? And is this something that will be implemented correctly in the discord.js library?

white hedge

I think it's still in development

ornate topaz

There is no reason for it to not be implemented

unique axle