#djs-in-dev-version

1 messages Ā· Page 9 of 1

dawn phoenix
#

what is "button" even?

undone yew
#

i don't know

dawn phoenix
#

then find out?

undone yew
#

My context (includes buttons) file

#

what is the problems?

#

help

vague coyote
#

are WE supposed to debug your whole code now?
No thanks šŸ’€

#

Thats still your job

tame gazelle
#

the dynamic option has been removed?

#

for avatar

vague coyote
#

its now forceStatic

#

set that to false

#

kinda weird that its on rest now šŸ£

undone yew
#

I couldn't find the problem

tame gazelle
undone yew
#
if(button.customId === 'last')
          ^^^^^^^^ 

What should I write here?

vague coyote
#

what is button

undone yew
# vague coyote what is button
            let fetch = await interaction.fetchReply();
            const system = fetch.createMessageComponentCollector({ componentType: 'BUTTON', filter: (clicker) => clicker.user.id == interaction.user.id })

            system.on('collect', async (button) => {

              if (button.customId === 'delete') {
        
                interaction.deleteReply();
        
                await button.deferUpdate();
        
              } else if (button.customId === 'first') {...}
vague coyote
#

log button

#

and show the output

undone yew
#

button didn't respond to it either

urban belfry
#

wait it's still going to be called MessageComponentCollector?

vague coyote
undone yew
#

what will i write?

vague coyote
#

log button
and show the output

undone yew
vague coyote
#

explain that

undone yew
urban belfry
#

no, even i don't understand what "button didn't respond to it either" means exactly

undone yew
#

No movement in console.

#

no output

#

these were working fine without custom_id, when I did v14 customId started giving error.

#
if(button.customId === 'delete') {...}
          ^^^^^^^^

I just don't know what to write here

urban belfry
#

@undone yew import ComponentType from discord.js and access ComponentType.Button instead of this componentType: 'BUTTON'

undone yew
#

which one will i write

urban belfry
#

the latter of course

undone yew
#

workedddd

#

where error?

finite fog
#

The stacktrace tells you what method you used and where you used it, the error tells you what was expected and what was received.
I'm not sure what more you'd need.

undone yew
#

i don't know

icy dew
#

something needed a string, but you gave undefined

pliant salmon
#

already talked about that here

vague coyote
# undone yew

cough setAuthor takes an name option, not content
cough addFields takes multiple field objects, not an array

urban belfry
#

so the docs for addFields is wrong too?

vague coyote
#

yes

pliant salmon
icy dew
#

question, is it just me or does anyone else get FATAL ERROR: Committing semi space failed. Allocation failed - JavaScript heap out of memory

never got this in v13, but i get this in v14.

could it be because i have multiple setTimeout or smth

undone yew
pliant salmon
#

we where talking about that idk how you didnt see it

velvet jasper
#

Will fix

pliant salmon
#

i will open a issue for the types

icy dew
tame gazelle
pliant salmon
#

they didnt document that yet so its normal

vague coyote
pliant salmon
vague coyote
#

if you click on imageurloptions in the docs, it directs you to the proper page

pliant salmon
#

ah yes

#

but there is no information that it got changed thats what i meant

vague coyote
#

Yes, but you should always look at the docs if you get a problem like that anyway reallyFckingCuteCatHihi

pliant salmon
#

and its rare for me to go to the docs since i have all directly on my ide, thats how i found the errors in the types

pliant salmon
vague coyote
#

just to clarify, you changed yours to forceStatic, right?
Not that you think it got removed notLikeCrawl

pliant salmon
vague coyote
#

wut, its none by default according to docs

pliant salmon
#

rly?

#

w8 a sec

#

this is what i saw

vague coyote
#

ah okay

#

idk, should say false, none confuses

pliant salmon
#

true now its the oposite of the dynamic: true (?)

urban belfry
#

if we use dynamic as an example, by default now it's dynamic: true

forceStatic: true would be explicitly saying dynamic:false

pliant salmon
#

Yes

#

Thats what the guide suggests at least

vague coyote
pliant salmon
#

ForceStatic forces the url to be the static one

#

So having it to true is the same as dynamic: false

vague coyote
#

well yes, saying its none by default is not correct tho

#

it doesn't matter really, but I think showing it default false in the docs is cleaner

pliant salmon
#

I didnt see none tbh

pliant salmon
#

But that maybe happened bcz the type is forceStatic?: boolean or forceStatic: boolean | undefined

#

Docs maybe got confused with that

urban belfry
#

it doesn't mention @default false
unlike MakeURLOptions.extension

pliant salmon
#

Yeah, and for what im aware the docs arent made by hand so it got confused

#

They can change that ez but its not smtg that will break your code

gleaming parcel
#

whats gonna change with v14?

slate mango
#

Many things, please check pins

undone yew
#
        const button = new ctx.Discord.ActionRow(
            new ctx.Discord.ButtonComponent(
                { name: "Boy", style: ctx.Discord.SUCCESS, emoji: ctx.client.emojis.cache.get(ctx.config.emoji.OptionalEmojis.AccountUser), custom_id: 'boy', disabled: false }
            )
            
        )

where is error?

pliant salmon
vague coyote
undone yew
urban belfry
#

oh no sory

vague coyote
#

since when does ActionRow takes a buttoncomponent in the constructor Thonk

urban belfry
#

it doesn't

#

it takes an apiactionrowcomponent, which has a type property and a components array

#

@undone yew pass nothing to the constructor and use addComponents

icy dew
undone yew
#

šŸ˜‘

urban belfry
#

well.. what is fetch?

undone yew
#

fetch = interaction.fetchReply();

vague coyote
#

prooommiiissseee

plain roverBOT
pliant salmon
#

await moment

undone yew
pliant salmon
#

oh, im actually curious now

#

does djs have any plans to support ESModules?

urban belfry
#

@undone yew you're being difficult, that error's not telling us much, show us the code if you want someone to be able to answer you

undone yew
urban belfry
#

instead of passing an object, use the builder methods

#

like ButtonComponent.setLabel('something')
also this is a good time to mention, content?? button.content?

vague coyote
#

lmao

#

also addComponents doesn't take an array afaik
same as addFields in an embed

undone yew
#

working, but buttons not work

vague coyote
#

also addComponents doesn't take an array afaik
same as addFields in an embed

urban belfry
#

but setComponents takes an array of components

vague coyote
#

yes

urban belfry
#

whereas setFields takes a rest parameter

pliant salmon
urban belfry
#

i understand not wanting to support multiple types of input, but they should be consistent
i'd expect setFields and setComponents to be consistent

undone yew
urban belfry
#

again, you're not showing code

pliant salmon
#

thats a v14 change for some reason

urban belfry
#

well they aren't now šŸ™ƒ

undone yew
pliant salmon
#

its what it says on the message

#

you already replied to it or defered it

undone yew
#

wait

pliant salmon
#

use interaction.followUp instead

undone yew
pliant salmon
#

thats on your end

#

the bot has no permissions on that server to execute the action you want

vague coyote
#

I think we even have a rule for that... rule 4

vague coyote
#

apparently not šŸ‘

pliant salmon
#

wdym?

urban belfry
#

yeah and we're gonna take you on your word and not the api error you're receiving

plain roverBOT
#

Tag suggestion for @undone yew from @urban belfry:
• Bots cannot moderate (kick/ban/nickname/...) a target with a higher or equally high highest role or the guild owner.
• Bots cannot modify (edit/add/remove) roles that are higher or equally high compared to the bot's highest role.
• The ADMINISTRATOR permission does not skip these checks.

undone yew
#

I tried a member lower than myself, this time it doesn't give a perm error, but it doesn't process either.

vague coyote
#

sucks then

undone yew
#

uh wait

vague coyote
#

cant help you with that little you give us

undone yew
#

gives role but message is not edited

vague coyote
#

nice

undone yew
#

How do I edit the message?

pliant salmon
#

thats literally basic djs

#

you should read the docs instead of asking everything

#

and if you know that little im not sure if you should be using a dev version

vague coyote
#

nono, they have a point

#

.edit() is very very different to send(), that may result in confusion PepeLaugh

#

just ignore me kekw

dawn phoenix
#

no

vague coyote
#

no

undone yew
#

not editing message

vague coyote
#

ok

icy dew
sly narwhal
#

anyone know why @discordjs/rest cannot be required from BaseClient?

#
Error: Cannot find module '@discordjs/rest'
Require stack:
- /home/koyamie/koya.gg/interactions/node_modules/@discordjs/discord.js/packages/discord.js/src/client/BaseClient.js
- /home/koyamie/koya.gg/interactions/node_modules/@discordjs/discord.js/packages/discord.js/src/index.js
uncut kelp
#

It's not exported

sly narwhal
#

wym

uncut kelp
#

If something is not exported, it cannot be imported

tame gazelle
#

will the method name be changed to createComponentCollector since now its ButtonComponent?

uncut kelp
#

Maybe

tame gazelle
#

can we put string for this option in <Guild>.scheduledEvents.create() ?

#

or we need to use enum?

uncut kelp
#

Enumerables everywhere

velvet jasper
sly narwhal
#

it's d.js code importing rest package

#

and it doesn't work

uncut kelp
#

It imports for me so maybe your installation is corrupt

sly narwhal
#

do you have rest in your @dry tulipjs folder in node_modules?

velvet jasper
tame gazelle
#

what's "areas"?

forest elm
#

why is it in @discordjs/discord.js

#

how did you install it?

velvet jasper
sly narwhal
#

using my fork

forest elm
#

you're not installing it properly

tame gazelle
sly narwhal
#

how should I then

forest elm
#

idk. you didn't actually tell me how you installed it

sly narwhal
#

npm i https://github.com/Koyamie/discord.js.git

forest elm
#

the repository is not a single package, its a monorepo

#

you can't just install it like that

dull mulchBOT
velvet jasper
#

just install the dev version

sly narwhal
#

no?

#

if I use a fork there is a reason

velvet jasper
#

oh missed that, then yeah you'll have to look at that issue ticket

sly narwhal
#

hm I see, the dev version installs rest in node_modules/@discordjs

#

found my workaround LOLiguess

velvet jasper
pliant salmon
#

someone was faster than me

wary ocean
#

ok

tame gazelle
#

does NONE still exist?

scarlet tangle
#

Hi

#

whats wrong here

const {Discord, Embed} = require('discord.js')
if(interaction.user.id != '736648341848326287') return interaction.reply('No puedes usar esto')
const embed = new Embed().setFooter({text: "hi"})
interaction.reply({embeds: embed})
tame gazelle
#

embed in an array

scarlet tangle
#

okay

tame gazelle
#

oh now it's Tier1 ..

scarlet tangle
#

why Discord.Embed() isnt working for me, but Embed() works

forest elm
tame gazelle
scarlet tangle
tame gazelle
#
+ const Discord = require('discord.js')
- const { Discord } = require('discord.js')
scarlet tangle
#

ok

tame gazelle
#

yeah
you have the bad one

#

Public doesn't exist anymore?

slate mango
tame gazelle
#

what nop? ._.

scarlet tangle
#

I fixed it

forest elm
#

const Discord = require('discord.js') -> new Discord.Embed()
const { Embed } = require('discord.js') -> new Embed()

scarlet tangle
#

ik

tame gazelle
forest elm
#

since you're on the source, you can click the documentation url on the comment and see that yes, "Public" does not exist anymore

scarlet tangle
#

whats that

urban belfry
scarlet tangle
urban belfry
scarlet tangle
#
const Discord = require('discord.js')
if(interaction.user.id != '736648341848326287') return interaction.reply('No puedes usar esto')
try { 
    const embed1 = new Discord.Embed().setTitle('Entrada').setDescription(`\`\`\`
${interaction.options.getString('code')}
\`\`\``).setColor('GREEN')
const embed = new Discord.Embed()
try{ // Intentarč°© ejecutar el siguiente codigo
 let evaled = eval(interaction.options.getString('code'))
 embed.setTitle('Salida').setDescription(`\`\`\`
${evaled}
\`\`\``).setColor('RED')
interaction.reply({embeds: [embed1,embed], ephemeral: true})
} catch(error) { // Capturarč°© si hay algun error
interaction.reply({content: 'Hubo un error!', ephemeral: true})
console.log(error) // mostrarč°© en la consola el error
}
} catch(e) {}

whats wrong

tame gazelle
scarlet tangle
#

oj

plain roverBOT
#

Documentation suggestion for @scarlet tangle:
<:_:874569335308431382> (static) Util.resolveColor()
Resolves a ColorResolvable into a color number.

tame gazelle
#

use this

scarlet tangle
#

ok

scarlet tangle
tame gazelle
#

nope
I've already had the error so I know what's wrong

scarlet tangle
#

ok

#

Where can I see the full changes?

velvet jasper
#

V14

dapper forum
#

What's in node 16.9 that is the breaking change?

velvet jasper
jolly pike
#

Object.hasOwn i'm guessing

velvet jasper
#

but is that considered a breaking change?

forest elm
#

no, if it was then it would have been added to v17 or 18

#

but yes, afaik the increase in minimum node version was because of Object.hasOwn

dapper forum
#

But why Object.hasOwn over the in operator?

knotty plover
#

in returns true for inherited properties, hasOwn does not

#

in also returns true on getters I think

dapper forum
#

ahh

scarlet tangle
#
const row = new Discord.ActionRow().addComponents([
new Discord.ButtonComponent().setLabel('hi').setCustomId('ow').setStyle(5)
])
interaction.channel.send({content: 'hi', components: [row]})

whats wrong

knotty plover
#

you tell us, what doesnt work

#

any errors?

scarlet tangle
#

it does not send the message

#

let me show you the error

scarlet tangle
#

and some invalid component type

#

Error: Cannot serialize component type: undefined

vague coyote
scarlet tangle
vague coyote
scarlet tangle
#

bruh

#

and how do you want them to realize

vague coyote
#

its an in dev version and the docs not fully up to date

#

you should know that when using a not released version

scarlet tangle
#

then the error is

vague coyote
#

addComponents takes multiple objects, not an array

scarlet tangle
vague coyote
#

yes

little jolt
#

Are new API features going to be added to v13, v14 or both versions from now on?

scarlet tangle
little jolt
#

Thanks!

odd ridge
#

what changes can i make in v13 to make it easier for myself to update to v14 in the future?

pliant salmon
#

If you dont move to the dev version that arent any

odd ridge
#

i won't move to v14 just yet

#

just seeing if there's something i can do to make it less tedious when it's time

pliant salmon
#

You will have to update them later or the second option is to import all the Enums from discord-api-types and use them

odd ridge
#

so i'm better off doing npm i discord-api-types and use those enums instead of string literals?

#

because that seems to be the big(ish) change this time

pliant salmon
#

Yeah you can try it

#

Its your best bet

odd ridge
#

alright

pliant salmon
#

You can try if this works, even tho im not rly sure if it does on v13, didnt try

#

But since im not sure if the enums are exported on djs13 you are better off getting them from api-types

#

But you will make a lot of changes abyways bcz renames and whatnot

dawn phoenix
#

imo the changes aren't that brutal, a lot of things moved to enums, that are re-exported from api-types, which aren't valid as enums yet in v13

pliant salmon
#

Ik but for a big bot abd without some tooling that ides like vscode have it might be "hard" to change all MessageEmbed to Embed

odd ridge
#

is it? it would probably be a find and replace all job

vague coyote
#

find and replace in all files, ez fix

pliant salmon
vague coyote
#

notepad++ has that too, so wdym

pliant salmon
#

But im using v14 as an excuse to refactor all my projects

pliant salmon
#

Even tho i still think that a lot of the refactors are kinda useless since you can index strings into enums and get the same output

vague coyote
#

did you read the Why are you changing "X" for "Y"? discussion?

pliant salmon
#

I did but still some of the points do not make sense in my point of view

#

And others im rly glad they decided to do

lethal trail
#

whats the eta of the the stable version of djs v14?

vague coyote
#

none

lethal trail
#

what a nice eta..

vague coyote
#

no problem

lethal trail
#

;-;

vague coyote
#

there simply is no eta

knotty plover
#

2022

dire fossil
#

are you sure lmao
imma get a ss

vague coyote
#

thats... what

dire fossil
#

wrong server oof

vague coyote
#

I'm pretty sure that wasn't meant for a different server lol

urban belfry
vague coyote
#

oh you are right

#

I should really rebuilt my interaction handler

#

Thanks bobolove

dire fossil
scarlet tangle
#

How can i use intent bit eg i was using
intents: [ new Discord.Intents("32767")]

dire fossil
#

uhh guys i cant click the GatewayIntentsBits

vague coyote
dire fossil
#

oh dang

#

Dapi-types docs when

strong stag
#

What do we use instead of embed.type

#

How else do I check if an embed is picture/video media

#

Furthermore,

#

I get a type error when getting an embed image url -

#

TypeError: Cannot read properties of undefined (reading 'image')

const { guild, author, channel, attachments, embeds } = message;
console.log(embeds.length, embeds[0].image.url)```
vague coyote
#

there is no embeds[1]

strong stag
#

For context embeds.length does print the correct number

#

It was 0*

forest elm
#

embeds.length was 0?

strong stag
#

Not the length...

vague coyote
#

and what did embeds.length print

strong stag
#

1

vague coyote
#

you sure it was 0 then?
cuz your error says embeds[?] is undefined

#

or whatever you call image on

strong stag
#
        const { guild, author, channel, attachments, embeds } = message;

        const Gallery = guild.channels.cache.get('935853562997665823')
        const ImageAmount = attachments.size + embeds.length

        console.log(embeds.length, embeds[0].image.url)

        if (author.bot || !channel.equals(Gallery)) {
            return
        }

        const FailResponse = new MessageEmbed()
            .setColor('GREYPLE')
            .setTitle('Message Deleted')
        
        if (ImageAmount == 0) {
            FailResponse.setDescription('āš ļø You cannot talk in gallery')
        } else if (!attachments.first().contentType.includes('image') || !embeds[0].image.url) {
            FailResponse.setDescription('āš ļø You can only send image media')
        } else if (ImageAmount > 1) {
            FailResponse.setDescription('āš ļø You cannot send multiple images')
        } else {
            message.react('⭐')
            return
        }```
Yes. It was, and still is, 0.
vague coyote
strong stag
vague coyote
#

well, no image in that embed yya

forest elm
#

thats the thumbnail, believe it or not

#

you could have simply logged the embed object instead of all of that

vague coyote
#

true

strong stag
forest elm
#

ok

strong stag
#

That's hard since type is deprecated, and apparently .image neither .video are actually accurate to whatever the embed contains

vague coyote
#

well now you know that you also need to check for thumbnail

shadow socket
#

how to use v14

strong stag
#

What if the embed is not solely an image, but a thumbnail for a per say ...Wiki?

vague coyote
forest elm
shadow socket
forest elm
#

no, you, in particular, cannot

shadow socket
shadow socket
vague coyote
forest elm
#

yes, you can test it...

shadow socket
dire fossil
#

also umm there is no Embed in main docs
is it fine to just use the v13 MessageEmbed as docs refrences for now ?

outer bane
#

it's in builders docs

dire fossil
#

holy
alright

#

djs embed just extending builder embed oh ok...

urban belfry
#

not extending, reexporting

dire fossil
#

lmao yea rexporting

#

exports.Embed = require('@discordjs/builders').Embed;

#

how do you use hex on the Embed.setColor ?

#

it only accept null|number

vague coyote
#

use resolveColor from the util class

dire fossil
#

oh okay thanks

forest elm
#

or simply '#ffffff' -> 0xffffff

tame gazelle
#

CommandInteraction will be removed?

cinder wraith
#

why would it be?

tame gazelle
#

because I saw that there is ChatInputCommandInteraction and CommandInteraction

vague coyote
#

ChatInputCommandInteraction etc. extend on that

tame gazelle
#

šŸ‘

vapid garden
#

Is the discord.js v14 version out?

vague coyote
#

does it look released to you

cinder wraith
#

if the pins are to be believed

#

no

vapid garden
cinder wraith
#

does it look released to you

vapid garden
#

No

cinder wraith
#

then that's your answer

vapid garden
#

So she wasn't released?

vague coyote
cinder wraith
#

...

vapid garden
#

What?

cinder wraith
#

does it look released to you

#

cmon man

vapid garden
#

No

dire fossil
#

....

vapid garden
#

Okey thanks you šŸ™‚

tame gazelle
#
ZodError: [
  {
    "code": "invalid_type",
    "expected": "string",
    "received": "undefined",
    "path": [],
    "message": "Required"
  }
]
    at new ZodError (H:\IdrisGaming\Discord Bot\IdrisBotSC\node_modules\zod\lib\ZodError.js:80:28)
    at handleResult (H:\IdrisGaming\Discord Bot\IdrisBotSC\node_modules\zod\lib\types.js:115:21)
    at ZodString.ZodType.safeParse (H:\IdrisGaming\Discord Bot\IdrisBotSC\node_modules\zod\lib\types.js:191:16)
    at ZodString.ZodType.parse (H:\IdrisGaming\Discord Bot\IdrisBotSC\node_modules\zod\lib\types.js:172:27)
    at Oe (H:\IdrisGaming\Discord Bot\IdrisBotSC\node_modules\@discordjs\builders\dist\index.js:3:1905)
    at Q.toJSON (H:\IdrisGaming\Discord Bot\IdrisBotSC\node_modules\@discordjs\builders\dist\index.js:3:4367)
    at H:\IdrisGaming\Discord Bot\IdrisBotSC\node_modules\@discordjs\builders\dist\index.js:3:5347
    at Array.map (<anonymous>)
    at Z.toJSON (H:\IdrisGaming\Discord Bot\IdrisBotSC\node_modules\@discordjs\builders\dist\index.js:3:5338)
    at H:\IdrisGaming\Discord Bot\IdrisBotSC\node_modules\@discordjs\builders\dist\index.js:3:2916 {
  issues: [
    {
      code: 'invalid_type',
      expected: 'string',
      received: 'undefined',
      path: [],
      message: 'Required'
    }
  ],
  format: [Function (anonymous)],
  addIssue: [Function (anonymous)],
  addIssues: [Function (anonymous)],
  flatten: [Function (anonymous)]
}
#

the stack trace didn't say at which line the error is ._.

urban belfry
urban belfry
#

huh?
oh

#

and what version of builders are you using?

tame gazelle
vague coyote
tame gazelle
#

nope

vague coyote
#

Then the error is probably somewhere else

tame gazelle
#

the error appears when I execute this command

vague coyote
#

wait what

#

not when registering it?

tame gazelle
#

nope

vague coyote
#

okay thats new

urban belfry
#

i cannot reproduce this error

#
import {ApplicationCommandType} from "discord.js";
import {ContextMenuCommandBuilder} from '@discordjs/builders'

const myMenu = new ContextMenuCommandBuilder().setName('hey').setType(ApplicationCommandType.User)
console.log(myMenu) // ht { name: 'hey', type: 2, defaultPermission: undefined }
```it works fine for me
tame gazelle
#

maybe with my select menu?

urban belfry
#

show that code too then

finite fog
vague coyote
#

try to remove [] in addOptions

tame gazelle
urban belfry
#

no that was a reference to the docs

vague coyote
#

xD

tame gazelle
#

._.

finite fog
#

node --enable-source-maps index.js or stuff

tame gazelle
vague coyote
#

was that it?

tame gazelle
#

yup

urban belfry
#

wait addOptions only takes the SelectMenuOption class instances now?

vague coyote
#

...SelectMenuOption

#

if you pass an array, the method would get that array inside of an array which then throws that error I guess

dire fossil
#

wait
how does it become ActionRow<ActionRowComponent> ?

tame gazelle
#

now <ButtonInteraction>#customId is <ButtonInteraction>#custom_id right?

vague coyote
#

no?

urban belfry
#

according to the docs, still customId

tame gazelle
#

my bot doesn't respond when I select an option ._.

vague coyote
dire fossil
#

so ...buttons then ?

#

oh yeaaa

tame gazelle
#

SELECT_MENU => SelectMenu

#

ah no
still don't response

velvet jasper
tame gazelle
#

ah bruh

#

thanks

tame gazelle
forest elm
#

That's not a bitfield

scarlet tangle
vague coyote
scarlet tangle
#

When i run my command

#
let ping = await Date.now() - type.createdTimestamp;

        const embed = new Discord.Embed()
            .setColor("RANDOM")
            .setDescription(`Pong! | \`${ping}ms\``)

        return type.reply({ embeds: [embed] })

module.exports = {
    name: 'ping',
    description: 'Pong!',
    options: [],
    ClientPerms: [],
    MemberPerms: [],
    async run(client, i) {
  
        i.reply("Pong!")
      //client.Commands.Other.Ping(i)
      
    },
  };

vague coyote
#

setColor takes a number

#

use Util.resolveColor()

#

Util from djs

urban belfry
#

also why are you awaiting?

vague coyote
#

I hope that code is in your run method and not outside of it

velvet jasper
#

lol the await

scarlet tangle
#

I made this code long time ago and i was thinking await works different

scarlet tangle
velvet jasper
#

Just a heads up soon if you want to use the preset colors you'll use Colors.Blurple for example

#

strings won't be supported anymore

velvet jasper
#

for example for white it's #ffffff, you'd just do 0xffffff

icy dew
velvet jasper
velvet jasper
#

yeah, but it's not available yet, the PR hasn't been merged

icy dew
#

Ah, alright

#

I use red, green and blue for most of my embeds so not gonna be a problem for me anyway

scarlet tangle
#

expected number recived string

slow storm
scarlet tangle
#

Idk

#

This zod error doesnt tell it

slow storm
scarlet tangle
slow storm
#

After removing color?

icy dew
#

see bot.js file, line 42

scarlet tangle
scarlet tangle
#

Yes there its

slow storm
scarlet tangle
#

how do i send embeds in discord?

scarlet tangle
#

You arent bot you cant

vague coyote
scarlet tangle
#

not like that

vague coyote
#

like what then

scarlet tangle
vague coyote
#

???

#

he never did?

scarlet tangle
#

What I mean to say is, when you send code to a discord channel and it looks like this

#

Ohh

plain roverBOT
#

Tag suggestion for @scarlet tangle:
Codeblocks:
```js
const Discord = require("discord.js");
// further code
```
becomes

const Discord = require("discord.js"); 
// further code

Inline Code:
`console.log('inline!');` becomes console.log('inline!');

scarlet tangle
vague coyote
#

next time just say codeblock meguFaceReverse

scarlet tangle
#

Okay mb

vague coyote
#

not you

#

but yeah, we have a tag for that

scarlet tangle
#

Got it šŸ‘

#

thanks

scarlet tangle
velvet jasper
# scarlet tangle

hmm looks like emoji strings may not be accepted anymore, this may or may not be a regression. I'll look into that

scarlet tangle
#

I am not sure even this button style true

urban belfry
#

why not use the builders' methods?

scarlet tangle
#

Bc this way more easy

velvet jasper
#

yeah you should either stick with just builders or json

urban belfry
#

also i believe it takes an object that has an id, name and animated property

scarlet tangle
#

Actually it was

vague coyote
velvet jasper
#

but anyways yeah if you're using json you need the APIEmoji thing

urban belfry
#

so what you need to pass it as is {name: 'emoji'} since it's not a guild emoji

scarlet tangle
#

I mean that one

#

so is there any eg for v14 buttons

#

without builder

velvet jasper
#

not entirely sure what you're asking

vague coyote
#

still dont see why you dont use the builders methods

vague coyote
#

yes, it is, so why do you want to switch away from that

scarlet tangle
#

Bc itsnt working

#

I changed buttoncomponent

vague coyote
#

I mean, if you dont know what you are doing, why are you on the dev release.
The update guide clearly states that components are now in the builders package and also renamed to ButtonComponent etc

#

its as simple as changing the import from MessageButton to ButtonComponent

urban belfry
vague coyote
#

Yes, that too.

scarlet tangle
#

I read and changed required parts

#

Ill try again

urban belfry
#

ah yeah setEmoji used to take an emoji resolvable, now it takes an APIMessageComponentEmoji , i think the guide should mention this

MessageSelectMenu's addOption used to take an emoji resolvable as well

velvet jasper
#

I'm not sure yet if it that's a fully intentional change

icy dew
icy dew
#

so as in { name: "āŒ" }

urban belfry
#

yeah that should work

icy dew
#

Yea this is gonna upset a lot of ppl

charred carbon
#

wait what? Djs v14 is coming out? What will be the updates?

vague coyote
icy dew
charred carbon
#

What's gonna be the updates? Any estimated ideas?

icy dew
vague coyote
#

again, checkpins

urban belfry
#

there's a guide pinned, as chewbaka said,

icy dew
vague coyote
icy dew
#

i wonder will { name: "šŸ›‘" } work in v13

#

Oh yea it does

keen bobcat
#

this channel is not for v13

icy dew
#

yea ik, mb

#

So to use custom emojis in buttons / select menus, we would have to use the id property right?

urban belfry
#

id name and animated

icy dew
#

animated will be a boolean right

scarlet tangle
#
let inv = new Discord.ButtonComponent()
        .setStyle(Discord.EnumResolvers.buttonStyle('URL'))
TypeError: Discord.EnumResolvers.buttonStyle is not a function
jaunty vault
urban belfry
#

yep, i don't think name is required but you can test, right? šŸ˜›

icy dew
#

i can test

plain roverBOT
velvet jasper
#

Or just use ButtonStyle.Link

scarlet tangle
#

Whats the difference lol

#

Between url and link

velvet jasper
#

one doesn't exist

icy dew
#

So when using id only (for custom emojis in buttons), it works great, however when i use the name property only, it throws an error

#

when using both it's fine

urban belfry
#

for custom emojis, names may not be unique across servers
id should be used as an identifier so it makes sense

icy dew
#

yea

urban belfry
#

so you're confirming with the tests that when using custom emojis name isn't really needed?

icy dew
#

yup

urban belfry
#

neat

icy dew
#

so this works as intended

but then what would the animated property do?

urban belfry
#

i've never seen an animated button emoji but the docs say animated is taken

icy dew
#

hmm

#

i think it's to either make the emoji static or animated if it's an animated emoji, but I'll re-check to confirm

icy dew
urban belfry
# icy dew

i just checked, i just saw an animated emoji on a button

#

by default, animated seems to be true

icy dew
#

hmm

#

if its an animated emoji, and you set animated to false, does it change the animated state?

urban belfry
#

no notLikeCat

icy dew
#

so ig it's only for accessing

scarlet tangle
#

what does it mean

vague coyote
#

MANAGE_GUILDS -> ManageGuilds
MANAGE_MESSAGES -> ManageMessages

scarlet tangle
#

Okay thanks

prisma kiln
#

is there any new features besides refactors

idle galleon
knotty plover
#

isText or isThread

#

IsTextBased is now the generic one

dapper gull
#

Hey team, where did <Embed>.setFields([]) end up? (i.e. when trying to remove all fields from an existing embed)...

knotty plover
#

I think its just pending a builders release, it was added to discord.js after the builders one was made

plain roverBOT
knotty plover
#

There are docs for all these methods if you switch to main in the dropdown

plain roverBOT
dapper gull
uncut kelp
dapper gull
uncut kelp
knotty plover
velvet jasper
#

wdym

distant root
idle galleon
distant root
knotty plover
#

Major semantic versions do be like dat

distant root
#

i think i feel like wanna quit

forest elm
#

as the method name suggests, array

#

addComponents

dapper gull
#

When using a unicode emoji as a <SelectMenuOption>.emoji DJS yells at me 😭

components[0].components[0].options[0].emoji[MODEL_TYPE_CONVERT]: Only dictionaries may be used in a ModelType
knotty plover
#

Yeah docs are wrong on this, I think handling arrays is currently broken

dapper gull
#

I would say it's for you haha, I'm not talking about arrays at all 🤣

knotty plover
#

no idea

forest elm
#

that's what happens when you use dev releases ĀÆ_(惄)_/ĀÆ

twilit bobcat
#

are there any breaking changes planned? so far most changes seem to be just stuff moved to enums and a few name changes

knotty plover
#

Those are breaking

forest elm
#

look at the github pull requests with the v14 milestone and the semver:major label

idle galleon
#

Docs not displaying rest parameters is a known issue

#

I don’t think anyone made an issue for it tho

outer bane
#

addOptions uses rest parameters, don't supply an array

#

try emoji: { id: 'yourid' }

twilit bobcat
outer bane
#

when components moved to builders

#

you mean the pinned guide?

#

if you want to adapt component syntax read builder docs

#

seems like that isn't added yet

#

well, only the renames are listed but not the changes in method signatures

novel notch
#
 throw result.error;
        ^

ZodError: [
  {
    "code": "invalid_type",
    "expected": "number",
    "received": "string",
    "path": [],
    "message": "Expected number, received string"
  }
]
    at new ZodError (C:\Users\zasti\Documents\Bot\Esmile Discord.js v14\node_modules\zod\lib\ZodError.js:80:28)
    at handleResult (C:\Users\zasti\Documents\Bot\Esmile Discord.js v14\node_modules\zod\lib\types.js:115:21)
    at ZodNumber.ZodType.safeParse (C:\Users\zasti\Documents\Bot\Esmile Discord.js v14\node_modules\zod\lib\types.js:191:16)
    at ZodNumber.ZodType.parse (C:\Users\zasti\Documents\Bot\Esmile Discord.js v14\node_modules\zod\lib\types.js:172:27)
    at W.setStyle (C:\Users\zasti\Documents\Bot\Esmile Discord.js v14\node_modules\@discordjs\builders\dist\index.js:3:3314)
    at Object.<anonymous> (C:\Users\zasti\Documents\Bot\Esmile Discord.js v14\Util\function.js:8:8)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12) {
  issues: [
    {
      code: 'invalid_type',
      expected: 'number',
      received: 'string',
      path: [],
      message: 'Expected number, received string'
    }
  ],
  format: [Function (anonymous)],
  addIssue: [Function (anonymous)],
  addIssues: [Function (anonymous)],
  flatten: [Function (anonymous)]
}
#
const row = new ActionRow()
  .addComponents(
    new ButtonComponent()
      .setLabel('Support')
      .setStyle('LINK')
      .setURL(link1)
      .setEmoji('882684602639081492'),
    new ButtonComponent()
      .setLabel('Invite')
      .setStyle('LINK')
      .setURL(link2)
      .setEmoji('882683102890197062')
  )
