#djs-in-dev-version
1 messages · Page 32 of 1
whats the difference between PermissionFlagsBits & PermissionsBitField?, thats my question 💀
But... that wouldn't work
You need to pass a Twitch URL, for example, to have that status
The former is the import from the discord-api-types package. The latter is from discord.js with its own stuff on it
They change every hour
There are 3 entries in a database and the values change from 1 to 3 etc. but the value isnt being used from the database result properly and it’s failing because type isn’t being set.
OK so set it then
Just as a FYI, if you are in fact using 1, it will never work for you
Why? 1 works when it’s not in the botConf[0].statusType
You need to pass a Twitch URL, for example, to have that status
And if you don't include that, it still doesn't work, just tested that now
1 is not watching, it is playing...
wait...
but then you have the issue of using a database to make the values.
Shrugs how you implement whatever you're doing is on you
What is followUp() renamed to in v14? Can I get a link to docs of v14 of select menus
Documentation suggestion for @green plume:
SelectMenuInteraction (extends MessageComponentInteraction)
Represents a select menu interaction.
Ok why won’t type in activities accept anything but the magic number even if the variable I pass in is the magic number?
the type has to be a number, not a string
just use the ActivityType enum
Doesn’t work with the database.
why do you need a database for storing your own bots activity? how many activities do you have
It doesn't send a reply
const row = new ActionRowBuilder()
.addComponents(
new SelectMenuBuilder()
.setCustomId('select')
.setPlaceholder('Nothing selected')
.addOptions([
{
label: 'Antinuke',
description: "Get information on the Antinuke command",
value: 'first_option',
},
]),
);
if (ctx.interaction.value === 'first_option') {
await ctx.interaction.followUp({ content: 'Something was selected!'});
}
12
interaction.value doesnt exist
interaction.value isn't a thing
interaction.value? selectmenu's have a values array
So, how can I send a followup, when users selects the Antinuke menu option?
interaction.values is an array with the values the user selected
Okay
What happened that the js new ActionRowBuilder().addComponents([ new ButtonBuilder() //..code ])This error is issued: TypeError: component.toJSON is not a function
All builders are exported not from discord.js, and from @discordjs/builders
can you show the error stack and the rest of the code that's causing it?
Hey, I'm trying to create a channel and it's saying it expects only 1 argument. I checked the docs and there are 2.
I checked the docs and there is only 1
it's changed, it takes one option now
What are you looking at? Send a link
they're probably looking at stable
where can I find the dev docs?
Thanks!
will v14 drop MessageEmbed MessageButton MessageActionRow... builders? will we be required to use the djs builders package? and if so, how will the message object represent embeds, buttons, menus without djs builders package? or will it be sub package like collection?
hi
yes, they'll have read only Embed ButtoonComponent etc classes
EmbedBuilder.from(message.embeds[0])
never mind I just found the site, it says djs will be internally included 🙂 ||https://deploy-preview-1011--discordjs-guide.netlify.app/additional-info/changes-in-v14.html||
okay thanks
which branch is the v14 one? I heard taht v14 will be ts rewrite but in main branch I dont see any ts
there's really no definite "ts rewrite" version, back when we had v13 in dev, they'd say probably v14, there's no telling which version ends up getting the ts rewrite
ok
realistically I dont think it will be rewritten I was just curious if its really happening . The updates we're getting now are taking quite long time and they are not that huge. If they start working on ts rewrite that will take very long time and in the meantime discord's api will get many updates and additions making the package obsolete
Well, I now updated my code with this, still the interaction is not responding. But I don't get any error.
const collector = msg.createMessageComponentCollector({
componentType: "SELECT_MENU" })
collector.on("collect", async (collected) =>
{ const value = collected.values[0]
if(value === "first_option") {
collected.reply({embeds: [emb1]});
}
if(value === "second_option") {
collected.reply({embeds: [emb2]});
}
if(value === "third_option") {
collected.reply({embeds: [emb3]});
}
})
console.log(value) in there maybe?
Thanks, finally it worked
Hmm, strange though, ActionRowBuilder doesn't want to issue json. The picture in green shows the toJSON code from ActionRow.ts, and then by research I found out that I need to follow this path: js return { ...this.data, components: this.components.map((component, index) => component[index].toJSON()) } I may be working with the builder incorrectly, but still, the design I changed will work in the test attempts.
can't have upper case in names
that would be it. thanks
@outer bane look at my message, maybe you know what's wrong
I apologize if I was distracted 😦
I don't understand what your issue is exactly
The fact is that I create an ActionRow in the message itself, and here I get the error component.toJSON() is not a function
and what version of d.js and builders do you use?
Here I am trying to attach a button to a message, but ActionRow gives the component the wrong way, or rather it does not put the component in the message
discord.js - ^14.0.0-dev.1654949087-96053ba
package builders - "^0.16.0-dev"
Phew, I finally copied it
.setDefaultMemberPermissions(8) sets the comman to admins only, how would I modify this to only allow the specific user ID to see it? Or is this not possible with v14?
not possible with perms v2. you either need a bearer token or manually add user perms in your guild's integration settings
what does npm why @discordjs/builders show? I cannot reproduce the error with the above code, works fine for me
ill leave id check to in the command then as its an eval command
"discord.js-selfbot" ?
And damn, I didn't erase everything
Lmaooooooooooooooooooo
sus
Don't pay attention!
why you making a selfbot?
erasing it wouldn't change the fact that's that is most likely the issue here
I think they mean blur it out
you cant have buttons on a user message lol
ik, but the issue is multiple versions of builders
So there are different packages
isnt there something about selfbots... hmm...
Well, I mean that different packages use different versions of builders, it seems to work like this.
except it doesn't work, otherwise you wouldn't have the aforementioned issues
besides that, no support for selfbots here
No one wanted to show it to you at all, but since the problem is in the builders, I'll put the prefixes now 🙂
good luck keeping your account because I am pretty sure selfbots are against tos or something
This library is not even used by me, I am developing a normal bot. Therefore, it's not for me to worry
whys it in your project folder then?

Well, maybe because I'm not the only one working on this hosting? And with another developer.
well you should probably report that developer
Again, stop.
Not gonna say it again.
Keep the channel on topic.
Thank you who helped, in the end, because of this library, everything broke.
You might wanna look into how your applications being worked on get the node modules as if you have different library versions for different apps this issue will repeat.
Thank you, sometimes for some reason the disparity of versions does not break anything
Actually, it's possible.
That’s a bot
Well, yes, I was asking for a bot, how would we all write bots here, right?
yeah
They said a user's message
i said on a user message, you showed a bot message
Ah, got it 😔
Goodnight!
how would I extract the permission bitfield of the roles a user has as I am trying to make a role info command that can list all the info for the roles you have or the role you mention. But it is not letting me see the bitfield of the permissions for each role with the interaction.member.roles.cache script.
It shows me all the data except the permissions of the role.
It's right there though...
its just showing PermissionsBitField... I need the bitfield.
PermissionsBitField#bitfield
Bitfield of the packed bits
You shouldn't rely on outputs for your documentation, as it leads to this exact conversation
That doesn't fully help if I can't extract the value with the other information from the roles.
What are you still unable to find?
So interaction.member.roles.cache has all the info I need in it. But I need to be able to extract the permissions bitfield
but whenever I add anything to try and get that information, it doesn't work and tells me its undefine.
Make sure you treat the cache as a Collection<string, Role>
For instance, the full Collection does not have a .permissions property; only the Role entries within it
Ok well thats more complex then as I need to list all the roles and show their bitfield. I will play around and try to figure it out.
Like I need that output, but also need it to show the bitfield.
Collection#map()
Maps each item to another value into an array. Identical in behavior to Array.map().
you can map the Collection into each Role's permission bitfield
Thanks, that shows the bitfield now... But removes the rest of the output. I will go play around and see if I cant find a way to make it show all the data including the bitfield.
why does <client>.decrementMaxListeners() remove 1 listener, doesnt that break some event?
isnt that private? that's meant to be used internally in the lib
yes im aware, this question is lib internal
Those methods are used internally by collectors
increase listeners, bind collector
i am also aware of that
so decrementing has to do with binding?
I mean
The max controls how many you can bind without it throwing warnings/errors
So to make sure collectors dont throw errors, it increments, binds, then when the collector is over, unbinds, decrements
aha, i see.. i think
The default Node sets it to is 10 listeners per event
cuz it kinda seemed weird how there are 6 .on() added, on end 6 removeListener() called and then one additional listener removed via decrement
Where is that?
yeah im not saying its not, just trying to understand why its there
Its only adding 1 of each type of listener so the max only needs to increase by 1
oh i didnt see the incrementMaxListeners 
yeah no nvm, thanks monbrey 
The typings might have, show your code?
Show how the row is defined
it just edits the existing message with new components
did i miss something on my code ?
even at my interaction.followUp
Are you using ts?
yes
You need to specify what the ActionRowBuilder contains
ahh i see
but seeing MessageActionRowComponent made me curious
cuz Message is removed from everything like MessageEmbed to Embed
It’s from discord-api-types
How did you do that?
new ActionRowBuilder<ButtonBuilder>()
fixed this tho
Try on the constructor, not just the type
ah i see
yea fixed
thanks 😉
btw how to push a button inside a actionrow array ?
this is what i got
dont mind the code being weird
Uhhhh you probably have to toJSON() it
oh ok then
thanks
u mean JSON the message or the components ?
because u cant JSON an array
the btn
oops ok
Why are you pushing instead of using addComponent though
its an actionrow component from a existing message
yeah
Oh
Yeah in that case you cant modify it
You need to construct a new builder using ActionRowBuilder.from(the one from the message)
that's wrong u r mutating the cache
oops, forgot that
But youre not in v13 anymore
u should reconstruct it
ok
is this ok ?
yeah
ok then, thanks
how to add an new row to a existing message
with components already
i have msg.components already
[ ...oldMessage.components, newRow ]
That’s what the spread operator is for
You can’t type rowe w/ that constructor?
new ActionRowBuilder<ButtonBuilder>()…
I want every permission to get removed. What should I put in permissions:?
role.guild.roles.cache.get("role id").edit({
permissions: ,
})
0
Okay, Thanks
Should I put it like permissions: PermissionsBitField.Flags.0 or only permissions: 0?
just 0, there is no such thing as empty permissions in PermissionsBitField
I have tried putting 0, but it didn't work out
"0" or 0n
ok
It’s prob in the Formatters
should be a top level function in latest dev
Huh, not in Formatters
for some reason search isn't showing up
yeah checked other functions, searching functions don't show up
@woven grove ^ looks like top-level functions may not be indexed by search?
And #archive-site-discussion message
Why you deleted the Util class @uncut kelp
I didn't
Who deleted
Who indeed
who to git blame 😲
Strange
Ill look at the github commits maybe Ill find it out somehow
Who is suneettipirneni
Developer
He deleted it
they* dont assume gender smh
- made it top level
util wasn't even deleted, it was moved
Yes I need to know why
because
Can you tell me why they deleted Util if you know
because having a class like that with purely static methods is an anti-pattern
🤷 this wasn't done sooner since our documentation didn't support displaying top level functions, is all
Thank you @silent hedge your the only one who knew why they deleted
is Interaction.isAutoComplete() removed from v14 ??
how do i define this
Import it
why is this not working js client.user.setActivity(`your stats | /help`, { type: 'Watching' })
it works if i remove the type and then it sets it to playing
use the enum? read the docs to see which enum type takes in
Ok
it worked ty (ActivityType.Watching)
can someone help and me and explain why isModalSubmit() doesn't exist
I have already made sure I am running discord.js@dev as I also noticed isCommand() doesn't exist
Because they got removed, check .type instead
👍
Why isButton is a thing but isModalSubmit isnt
Because isButton needs two comparisons (type and componentType) while ModalSubmit doesn’t
Ok
check pins
hi, is it possible to invoke a command after a slash command(chaining commands)?
for examble i want to make a slash command (addNumberOption), and base on the input number i wanna chain another command.
how can i do that?
this isn't quite what you wanted to do, but it could help you accomplish something similar
https://discord.com/developers/docs/interactions/application-commands#autocomplete
https://discord.js.org/#/docs/discord.js/main/class/AutocompleteInteraction
look at warning
@ebon boughjs docs#1083
Sorry
ETA on stable v14?
When it's ready™️
is it soon enough that i should be basing new work on it or on v13?
welp no one knows when but you can choose to work on v14 early or stay using v13 until it's released
the api churn frustrates me, every year or two i have to rewrite everything or my bots all break
well we can't do anything about that 🤷♂️
will the migration to v14 be as dramatic as the migration to v13?
well, every version has breaking changes if this answers your question
though you can check all changes of v14 in this guide: https://deploy-preview-1011--discordjs-guide.netlify.app/additional-info/changes-in-v14.html
if you start to upgrade from v13 to dev now, the changes are small, just keep up with the commits to the dev version
My upgrade was pretty smooth, but having TypeScript complain to you helps a lot
I mean that’s lot of lines of code…
You should have seen my v12 to v13 upgrade
Maybe I should’ve
Context: I was writing in pure JS before, no typescript
thanks
thanks
For the modals, can you like show different questions based on previous answers?
You cannot change the modal midway through if thats what you are asking
So I need to send separate ones after they answer the previous ones
You cant send a modal on a modal submit tho
What if I await for the modal to be submitted from the interaction that sent the modal in the first place
How do I get the guild avatar url and guild banner url of a user? I mean the avatar and banner which nitro users can set in different guilds
You cant send a modal on a modal submit
neither can you send a modal on an interaction already replied with a modal
o_o
guildmember.displayAvatarURL()
you cant get the guild banner iirc
Oh okay.
Is that a discord limitation or discord.js limitation
discord
I don't know why it's not working but .displayAvatarURL() works fine
Thanks
hey guys
one question, can i add buttons to embed in discord.js?
no, you can add it under at the bottom
not related to one another
like this right? I'm looking for this but i'm not sure if this is possible through embeds
buttons and embeds are both something you attach to messages
and they are placed as such
content are above embeds are above components
they aren't mutually exclusive, you can add embeds and not buttons, buttons and not embeds or both they're really not connected
yes, you can
how may I do that?
if the webhook is created by your bot, it can have all types of buttons
what if its not, i just made the webhook myself
not using any bot, is that possible?
think about it, the button needs to be handled, if the webhook isn't attached to an application, what's going to handle the button when you press it?
if you don't have an application connected to the webhook, you can just make it use a url button afaik
Thats true, but i'm not looking for any action to call, mostly just a hyperlink
url button? is that just https://website.com?
the invite button here is a "link style button"
what they do is simple, just redirects the user to a link
can i add that to an webhook?
yes you should be able to
if its not application-owned you cant send any components
are you sure about that? weren't you able to just send url buttons? since they don't really need handling it made sense
yes, no
Why do I get undefined?
User#bannerURL()
A link to the user's banner. See [User#banner](<https://discord.js.org/#/docs/discord.js/main/class/User?scrollTo=banner>) for more info
Read the documentation, you must force fetch the user to get bannerURL
Okay
I want to ask whether the default emoji from the discord must be used like this too?
.setEmoji({ id: "969419421644902431" })```
Default emojis dont have ids they have names
You need to pass the unicode emoji to name
ok, I get it
roles.highest shows the highest role. But if I want to see the highest role of a user which contains role icon how can I get that?
roles.icon 😲
👍🏻
anything new added to v14? havent check since more than a month
check the commits i guess 
well, i hate those but ig if nobody can tell i'll do that
i mean a lot has been added in the past month
it's not covered in the guide completely, there isn't really a changelog yet
so there tyou go
okay suppose the highest role don't have any icon. then it would return null, So the bot will check which higher role have icon. and it will give that.
How can I do that?
role.icon -> The role of the member used to set their role icon
it'll give you the highest role with an icon
ight thanks
let me try this
quick question when is it going to release?
as always, no eta
may i know what are the features that are available in djs@dev?
Check the pins
I'm getting this error: TypeError: interaction.isAutocomplete is not a function
What's the correct name of this function?
Or I should now use the type property?
type property
😔
😔
https://thumbsnap.com/i/LaCzQ4sQ.png how do I define other types for the interaction parameter? it's just that not only chatinput commands will come here, but also buttons and menus.
the fact is that the interaction parameter will accept only the interaction that is specified, the main one, and the component itself will not show, or does it not work that way?
https://thumbsnap.com/i/kWjnfTF6.png Ah, that's how it works, got it
"Invalid Token Used"
I am Keep On generating the Tokens Again And Again But This Is Saying The Same Thing As Before
@knotty plover , Help Me, Sir
no
Please, Sir
no
Why, Sir
Read the server rules, specifically rule 6
oh, Um Okay
umm hehe
Sorry, Sir
Can You Still Help Me Out?
still no
ok Sir
how do i call the new ColorResolvables in v14 inside of embed objects?
lets say i want to use the random string
AttachmentBuilder i think
discord.js exports Colors
not sure about random, but you can use colors like Colors.DarkGreen or Colors.Blue etc
nope random doesn't exist
oh
you can use resolveColor('Random') to get a random color
idk if it works tho, always gives me black
then it doesn't work
ohhhh
any library i need for this?
are you on the latest dev release
i think so
did you import the func from djs
the Colors func or the resolveColor?
nvm nvm i figured it out, thanks
worksss
try RANDOM
oh ok you already fixed
the Util class has been removed?
the functions should now be exported directly as top level functions, iirc
like constant {someUtilMethod} = require("discord.js")
xactly
don't think autocompletes have min values?
people just type things and you respond with up to 25 things to select from
the type determines if the value is a string or a number
Yeah
so what do you expect a min value to be?
But with autocomplete you can as well input custom values
And in my case it's a withdraw command and the minimum amount is 10
But I check that bot-side now
you need to, there are no min values for autocomplete
you being able to bypass it by tabbing before anything comes up is more of a quirk than a feature
you're not really supposed to input custom things there, you're supposed to wait for the list to select things from
🤔
I think this is okay
Because in my case you would have to only choose between to withdraw only all or half your game money that would be annoying
sounds like you don't want autocomplete in the first place, tbh
if it's just a numerical value, you can specify min and max and call it a day
there is no reason for autocomplete there
This is just a plus, if the user wants to withdraw half, or in the case of a deposit command, he will be able to choose to deposit all at once rather than making another command to know how much he can deposit and then write the exact number
On PC that's not a big deal but on mobile that's a lot more intuitive and easy to use
did they updated commands interface for new member and dm permission in dev version, last time I checked only the builder has it
Yes, the command managers have them now too
cool
I'd be surprised if the API doesn't accept it
since the autocomplete results are more like suggestions
Hi, anyone have an idea why bot emoji do not work on 1 server, and on others?
If it's in an interaction reply, the @everyone role needs the Use External Emojis permission for the bot to be able to use them
okay, ty
does it do anything? if so, builders need a PR i guess
but if custom values past what you send in autocomplete are considered a valid use case the implementation is whack
I think it's documented that you can do custom values
then the UX is... interesting, to say the least
How do I send messages in channels now? channel.send() is gone...
no it isnt
very cropped image
and the error is?
what is channel?
I'm guessing unresolved promise
let channel = interaction.client.channels.fetch(pingChannelId)
Even the documentation no longer mentions the send method
I was right, unresolved promise
Ill do a console.log real quick
Documentation suggestion for @spiral agate:
TextChannel#send()
Sends a message to this channel.
seems there to me
yes, fetch returns a promise
fetch always returned a promise
v13 and v14
Now I can't seem to display a modal because at ModalBuilder.toJSON (/mnt/DATA/general_programming/CL bot/Club-League-Bot/node_modules/@discordjs/builders/dist/index.js:756:35) { validator: 's.string', given: undefined
The modal displays its components all right in the console log but when I try to display it this happens
[
ActionRowBuilder {
data: { type: 1 },
components: [ [SelectMenuBuilder] ]
}
]
the modal components
something expects a string, but it got undefined
yea but where is the string supossed to be
const modal = new Discord.ModalBuilder()
.setCustomId(`setteam`)
.setTitle('Select team')
let teams = []
for (let team of await sql.fetchteams()) {
teams.push(team.name)
}
console.log(teams)
const teamSelect = new Discord.SelectMenuBuilder()
for (let teamname of teams) {
let option = new Discord.UnsafeSelectMenuOptionBuilder()
.setLabel(teamname)
.setValue(teamname)
.setEmoji(':white_check_mark:')
teamSelect.addOptions(option.toJSON())
}
const actionRow = new Discord.ActionRowBuilder()
.addComponents([teamSelect])
modal.addComponents([actionRow])
console.log(modal.components)
await interaction.showModal(modal)
select menus are not supported in modals
bruh
even if it works, it is not released
you telling me I spend 2 hours for nothing?
Is it at least coming soon or discord API wont allow it?
Guess im using buttons
I mean it's not documented anywhere so what made you think it would work
I needed some way to display a select menu that you do not know what its contents will be
I thought this would work
Since slash commands cannot be updated on the fly without refreshing the entire thing...
you can send select menus in messages
Oh dam thats a type of interaction
I thought I could avoid listeners with the awaitModal() thing that I have spotted
but nevermind I guess
awaitModalSubmit() uses listeners under the hood
InteractionResponse#awaitMessageComponent()
Collects a single component interaction that passes the filter. The Promise will reject if the time expires.
you can also use this
I mean manually making the listener and then having to delete it
oh that exists as well?
There goes some of the work I did in the past
does
const tempEmbed = new EmbedBuilder(interaction.message.embeds[0])
no longer work?
you can use EmbedBuilder.from(<Message>.embeds[0])
await interaction.awaitMessageComponent()
^
TypeError: interaction.awaitMessageComponent is not a function
at Object.execute (/mnt/DATA/general_programming/CL bot/Club-League-Bot/src/commands/team management/setteam.js:60:27)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
uh
I thought command interaction implements InteractionResponses
how do you edit a message to be ephemeral whilst the reply is deferred?
you cannot edit ephemeral
welp, guess i have to stick to non-ephemeral
if interaction is a CommandInteraction, it's not a function
I am pretty sure that what I brought up is a CommandInteraction
well it's not a function.
ok?
isn't awaitMessageComponent a method on messages?
console.log(interaction.type == Discord.InteractionType.ApplicationCommand)
returns true
well I do guess that because awaitMessageComponent is not documented on CommandInteraction it is not available
Regular messages it is
how do you edit a button that you've already created?
parameter needs to be APIButtonComponent
edit the button, edit the message with the new button
try .components[0].data
-->
- client.on('message', message => { ... });
+ client.on('messageCreate', message => { ... });
- client.on('interaction', interaction => { ... });
+ client.on('interactionCreate', interaction => { ... });
Im having trouble with this.
Where do i need to change it and what do i need to change exactly
My Event Handler: https://srcb.in/cwhr1YwLNT
My Bot.JS File: https://srcb.in/yPG7teFcnP
- people have already explained this to you in #djs-help-v14
- don't crosspost please
- the above statement:
- client.on('message', message => { ... });
+ client.on('messageCreate', message => { ... });
- client.on('interaction', interaction => { ... });
+ client.on('interactionCreate', interaction => { ... });
already tells you what to do in different parts of your code, get rid of client.on('message', message => { ... }); and client.on('interaction', interaction => { ... }); and replace them with client.on('messageCreate', message => { ... }); and client.on('interactionCreate', interaction => { ... });
looks like doing this fixed it
But i dont know where i can change it.
Don't you already have the builder if you just created it?
iirc don't you need to get the button component from the ActionRowBuilder?
I changed it and still doesnt work for me
nevermind, didn't disable the button (no errors)
"changed it" what did you change it to
#8038 in discordjs/discord.js by nyapat opened <t:1654651775:R> (approved)
fix(webhooks): revert webhook caching (and returning Message)
📥 npm i nyapat/discord.js#revert-webhook-caching
@undone yew ^
that command doesnt work btw (the npm i ..)
just wait for it to be merged and released
any errors?
no changes
that command doesnt work btw (the npm i ..)
just wait for it to be merged and released
what should I do?
just wait for it to be merged and released
bot not responding
we know
i need to fix this error
you are on a dev version
Best not to use webhook until it is resolved
sure
i have some problems in modal of discord.js
Tag suggestion for @lilac bluff:
To help you we need more information:
• What are you trying to do?
• What is your code?
• What errors and debug logs do you have?
i can send here the code ?
You can clearly
client.on('messageCreate', message => { ... });
and
client.on('interactionCreate', interaction => { ... });
None thats the problem
that's v13 code
screenshot it
yes
well, you're most likely looking for v13 support #djs-help-v14
this channel is only for v14 support
it's a wip
yea, tho i do not recommend to use dev for now since it's unstable so you should prolly stick to v13 until official release of v14 (unless you love the risk of getting your bot broken with a new dev update)
What is the difference between @napi-rs/canvas and node-canvas ?
That is not related to discord.js
That's related to the guide of discord.js
Uhh rule 3 exists
its "faster and better" - core djs contrib
its explained here https://github.com/discordjs/guide/pull/1059#issue-1163518414
How can I return something when a user doesn't have a status? What should I put after ===? I have tried null, undefined. But none worked
if (user.presence?.activities === ) return "No Status Available"
check activities.length
means if the length is 0 then there would be no status?
okay
since the AutoMod feature has been released (https://discord.com/developers/docs/resources/auto-moderation) the status of this PR https://github.com/discordjs/discord.js/pull/7938 can be changed to "Open" no?
CombinedError (2)
Received one or more errors
1 CombinedPropertyError (2)
| Received one or more errors
|
| input.label
| | MissingPropertyError > label
| | A required property is missing
|
| input.value
| | MissingPropertyError > value
| | A required property is missing
2 ExpectedValidationError > s.instance(V)
| Expected
|
| Expected:
| | [class UnsafeSelectMenuOptionBuilder]
|
| Received:
| | { setValue: 'general',
| | setLabel: 'Genel Destek',
| | setDescription: 'Genel destek almanızı sağlar.',
| | emoji: undefined }
const selectMenu = new ActionRowBuilder()
.addComponents(
new SelectMenuBuilder()
.setCustomId('ticket-msg')
.setPlaceholder('Lütfen bir kategori seçiniz.')
.addOptions(
[
{
setValue: "general",
setLabel: "Genel Destek",
setDescription: "Genel destek almanızı sağlar."
}
]
)
)
what's the problem?
it should be function not property
use value, label, description, instead of setX
Documentation says it is not optional, so yes
https://discord.js.org/#/docs/discord.js/main/typedef/SweepOptions
in discord ^14.0.0-dev.1655381041-4df491c the ready event appears 2 times why?
Maybe you're listening to it twice
hm that's weird
nvm idk why I thought it'd work like that
don't send it here either, there's help on the dev branch discord.js
Man
Util#resolveColor is removed?
Util is removed, now resolveColor() and other functions from Util are top level
Thanks
You can import them like this import { resolveColor } from 'discord.js, instead of import { Util } from 'discord.js'
i set
It should work
Is your dev version up-to-date? The AttachmentBuilder no longer takes just the name as the second parameter, and it instead needs a { name } object
Hi, can someone tell me whats wrong?
const configAds = new EmbedBuilder();
switch (guildConfig.verified) {
case true:
status = '[2;31m[2;32mZAAKCEPTOWANA[0m[2;31m[0m';
embedColor = '00FF00';
configAds.addFields(
{ name: 'KANAŁ', value: guildConfig.adsChannelId }, { name: 'REKLAMA', value: guildConfig.adContent || 'Brak' },
);
break;
case false:
status = '[2;31mODRZUCONA[0m[2;31m[0m';
embedColor = 'FF0000';
break;
case null:
status = '[2;31mNIE ZWERYFIKOWANA[0m[2;31m[0m';
embedColor = 'FF0000';
configAds.addFields(
{ name: 'KANAŁ', value: guildConfig.adsChannelId }, { name: 'REKLAMA', value: guildConfig.adContent || 'Brak' },
);
break;
default:
break;
}
addFields is expecting an array
okay, ty
Is there any way to view archived private threads? Channel.threads.cache seems to only include unarchived / public threads
Edit: nvm, seems like now thats including archived private ones? weird.
I don't why I get this error. This error started to came since I added thumbnail in the embed. Can anyone help me out?
run: async (ctx) => {
const role = ctx.interaction.options.getRole("role");
await ctx.interaction.reply({
embeds: [
{
author: {
name: `${role.name}'s Information`,
icon_url: ctx.client.user.displayAvatarURL()
},
fields: [
{
name: "__General Info__",
value: `**Role Name:** ${role.name}\n**Role ID:** ${role.id}\n**Role Position:** ${role.position + 1}\n**Hex code:** ${role.hexColor}\n**Created At:** <t:${~~(role.createdTimestamp / 1000)}:R>\n**Mentionability:** ${role.mentionable ? "True" : "False"}\n**Separated:** ${role.hoist ? "True" : "False"}\n**Integration:** ${role.managed ? "True" : "False"}\n`,
inline: false
},
{
name: "Allowed Permissions",
value: `${role.permissions.toArray().map(e => e).join(", ")}`,
inline: false
},
{
name: `Role Members [${role.members.size}]`,
value: `${role.members.map(e => `<@${e.id}>`).length > 15 ? "More than 15! won't show" : `${role.members.map(e => `<@${e.id}>`).join(", ")}`}`,
inline: false
}
],
footer: {
text: `Requested by ${ctx.interaction.user.tag}`,
icon_url: ctx.interaction.user.displayAvatarURL()
},
color: 0x2F3136,
thumbnail: {
url: role.iconURL()
}
}
]
})
}
When I use directly use image link instead of role.iconURL() in thumbnail it works fine.
Read your error closely
data.embeds[0].fields[1].value[BASE_TYPE_REQUIRED]: This field is required
So it has nothing to do with your role icon URL. Look at your 2nd embed field's value
Hey here
what the status of automod feature ? is anything available in dev version or not yet ?
You can look at the pull request on GitHub
oh mb
Anyone know why ts is giving me an error?
ButtonBuilder.from(ActionRowBuilder.from(row).components[0].data).setDisabled(false);
- Argument of type 'Partial<APIButtonComponent> | Partial<APISelectMenuComponent> | Partial<APITextInputComponent>' is not assignable to parameter of type 'APIButtonComponent | JSONEncodable<APIButtonComponent>'.
- Type 'Partial<APIButtonComponentWithCustomId>' is not assignable to type 'APIButtonComponent | JSONEncodable<APIButtonComponent>'.
-Type 'Partial<APIButtonComponentWithCustomId>' is not assignable to type 'APIButtonComponentWithCustomId'.
-Types of property 'custom_id' are incompatible.
-Type 'string | undefined' is not assignable to type 'string'.
-Type 'undefined' is not assignable to type 'string'.ts(2345)
is SlashCommandBuilder part of djs 14?
yes
- const { SlashCommandBuilder } = require('@discordjs/builders')
+ const { SlashCommandBuilder } = require('discord.js')
all builders are now intergrated into the main package
so make sure to remove @discordjs/builders to avoid version conflicts
wut, updated dev version and got this error
so it should be like this ?
interaction.type == InteractionType.ModalSubmit
thanks
I got this err
use AttachmentBuilder
Hey, how do I edit the permission overwrites of a channel?
https://c.lunish.nl/T2Un.png
you have to typeguard interaction.channel
as the error is telling you, DMChannels dont have permission overwrites
ah yeah I have it (interaction.channel as TextChannel)
I tried (interaction.channel?.permissionOverwrites as TextChannel) at the beginning for some reasons lol
(dump ik)
unsure where to ask this, so i ended up asking here:
will djs v13 be discontinued like v12 when v14 officially releases, i have been thinking to work on v14 early before it becomes stable since late may (i might forget sometimes the answer)
Afaik v13 is supposed to work for some time
Doubt support will be removed right when v14 is released
ty for answer
This is what I do
if (!interaction.isChatInputCommand()) return;
if (!interaction.inCachedGuild()) return;
if (!interaction.channel) return;
// do stuff here
u must check type insted of isChatInputCommand()
if (interaction.type !== Discord.InteractionType.ApplicationCommand || interaction.commandType !== Discord.ApplicationCommandType.ChatInput) return;
I love being excessively verbose
isChatInputCommand() was not removed
That or will always be true… logic error my bad, read that wrong
dw TS would tell me if it would, I fucking love ts
okey
Only those that are replaceable with one single comparison statement were.
That should be an &&
Oh wait
It’s negated
needs to be ||
Yeah I thought it was if it was initially
Someone mind letting me know if plain text in certain Message embed areas (Like the footer) are completely deprecated in v14, I understand it’s better practice to use an object but I have several commands with embeds using plain text I’d like to know if I should update
Yes they are
Is all the rest stuff gonna be in djs instead of a separate package now
Like is the package not gonna get updated anymore
Oh I see
Is this will work??js if (file.type === 'ChatInput') file.type.replace('ChatInput', 1)
I like this better that enums
Utterly pointless but sure
it'll be a string of one though "1"
is this will not work, no 😦 use enums, that's just easier, don't start liking hacky solutions that don't work
If you want to have this unecessary converter, use file.type = 1
But you're building a workaround for the very reason enums exist - to have a readable string-like value representing a number
Ohh yes thanks!
properties of objects cant be constants though, thats from something else
Nevermind
what new in djs v14?
Pins
ok
How can I convert PermissionFlagsBits.SendMessages enum to just "Send Messages" ( a string )
If you have it in a PermissionsBitField use its toArray() method. If not where do you get it from?
if not, you can just use new Permissions(....).toArray()
then turn it from PascalCase to whatever you want
That sounds like v13 not v14
whatever the permissions class is now
but you can still pass the permission to it's constructor and call toArray on it
Okay thanks
Is defaultMemberPermissions can recieve an array?
yes
I mean defaultMemberPermissions: ['Administrator', 'KickMembers']
depends on where you're passing it
Wdym?
what's the greater context? where's this defaultMemberPermissions being passed to? is it a data for a method?
Ye
okay what method
ApplicationCommandData
i asked what the method was but oh well i'll assume this is the djs one which takes in permission resolvable, yeah it should work in that case, try it out
Okay
is there a change in the deploy commands.js in v14, i know its supposed to be using api version 10
i guess now globals are instant too?
other than the changes on builders, i really don't see any more changes (code wise)
since the guide‘s version of deployment uses REST and not discord.js itself it isn’t really an v14 change in itself
ah ic, welp at leat i only need to worry about 3 discord library dependencies rn. discord.ja, api types, and rest
those and the intents
what intents?
i am so confused
you missed the context, i asked where that specific guide mentions the intents
If you scroll down it should be there
Go to the guide not the doc
what doc 😭 what are you talking about 😭 we're talking about changes in the deploy-commands.js
which does not use intents
i know what intents are and how they changed stop confusing me
They’re supposed to be instant across all versions
Oh
Could you show me where
If you know
Kinda interested
no i am going to sleep, find it yourself
Ok
I mean I wanted to see also but I guess not
I think I found it
I still dont understand
Rest client needs no intents
Hey, I have one problem with collectors. I tried making a collector based on defined TextChannel, but it doesn't collect any messages (end event works).
Can anyone help?
const timeoutEmbed = new EmbedBuilder()
.setDescription(`> You got late! To complete the order press the button below!`)
.setColor(0x7c6bf3);
const timeoutActionRow = new ActionRowBuilder()
.addComponents(
new ButtonBuilder()
.setStyle(ButtonStyle.Success)
.setLabel('Complete the order')
.setCustomId('order-complete')
.setEmoji({ name: '🔗' })
)
const collector = new MessageCollector(channel, { time: 15000 });
collector.on('collect', m => {
console.log(`Collected ${m.content}`);
});
collector.on('end', cl => {
// @ts-ignore
msg.edit({ embeds: [timeoutEmbed], components: [timeoutActionRow] })
})```
do you have the necessary intents to receive message events and perms to view the channel?
is there an update log for each new dev version?
github commits
ah okay thank you
How can I check how many members are banned in a server?
can I have the documentation of v14 ?
Im just sending an array of buttons because action rows throw an error ?
// Action Row Example
message.channel.send({
content: `text`,
components: [new ActionRowBuilder()...]
})
// Buttons
new ButtonBuilder()
.setLabel(`${i}`)
.setCustomId(`${i}`)
.setStyle(ButtonStyle.Secondary)
your buttons need to be in an actionrow
actionrows didnt work lemme try them again
what's not working exactly, and show some code when you're trying to do it
And the error is just an type error
yep
added toJSON onto the action row and still the same thing
change new ActionRowBuilder() to new ActionRowBuilder<ButtonBuilder>()
in order to avoid type conflicts
thanks
you dont need toJSON if sending message/interaction reply
oh right, that's not rest 
Hi, what is AnyInteraction ? 
a union of all different types of interactions, will be renamed to Interaction later
Ok, but how fix it ? 
what do you want to fix?
Why it throws this error?
Code:
const embed = new EmbedBuilder()
.setTitle("Uncaught Exception")
.setDescription("At: " + origin)
.setColor(15548997)
.setFields([
{
name: "Error Name",
value: error.name ?? "Unknown",
inline: true
},
{
name: "Error Message",
value: error.message ?? "Unknown",
inline: true
},
{
name: "Error Stack",
value: error.stack ?? "No Stack",
inline: false
}
]);
isCommand(), isModalSubmit()
How to find them?
type your interactions as AnyInteraction and compare the type property
catch and console.log the error, it will be more readable than that
How compare the type property ?
Anyone know why?
Why replied stay false ? Yet I use interaction.reply
replied will only be set after reply resolves
I used interaction.deferReply, then interaction.editReply. But he tell me : Error [INTERACTION_NOT_REPLIED]: The reply to this interaction has not been sent or deferred. 
did you await the deferReply call?
ye
are you sure deferReply resolved? do you let it error silently?
Yeah, I sure
await interaction.deferReply({ ephemeral: true, fetchReply: true });
if (interaction.type = InteractionType.ApplicationCommand){
interaction.editReply(replyData).catch(console.error);
} else if (interaction.isButton()) {
interaction.editReply(replyData).catch(console.error)
}
why do you fetch the reply and why is there a single "="?
are you sure the error is from one of those lines?
No response 
Yes
Can I use defaultMemberPermissions: []? Or no?
What are some important new things in the dev branch
Theres nothing new in v14 they only renamed some things and stuff like that
check pins, there's a link with the changes from v13->14
defaultMemberPermissions are a string, "" might work
"0", it needs to be a string containing a BigInt
wouldn't that disable it for everyone instead of enabling it for everyone
Well, if you don’t want to put any permissions needed you simply shouldn’t include the field at all
Where can I find any documentation about what will be new in djsv14?
See pins
Ok ty
how do you make these checklist type things?
you can make them using select-menus??? never knew that
use setMinValues(..) and setMaxValues(…) to be able to select more than (or less than) one item only
MessageEmbed was removed right
use EmbedBuilder
thx
i think there is a misake in the website
feel free to mention it in 
#1146 in discordjs/guide by lolollllo opened <t:1654279479:R> (review required)
Update v14 guide
How do i kick a user with v14, as when i instantiate a kick using my kick command, it says: user.kick() is not a fucntion
thanks, is there a way to resolve a user given the id or do i just interaction.guild.members.fetch(interaction.options.getUser('user'))?
interaction.options.getMember('user')
tysm
Oh
if (!message.guild.me.permissionsIn(message.channel).has(PermissionsBitField.Flags.SendMessages))```
Cannot read properties of undefined (reading 'permissionsIn')
bumping
i've already tried ButtonBuilder.from(ActionRowBuilder.from(row).components[0].data).setDisabled(false);
gives me the same error
I'm having a direct image/video or what ever url, how can I upload this as a file? (without seding the link itself)
interaction.isModalSubmit is not a function``` it changes to what ?
nothing, do a regular type check
interaction.type === InteractionType.ModalSubmit
How do I use AutoComplete?
if (interaction.type === InteractionType.ApplicationCommandAutocomplete()) {}
this?
remove the () at the end of InteractionType.ApplicationCommandAutocomplete, it isn't a function
Someone know why it worked before and now there is an error?
because it's been removed, you now need to use c.type === ChannelType.GuildText
Like this?
yes

.
Documentation suggestion for @empty urchin:
AttachmentBuilder
Represents an attachment builder
@forest elm ..?
?
and what actually doesn't work?
editReply
.send({ files: ['url'] })
you cannot use editReply after you have responded to the interaction
you can put deferReply at the beginning of the code and use editReply in some parts of your code
ok how can i edit the reply ?
what should be awaited ?
await inter.deferReply()
await inter.editReply({content: `Loading ...`, fetchReply: true})
then editReply when i want to edit loading ?
yes
awaited ?
yes
sure you can?
well yes. That's about what I did
you said "you cannot" ._.
not working
and so I meant that after reply it is no longer possible to use editReply and deferReply
upload your team to that site completely
'Chu want boi
after reply it’s possible to use editReply
that’s.. logic
Hey, I get this Error inside of my Command Handler:
TypeError: interaction.isCommand is not a function```
//Verwende und Antworte auf Slash-Commands
client.on('interactionCreate', async interaction => {
if (!interaction.isCommand()) return;
const command = client.commands.get(interaction.commandName);
if (!command) return;
try {
await command.execute(interaction);
} catch (error) {
console.log(error)
await interaction.channel.send({
content: 'Tut mir leid! Während ich veruscht habe diesen Command auszuführen ist mir ein Fehler unterlaufen... Probiere es gerne noch einmal.',
ephemeral: true
});
}
});
Thx
אהלן
TypeError: MessageAttachment is not a constructor :
const attachment = new MessageAttachment(canvas.toBuffer(), `deck.jpg`);```
new AttachmentBuilder(canvas.toBuffer(), { name: 'deck.jpg' })
thx
bumping again...
If you already have the row constructed it would be much easier to edit the JSON instead of rebuilding from JSON like that…
Hey, why isnt this working:
I get a TypeError: Cannot read properties of undefined (reading 'Flags') Error in this Code:
if (!member.permissions.has(discordjs.Permissions.Flags.Ban_Members)) {
interaction.reply('Du hast keine Rechte, diesen Benutzer zu bannen!')
return
}
I also tried FLAGS.BAN_MEMBERS
PermissionFlagsBits.BanMembers
Thanks! I couldnt find that in the new Guide
.addFields([{}, {}])
addField got removed?
yes
Ahh oke
Please attach the code, according to the error screen, nothing is clear to me.
attachment is this: ```ts
if (reaction.message.attachments.first()?.url.endsWith('.png')
|| reaction.message.attachments.first()?.url.endsWith('.jpg')
|| reaction.message.attachments.first()?.url.endsWith('.jpeg')
|| reaction.message.attachments.first()?.url.endsWith('.gif')
) attachment = reaction.message.attachments.first()?.url;
else if (reaction.message.attachments.first()?.url.endsWith('.mp4')
|| reaction.message.attachments.first()?.url.endsWith('.mp3')
|| reaction.message.attachments.first()?.url.endsWith('.mov')
) {
attachment = reaction.message.attachments.first()?.url;
asFile = true;
};
`urlData`, `url` is this: ```ts
urlData = reaction.message.embeds.find((object: any) => ['acticle', 'gifv', 'image', 'video'].includes(object.type));
if (urlData?.type === 'video') urlData.video?.url;
else url = urlData?.thumbnail?.url;
embeds are just 1-2 message embeds, shouldn't matter here;
const message: Message | undefined = await (channel as TextChannel).send({
embeds: embeds,
files: urlData?.type === 'video' || asFile ? [attachment || url || ''] : []
});
Long code short, I copy the uploaded files from a user (starboard)
this is the video it tried to copy (70mb) https://c.lunish.nl/zdr2.png
smaller files work without any issues https://c.lunish.nl/v2zE.png
so I assume that it times out because the file is just large and takes long to upload
( @thorny haven )
@empty urchin can you tell in which part of the code the problem occurs?
await (channel as TextChannel).send(..)
To begin with, try putting channel as TextChannel in a separate variable
const channel = channel as TextChannel
the issue is that it times out with large files and not the typing lol
small files or no files at all work
I don't know yet, maybe there is a limit.
@empty urchin Discord bots are able to send files with a size of <8mb or =8mb by default, if there are boosters on the server, then the size of the files being sent increas
From the 3rd level of boost, bots will be able to send files <=100mb on your server
well the limit in my server is 50mn atm, maybe there should be a more clear error that the file is too big instead of just letting the request timeout
In the first screenshot, your file weighs 69 mb
yeah I know
then the file size is just the limit, but was I said^
I'll give you a tip, you can use pm2 if you want your bot to reboot instead of shutting down 🙂
I use pm2
this error is just local testing
I would still just want to get rid of errors lol
Well, maybe something else happened, but still, as you say, the limit of files you have is 50mb, so your bot will not send files over 50mb
yeah I noticed that, that's why I said that it would be helpful to get a clear error that tells you that the file is too large instead of just letting the request timeout
const newclient = new Client({
allowedMentions: {
parse: ["roles", "users"],
repliedUser: false,
},
failIfNotExists: false,
presence: {
activity: {
name: `Dm for Help & Support`,
type: "WATCHING",
},
status: "online"
},
partials: ["CHANNEL", "MESSAGE", "REACTION", ""],
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMembers,
GatewayIntentBits.DirectMessages,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.MessageContent,
GatewayIntentBits.DirectMessageReactions
]
});``` Strange the bot doesn't get a notification when someone dms him (newclient.on("messageCreate", async message => {console.log(message.content)) ...
Have you tried displaying message first?
yep he is able to react with guild messages
This is understandable, but when a bot is written to the dm, does something come to you?
(the problem is you need the Channel partial)
thx all
Hey, why doesnt this Permission Check recognise, that I have Permissions and Administrator rights?
//Get User from Interaction
var user = interaction.options.getUser("user")
//Bekomme Guild Object
let guild = interaction.guild
//Prüfe, ob der Benutzer die nötigen Rechte hat
await guild.members.fetch(user.id).then(member => {
(async() => {
console.log(member)
let user_perms = await member.permissions.has([discordjs.PermissionFlagsBits.BanMembers, discordjs.PermissionFlagsBits.Administrator], true)
console.log(user_perms)
if (user_perms == false) {
interaction.reply('Du hast keine Rechte, diesen Benutzer zu bannen!')
return;
}
//Check if Bot can Manage the User ( Ban the User )
if (member.manageable == false) {
interaction.reply('Der Bot hat keine Rechte, diesen Benutzer zu bannen!')
return;
}
//Ban User
guild.members.ban(user)
//Reply to Slash Command
interaction.reply("Der Benutzer " + user.username + " wurde gebannt!")
})()
})
user_perms is just "false"
every time
There's no point checking if someone has both ban members and administrator, since the latter supersedes the former
Also I cannot reproduce that with your exact code
Hmm okay. I will do some debugging again
How to defer interaction without sending loading message and other messages?
i think you have to reply to a interaction in some way
I don’t think you can
Based on what I know about the api
Yeah, Discord forces you to provide a good user experience
You only can defer message component interactions without sending messages
Users should know that the command was received
Initial response is a no but responses after can use deferUpdate()
Like if you want to respond to someone hitting a button and need more than 3 seconds then deferUpdate() would work pretty sure
Will djs 14 make it easier to make slash commands? Also will the prefix commands will be the same +don't expect a response until like 6-8hrs
No real change to either of those other than permissions v2
Hmm I'll take a look at docs when v 14comes out
I don't even need to chnage any coded only in permission handler Soo it. Be esay update for me
some structure names was changed
and some methods removed/moved
i rewritten my bot to djs v14 alr
const i = GatewayIntentBits;
const p = Partials;
const intents = [
i.GuildMessages,
i.DirectMessages,
i.GuildMembers,
i.MessageContent,
i.GuildScheduledEvents,
];
const partials = [
p.Channel,
p.GuildMember,
p.Message,
p.User,
];
Hey! So this is what I'm importing into my client, but I'm not receiving the messageCreate event. Can anyone help?
it says i cant send an empty message ```js
let image = await create(song.name, song.thumbnail)
let attachment = image
await interaction.followUp({
attachment: [attachment],
});```
How can i declare the new permission bitfield ? ( [BITFIELD_INVALID]: Invalid bitfield flag or number: VIEW_CHANNEL.)js await interaction.channel.permissionOverwrites.edit(interaction.member, { VIEW_CHANNEL: true, SEND_MESSAGES: false, SEND_TTS_MESSAGES: false });
gotta need the Guilds intent pretty sure
it's like the base intent for other guild intents
oh i see; thanks
TypeError: Cannot read properties of undefined (reading 'custom_id')
I don't use custom_id i use customId
can you show the full error and the code please
TypeError: Cannot read properties of undefined (reading 'custom_id')
at TextInputComponent.get customId [as customId] (C:\Users\utente\Desktop\IFireBot\node_modules\discord.js\src\structures\TextInputComponent.js:16:22)
at Object.run (C:\Users\utente\Desktop\IFireBot\src\SlashCommands\Owner\eval.js:15:47)
at Object.run (C:\Users\utente\Desktop\IFireBot\src\events\interaction\interactionCreate.js:9:31)
at Client.<anonymous> (C:\Users\utente\Desktop\IFireBot\src\handler\events.js:19:54)
at Client.emit (node:events:390:28)
at InteractionCreateAction.handle (C:\Users\utente\Desktop\IFireBot\node_modules\discord.js\src\client\actions\InteractionCreate.js:81:12)
at Object.module.exports [as INTERACTION_CREATE] (C:\Users\utente\Desktop\IFireBot\node_modules\discord.js\src\client\websocket\handlers\INTERACTION_CREATE.js:4:36)
at WebSocketManager.handlePacket (C:\Users\utente\Desktop\IFireBot\node_modules\discord.js\src\client\websocket\WebSocketManager.js:350:31)
at WebSocketShard.onPacket (C:\Users\utente\Desktop\IFireBot\node_modules\discord.js\src\client\websocket\WebSocketShard.js:476:22)
at WebSocketShard.onMessage (C:\Users\utente\Desktop\IFireBot\node_modules\discord.js\src\client\websocket\WebSocketShard.js:320:10)
I made my own function (to make my job easier) but it gave such an error, how can I fix it?
I'm fixed
thx
yikes
hey so i get this error TypeError: Cannot read properties of undefined (reading 'path') when i run ```js
let image = await create(song.name, song.thumbnail)
let attachment = new Attachment (image)
await interaction.followUp({
files: [attachment],
});```
new AttachmentBuilder(image)
create() is a fucntion i made w canvas
oh ight ty
I you pinged me because of this why?
to help me
read the rules thanks
ight sorry
?
code?
Interactions: Building and responding with modals
