#archive-library-discussion

25217 messages · Page 26 of 26 (latest)

mighty bough
wild flax
#

Ty

outer raven
#

that note isn't true at all, should we suggest to set it to 8 in order to disable the command?

#

0 does the exact opposite of disabling the command

copper garden
#

The warning in the DDocs says otherwise

outer raven
#

where's that

outer raven
#

then thats also very wrong lol

#

ill make a PR to fix that one too

#

should be 8

opaque vessel
#

I'm pretty sure I tried this earlier and it was fine

outer raven
#

nop

#

0 is no permission

#

if you don't require any perms to use a command its enabled for everyone

#

what they meant to put there is 8

opaque vessel
#

I just tried it again, I cannot reproduce that

outer raven
#

i can't get neither 0 or 8 to change anything at all

opaque vessel
#

Maybe your members are all administrators (x

outer raven
#

it should still change something in the allowed roles list

#

also just found a bug

tacit crypt
#

Also supposedly permission 0 disables it for everyone except admins+owner

outer raven
#

but that doesn't make sense

#

ok so it seems like it does work, it just doesn't change anything in the integrations tab which is why it gets confusing

ruby terrace
#

default member permissions never changed anything in that tab, its a stupid oversight that makes the UI 50% useless

outer raven
#

ah I see

#

that's quite annoying, i didn't know that

tacit crypt
#

supposedly they wanna work on it but time

outer raven
#

might as well do a permissions v3 cuz v2 was so disastrous it needs an entire rewrite again

tacit crypt
#

nah, its just UI thats not done

#

the system itself is fine

outer raven
#

everything is slower, commands take ages to populate and glitch out when you're writing them and it's no longer as easy as simply enabling or disabling a command for a role, you can't even do that through the API now so you can't automate most systems without an oauth token

tacit crypt
#
  1. Haven't seen it
  2. They appear instantly Thonk
  3. Disabling a command for a role is literally going to the cmd in the ui, adding the role and toggling it to off
  4. That's an ANNOYANCE but not a groundbreaker and I doubt it'll change any time soon too
outer raven
# tacit crypt 1. Haven't seen it 2. They appear instantly <:Thonk:264701195573133315> 3. Disa...

You can easily notice how when you type / the menu goes black and only gets populated a few seconds later, similar to how autocomplete works too and this didn’t use to happen before v2
Yes you can still disable commands for roles but it’s way harder because it has to be done manually and becomes quite annoying when you have over 40 commands so it’s easier to just enable the command for all roles and do perm checks on the bot iself

inland lotus
#

the disabling commands for roles is better imo, gives the owner/admins control over who can use certain commands instead of having to rely on the bot

copper laurel
honest barn
#

the ui not reflecting perms v2 is a known issue and they are working on it iirc, i made a github issue about it and it got the synced label and assigned to someone

raven juniper
#

How much of this is actually related to d.js 🤔

signal sedge
#

can confirm this with 400+ shards / 439k servers

quiet viper
#

Are backports on v13 branch even tested?
Their should also be a separate dev release for v13...

opaque vessel
#

Did you find an issue?

quiet viper
void rivet
#

you can actually install the v13 branch from github, it's not a monorepo

opaque vessel
#

You can run npm install discordjs/discord.js#v13 to install it

wild flax
#

Most sharding affected things are not easy to test

#

Which should be obvious

signal sedge
leaden obsidian
leaden obsidian
leaden obsidian
wild flax
#

Because you do need someone willing to test and you might need a big number of shards, not always but sometimes

#

Sharding is rarely something you can test on a tiny server by yourself

leaden obsidian
wild flax
#

Like everything else in the lib

leaden obsidian
#

feelsTenseMan I am always ready with my bot [38/43 shards bot] to test new codes so you can ping me if there is ever a need.

signal sedge
leaden obsidian
upper lance
#

there are certain message types that dapi will throw an error 'Cannot execute action on a system message' if attempted to delete them (for example: RECIPIENT_ADD, RECIPIENT_REMOVE), yet Message#deletable doesnt seem to have a check for it. Is this intentional by design?

ruby terrace
#

we could test which ones do it currently, but that can change at any time without notice

tacit crypt
#

The problem with system message deletions is that it's inconsistent at which ones you can delete

quiet viper
#

Does the roll out of auto mod issues with v13?

unique axle
#

try it and see, and report bugs if you find them

stray delta
copper garden
#

I believe the same is true for VoiceConnection

wild flax
#

I only added the ones that had documentation before I adapted the docgen

#

So they were missing before

#

Most likely just an oversight

#

And I wasn’t going to add them just to fix the docgen in the same pr

stray delta
#

ok

#

also voice in general has a ton of eslint-disable overrides, for everything that's documented can that/ should that be changed?

wild flax
#

Preferably

#

But it will be a big undertaking I assume

#

The codebase isn’t a huge mess, but fixing those overrides can be a bit tedious

real jetty
#

This channel is for important discussion about developing discord.js, please go to #archive-offtopic , moreover this server is for discord.js not for steam bot builders

sleek kelp
#

Will content moderation support be added to discord.js? (New feature)

loud jayBOT
sleek kelp
#

thanks

opaque vessel
#

In the future, the answer will always be yes

visual hornet
#

^ unless it's not available to bots

signal sedge
#

448 shards / 441k servers

leaden obsidian
real jetty
#

any way to fetch all the friend ids?

visual hornet
#

if there were it'd require oauth2 and even with that i don't think there is

#

but definitely not in djs

unique axle
#

relationships.read even needs discord approval

real jetty
unique axle
#

then you are running a selfbot, which is against discord terms of service

#

you are not allowed to automate non-bot accounts

real jetty
#

Fair nuff

oak quail
#

you can get friends with rpc

real jetty
real jetty
#

interesting

vernal rose
#

I'm not able to commit bcz of this error. Does anyone know why it's happening? I've committed by adding --no-verify for now

tacit crypt
#

reinstall all deps and try again? eyess

upper moss
#

is there a reason for VoiceChannel not having nsfw property because api returns it while djs doesn't Hmm i wanted to ask here before i make an issue on gh

copper garden
#

It was prob overlooked when tiv was added to d.js

#

Feel free to open the issue and I (or someone else) will make a PR for it

stray delta
#

damnit how did i miss that

upper moss
#

i opened an issue

pallid ridge
#
export interface ChannelData {
  name?: string;
  type?: Pick<typeof ChannelTypes, 'GUILD_TEXT' | 'GUILD_NEWS'>;
  position?: number;
  topic?: string;
  nsfw?: boolean;
  bitrate?: number;
  userLimit?: number;
  parent?: CategoryChannelResolvable | null;
  rateLimitPerUser?: number;
  lockPermissions?: boolean;
  permissionOverwrites?: readonly OverwriteResolvable[] | Collection<Snowflake, OverwriteResolvable>;
  defaultAutoArchiveDuration?: ThreadAutoArchiveDuration | 'MAX';
  rtcRegion?: string | null;
  videoQualityMode?: VideoQualityMode | null;
}
#

does anyone know what type resolves to?

#

asking because it doesnt matter if i try to edit with { type: 'GUILD_TEXT' } or with { type: ChannelTypes.GUILD_TEXT } theres always a ts error about types not matching

opaque vessel
#

That type is incorrect

ember steeple
#

What djs version your using

pallid ridge
#

13.8.0

pallid ridge
#

type should be ChannelTypes.GUILD_TEXT | ChannelTypes.GUILD_NEWS right?

visual hornet
#

it is that in main~~, yes~~

opaque vessel
#

No

#

It should be 'GUILD_TEXT' | 'GUILD_NEWS | ChannelTypes.GUILD_TEXT | ChannelTypes.GUILD_NEWS

#

Make an issue @pallid ridge if you want, then perhaps someone will add it for the next 13.x

pallid ridge
#

it should definitely be only the enum values, considering there is no check (at least as of now) and DAPI accepts type: integer

opaque vessel
pallid ridge
copper garden
#

That’s resolved to num by d.js

opaque vessel
#

The string isn't sent across to Discord - it's resolved

pallid ridge
#

thats what i tought but it isn't in 13.8.0

#

it throws

opaque vessel
#

Hence

If there isn't, that'd be a bug

#

That doesn't exist in the edit method for some reason, so... yea

#

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