outer bane
#

use enums or numbers for the type

novel notch
#

ok

novel notch
outer bane
#

refer to discord dev docs for those, or just use ButtonStyle.Link

novel notch
#

ok

novel notch
outer bane
#

the same error? show your updated code

novel notch
#

The error is the emoji as serious for v14?

outer bane
#

{ id: 'emojiid' }

novel notch
#

Ok thanks

#

Where can I see to update all intents

novel notch
#

thanks

rain reef
#

what are the changes in v14?

outer bane
#

pinned

rain reef
#

ok thx

novel notch
#

Someone passes me the link of what updates to the message embed and the select menu please

outer bane
#

you can check the builder docs

novel notch
#

Well I don't know what is the github xd

outer bane
#

I don't mean GitHub, go to the docs page and select builders as package

hardy wind
#

Hey guys, is there an enum resolver for embed colour names?
Thanks

vague coyote
hardy wind
hardy wind
#

I think one of the most irritating changes here is the fact that the embed builder doesn't accept strings.

#

Rewriting all my embeds is going to be a joke and a half.

ancient hound
#

Is the slash command builder still imported by @discordjs/builders or differently now it’s a monorepo?

vague coyote
#

still builders import

#

djs installs with builders

#

and rest and all the other stuff you need KEK

knotty plover
vague coyote
#

they mean setColor

#

which only takes a number now

#

But that shouldn't be a problem with the util method

knotty plover
#

It can still take hex format numbers

#

0x000000

hardy wind
vague coyote
#

wdym, setDescription will always take a string

hardy wind
#

I receive errors about these methods not accepting strings anymore.

urban belfry
#

addField takes an object, but description is file though

hardy wind
vague coyote
#

Yes, that takes an object

urban belfry
hardy wind
#

Anyone know of a good regex find/replace that can be used with Notepad++ to adjust these methods?

mint sapphire
#

Literally 3 seconds to refactor with a simple regex replace

hardy wind
mint sapphire
#

Wait this is a support channel nvm bye

dawn phoenix
#

\.addField\((.*), (.*)\)
.addField({name: $1, value: $2})
or something along those lines - maybe another one if you use the inline flag
note: did not test, might not work at all, just woke up

dawn phoenix
#

no idea if notepad++ even supports group replace patterns with $

hardy wind
long narwhal
#

so, is there a list of all current intents for @ dev? i tried looking for GatewayIntentBits in the docs but nothing comes up
or are they the same as v13

knotty plover
#

Basically the same

long narwhal
knotty plover
#

Existing intents havent changed yet, just naming conventions

long narwhal
#

aight

fervent fossil
#

There’s no features yet to v14 right?

vague coyote
novel notch
#

Someone pass me what I change in the SelectMenu

vague coyote
novel notch
novel notch
vague coyote
#

wdym

urban belfry
#

you didn't give them the docs probably

#

if they confirm the setEmoji only taking a raw emoji object, i'd mention that too here

vague coyote
urban belfry
#

true

undone yew
#

Has client.user.setActivity been changed in v14?

velvet jasper
undone yew
#

client.user.ActivityType ?

velvet jasper
#

no setactivity is the same you just use the ActivityType enum with it

undone yew
#

okay

loud mulch
#

It was changed to Embed

urban belfry
#

setColor now takes a number

plain roverBOT
#

Documentation suggestion for @scarlet tangle:
<:_:874569335308431382> (static) Util.resolveColor()
Resolves a ColorResolvable into a color number.

urban belfry
#

you can use 0x5980f1 too i guess

tame gazelle
urban belfry
#

no, but you need to pass an object

#

yep

tall violet
#

So from my understanding D.JS V14 is all about cleaning up the code and stuff which requires a major ver change?

urban belfry
#

MessageAttachment, afaik didn't know
the guide lists most of the changes, it's still being worked on

urban belfry
tall violet
#

Ah okay, every code project needs some refactoring every now and then šŸ™‚

urban belfry
#

no

dawn phoenix
#

then use the color resolver

urban belfry
#

it doesn't or isn't recommended
the first part is already telling you what to do

#

you sure can....

plain roverBOT
#

Documentation suggestion for @scarlet tangle:
<:_:874573924988518500> (static) Util.resolveColor()
Resolves a ColorResolvable into a color number.

urban belfry
#

click the </> button

vague coyote
#

addFields expects multiple field objects, not an array

#

sad but true :/

#

yes

#

don't use a dev version if you cant live with changes

#

full error?

#

that change also applies to actionrows, selectmenus etc

#

multiple objects instead of an array

#

yes

#

please show the full error :D

#

are you using select menus

#

thought so KEK

#

can you show the code

#

for emoji you need to pass an object, but I'm not sure what exactly, hold on

gentle bane
#

i can't import MessageEmbed from discord.js it moved to discord-api-types or another?

vague coyote
gentle bane
vague coyote
gentle bane
#

okey thakn

#

thanks*

#

and also how can set color of embed in v14 cause it says color needs to be a number

vague coyote
#

Use the resolveColor method from the Util class

sly narwhal
#

seems like there is an inconsistency here, docs says array, code returns an error

#

that is not the way, addFields should accept an array

vague coyote
#

no

vague coyote
vague coyote
#

it should but doesn't

sly narwhal
#

#addField and #addFields both accept an object or array of APIEmbedField(s) respectively. (add link to dapi site)

vague coyote
#

already making a pr for that, for now you have to remove []

sly narwhal
#

I will not

#

just reporting

vague coyote
sly narwhal
#

I won't edit hundred lines of codes for an issue that will get fixed

vague coyote
#

thats true

keen bobcat
#

This doesn't need to continue

vague coyote
#

no, its an error

keen bobcat
#

It's got a fix coming, they don't wanna change, that's all there is for now

#

This isn't the channel for this discussion

sly narwhal
#

anyways thanks for the answer

vague coyote
#

Probably made a mistake when bringing it over to builders

#

thats not just applying to embed

#

djs does tho mmLol

#

Embed etc. just gets re-exported

#

its a monorepo now, it gets updated at the same time

idle galleon
#

Sry, forgot this is dev. There should be an enum for it

#

I guess you could

#

ApplicationCommandType.MessageComponent and ComponentType.SelectMenu
Should also work

#

The main reason I don’t like number is bc I don’t like memorizing what each number is

#

Too many enums to memorize

tame gazelle
#

big brain

idle galleon
#

What’s the int for channel type guild category?

tame gazelle
#

3? ._.

idle galleon
#

Channel type is an enum

jolly idol
#

what is this zzzzzzglaze_DogeMotivated

distant canopy
#

beta version for discord.js

scarlet tangle
vague coyote
#

use the ChannelTypes enum

#

not the actual channel object type

scarlet tangle
#

will bots be able to stream yet?

vague coyote
#

no

scarlet tangle
uncut kelp
#

Unless you actually need help, don't comment, thx

shadow socket
#

What is enum lol

shadow socket
jolly idol
shadow socket
#

@jolly idol your fan xD

shadow socket
#

@forest elm ok

jolly idol
shadow socket
#

@scarlet tangle ty

knotty plover
#

No

forest elm
#

pins

rare niche
#

So this is discordv14?

#

Hmm, ok.

forest elm
#

nope

cinder wraith
#

Except the guide actually does that

forest elm
#

you can check the commit history if you really want that

shadow socket
vague coyote
shadow socket
#

okay

#

Discord's Util?

fervent fossil
#

yup

shadow socket
#

K

scarlet tangle
urban belfry
#

@scarlet tangle use new ActionRow().addComponents(btn) instead of passing it to the constructor

scarlet tangle
#

Yes mb i forgot it

scarlet tangle
#

guild.fetchMember('id') or client.users.fetch('myId').then(function);?

#

what the

#

sorry wrong channel lol

scarlet tangle
#

does v14 contains breaking changes? like we did with v13 when we needed to rewrite everything from A to Z ?

scarlet tangle
#

like, we need to rewrite a lot or a little?

urban belfry
#

all the big ones are listed, that's all

pliant salmon
urban belfry
#

depends on how much you used one feature and how big your bot is of course

scarlet tangle
#

the way embed works changed?

#

nvm, ig ill check

tame gazelle
#

will a message be sent here when I new dev version will be available?

pliant salmon
pliant salmon
tame gazelle
urban belfry
#

i thought you were talking about v14 Thonk

tame gazelle
#

yeah but the dev version ._.

pliant salmon
#

You can just try to install djs dev everyday and see xd

uncut kelp
#

A new dev version is available every 12 hours

tame gazelle
#

thanks

latent lion
#

What error is this? And how do I fix it?

dawn phoenix
#

#addField needs to be passed an object

latent lion
#

The error says its here

dawn phoenix
#

that's the only one you adapted

latent lion
#

Now this error occurs

tame gazelle
#

cmd.description has a value of undefined

pliant salmon
#

Yes

latent lion
urban belfry
#

yeah and there isn't a description there

latent lion
pliant salmon
#

Try cmd.description ?? "undefined" and you will see

tame gazelle
latent lion
#

still same error

pliant salmon
#

Not ||

#

Use ?? instead

latent lion
#

its same

#

just ?? doesn't take false

pliant salmon
#
  • cleaner
latent lion
#

in replit it cause erorrs

#

but actually none when you run

#

same error

pliant salmon
coarse marten
#

is there any reason why its not working?

plain roverBOT
#

Tag suggestion for @coarse marten:
Sending and editing now takes only a single object parameter!

- channel.send(embed);
+ channel.send({ embeds: [embed, embed2] });
- channel.send('Hello!', { embed });
+ channel.send({ content: 'Hello!', embeds: [embed, embed2] });

• Full migration guide: learn more

urban belfry
#

also now it's Embed, and setColor only takes a number (or null)

coarse marten
#

and this is the value in setColor

urban belfry
#

no that is indeed a problem, maybe not the problem which is most probably Intents
what version of djs are you using?

coarse marten
#

the thing is, even without embed, the bot doesn't detect new server members, I tried to do only the guildMemmberAdd line with console.log(1) just to see output, and its not working

urban belfry
coarse marten
#

I tried, they told me to come here... \:

#

I tried using intents, that didn't help, or maybe I just didn't use it right

urban belfry
#

you were told that if you're using v14 which you aren't, to come here
you need to enable the GUILD_MEMBERS intent, for further help with your code, just go to #djs-help-v14

scarlet tangle
uncut kelp
#

Is there a question in there

scarlet tangle
#

There is a problem

#

And my question how can i fix it

urban belfry
#

@scarlet tangle thumbnail: {url: url}

tame gazelle
#

will it be possible to get the banner of the GuildMember?
or Discord didn't tell anything about that

urban belfry
tame gazelle
#

okay thanks (also nice pp ._.)

pliant salmon
#

Im pretty sure you can get the user banner

tame gazelle
#

user yes

pliant salmon
#

But idk if its implemented in djs yet

tame gazelle
#

but not GuildMember

urban belfry
#

No

pliant salmon
#

I can do some testing šŸ¤”

urban belfry
#

Don't bother
GuildMember banner isn't a thing

#

The api doesn't give you that

pliant salmon
#

Still, im pretty sure you can get the banner

urban belfry
#

Why?
You can get user banners
Not guild specifics

#

For now at least

gloomy kayak
#

Yeah per-user banners are availables through the API and supported by discord.js
per-member banners are still experimentals AFAIK and will be available in the future

pliant salmon
#

Oh, he is talking about per guild banners

#

Mb mb

tame gazelle
#

what did you understand by "GuildMember" ? ._.

pliant salmon
tame gazelle
#

no prob me too ._.

onyx cove
#

Is there like a change log for v13 to v14?

velvet jasper
onyx cove
#

Alr ty

novel notch
#

How you can put SelectMenu emojis

outer bane
#

{ id: '' } for custom ones, { name: '' } for unicode

novel notch
#

Thank you

#

Have the permissions been updated?

stray ferry
#

Is there any guide or docs for this package?

#

Got it in the pins.

cerulean bay
#

Any clue on these?

knotty plover
#

Those aren't merged yet afaik

glad vale
#

whats changed

vague coyote
blissful pivot
timid talon
#

How to import MessageButton, it is not working, was it renamed or something

distant canopy
#

ButtonComponent

trim walrus
#

Hello, I ran into the errors below when I was trying to build the app using newest version.

node_modules/discord.js/typings/index.d.ts:1422:42 - error TS2344: Type 'MappedInteractionTypes<Cached>[T]' does not satisfy the constraint 'MessageComponentInteraction<CacheType>'.
  Type 'MessageComponentInteraction<If<Cached, "cached", CacheType>> | ButtonInteraction<If<Cached, "cached", CacheType>> | SelectMenuInteraction<...>' is not assignable to type 'MessageComponentInteraction<CacheType>'.
    Type 'ButtonInteraction<If<Cached, "cached", CacheType>>' is not assignable to type 'MessageComponentInteraction<CacheType>'.
      Types of property 'channel' are incompatible.
        Type 'CacheTypeReducer<If<Cached, "cached", CacheType>, GuildTextBasedChannel, GuildTextBasedChannel, GuildTextBasedChannel, TextBasedChannel>' is not assignable to type 'GuildTextBasedChannel'.
          Type 'GuildTextBasedChannel | ([If<Cached, "cached", CacheType>] extends ["raw"] ? GuildTextBasedChannel : [If<Cached, "cached", CacheType>] extends [...] ? GuildTextBasedChannel : TextBasedChannel)' is not assignable to type 'GuildTextBasedChannel'.
            Type '[If<Cached, "cached", CacheType>] extends ["raw"] ? GuildTextBasedChannel : [If<Cached, "cached", CacheType>] extends [...] ? GuildTextBasedChannel : TextBasedChannel' is not assignable to type 'GuildTextBasedChannel'.
              Type 'GuildTextBasedChannel | ([If<Cached, "cached", CacheType>] extends ["cached" | "raw"] ? GuildTextBasedChannel : TextBasedChannel)' is not assignable to type 'GuildTextBasedChannel'.
                Type '[If<Cached, "cached", CacheType>] extends ["cached" | "raw"] ? GuildTextBasedChannel : TextBasedChannel' is not assignable to type 'GuildTextBasedChannel'.
                  Type 'DMChannel | PartialDMChannel | NewsChannel | TextChannel | ThreadChannel' is not assignable to type 'GuildTextBasedChannel'.
                    Type 'DMChannel' is not assignable to type 'GuildTextBasedChannel'.
                      Type 'DMChannel' is not assignable to type 'ThreadChannel'.
                        Type '[If<Cached, "cached", CacheType>] extends ["cached" | "raw"] ? GuildTextBasedChannel : TextBasedChannel' is not assignable to type 'ThreadChannel'.
                          Type 'DMChannel | PartialDMChannel | NewsChannel | TextChannel | ThreadChannel' is not assignable to type 'ThreadChannel'.
                            Type 'DMChannel' is missing the following properties from type 'ThreadChannel': archived, archivedAt, archiveTimestamp, _createdTimestamp, and 35 more.
                              Type '[If<Cached, "cached", CacheType>] extends ["raw"] ? GuildTextBasedChannel : [If<Cached, "cached", CacheType>] extends [...] ? GuildTextBasedChannel : TextBasedChannel' is not assignable to type 'ThreadChannel'.
                                Type 'GuildTextBasedChannel | ([If<Cached, "cached", CacheType>] extends ["cached" | "raw"] ? GuildTextBasedChannel : TextBasedChannel)' is not assignable to type 'ThreadChannel'.
                                  Type 'NewsChannel' is not assignable to type 'ThreadChannel'.
                                    Type 'CacheTypeReducer<If<Cached, "cached", CacheType>, GuildTextBasedChannel, GuildTextBasedChannel, GuildTextBasedChannel, TextBasedChannel>' is not assignable to type 'ThreadChannel'.
                                      Type 'GuildTextBasedChannel | ([If<Cached, "cached", CacheType>] extends ["raw"] ? GuildTextBasedChannel : [If<Cached, "cached", CacheType>] extends [...] ? GuildTextBasedChannel : TextBasedChannel)' is not assignable to type 'ThreadChannel'.
                                        Type 'NewsChannel' is missing the following properties from type 'ThreadChannel': archived, archivedAt, archiveTimestamp, _createdTimestamp, and 23 more.

1422     } & MessageComponentCollectorOptions<MappedInteractionTypes<Cached>[T]>;
feral sandal
#

ratio

uncut kelp
#

Care to elaborate?

trim walrus
uncut kelp
#

I can't reproduce that

urban belfry
urban belfry
#

that's still being discussed now afaik, whether or not the methods will take rest parameters or arrays or both
seems unlikely they'll support both

#

but it is a pretty easy change for you, if you're passing an array, just search all the addFields, and spread the array

vague coyote
#

Both

#

Just need to fix my pr woosh

urban belfry
#

no, a string

#

you know docs exist right, just select the builders docs

#

when constructing it with an APIEmbed, yes

#

how about you try?

#

or look at the docs, reply's embeds do take an array of APIEmbed s

#

okay, show your code and error

#

now it's Discord.Embed

#

yep

#

just to confirm, you are using v14, right?

vague coyote
#

No thanks

#

If you cant read, what are ya doing here cooldoge

urban belfry
#

doesn't seem v14 specific
<Guild>.channels.cache.find is still here

trim walrus
uncut kelp
#

I mean, I can't reproduce it, idk what you're doing

#

Send relevant info

novel narwhal
#

when is this coming out

urban belfry
#

there's no eta as of now ig

distant canopy
#

eta: when it is ready

jovial steeple
#

Discord.MessageEmbed()

dawn phoenix
#

@jovial steeple this is the v14 prep channel, it is Embed.

#

@lofty knoll presumably not very useful for this channel either

urban belfry
#

You can just use GatewayIntentBits.GuildMessages etc

#

The way the guide mentions

#

What did you do?

keen bobcat
#

code and d.js version

#

assuming is dangerous, verification is good

#

also, d.js v14 is not a thing yet, commit hashes are also important since you're on dev

scarlet tangle
#

whats new at v14?

#

only timeout?

knotty plover
#

Timeout is in 13.6

left thunder
quasi kite
#

I am not able to see the github branch for the development version

knotty plover
#

There is no branch, its the main

keen bobcat
#

See channel topic

#

I meant what I said

vague coyote
#

they didn't move anywhere

#

I can still access Constants.Events.INTERACTION_CREATE as always

#

ah yeah, was recent

#

use Constants.WSEvents.INTERACTION_CREATE I guess

loud mulch
uncut kelp
#

@meager crag are you... listening to raw WebSocket events?

#

Because looking at this
#djs-in-dev-version message
it seems you're not so yes there is a difference and yes the WebSocket ones are not what you're looking for (it won't work)

#

The one by GoldenAngel is the one you're looking for

loud mulch
uncut kelp
#

Yes

#

If you switch to Constants.WSEvents.INTERACTION_CREATE, none of your events will fire lol

#

Yes those are for listening to raw data only

#

And they don't have discord.js defined events

uncut kelp
gray jackal
#

Is there a guide for V14? Or what is new? (or just docs) nvm found it

edgy locust
#

i love v14

mellow jasper
#

where you got info about v14?

vague coyote
mellow jasper
neat jetty
#

I heard about a "modal" feature being in the works. What would it entail?

knotty plover
#

Popups like this one are modals. We don't have a lot of details so far, you'll be able to add text input fields to them and submit, which will trigger an interactionCreate event

neat jetty
knotty plover
#

no

velvet jasper
dull mulchBOT
velvet jasper