#djs-in-dev-version
1 messages · Page 24 of 1
you respond to the interaction twice, don't do that
How did I respond two times? The message edits itself and then the select menu becomes disabled after a certain time that I have set in the collector.
i don't know why you overcomplicate this so much anyways
if someone chooses a category, just interaction#update, which edits the message the select menu is on
that should be the only response you need here
each selection/button press is it's own interaction instance
that error means you responded to the same instance twice.
yeah thats what i am doing right? The embed edits when a different category is chosen
I defer the update because all the menus will be updated if I dont. If I type help 2 times, both will get updated
So you have to editReply every interaction and it will cause an error if you use a command
also it will show interaction failed even tho it doesnt
You deferUpdate every interaction so this error can happen anywhere where you reply to an interaction
how do I fix it? I cant remove the defer update as it will edit all embeds then
outlined the approach here
i see no reason to defer in the first place, since i cannot see anything computationally heavy happening here
on a more meta level this all looks like a giant bandaid you stick onto things to not have to use slash commands, which would make that entire thing largely obsolete
If I don't defer, and I have two help menus (if 2 people use the help command), both the embeds are getting edited
pardon?
That's a really annoying way to share screenshots
But... is there anything I am doing wrong?
Sounds like your collectors and/or custom ids aren't sufficiently unique
So they listen to interactions from both
I just noticed even without deferUpdate all embeds are getting edited wtf
well yes, you dont update nor reply, so that defer is useless
How to only edit the embed of which the category was chosen from?
use a proper filter that only returns true if the message id is equal with the embed one
and consider using interaction.update()
How do I make it so each embed has different customids?
again, you dont need that. You have the initial message object, so just compare message ids in the filter
https://shanara.host/i/op6l34dd
100% I am doing wrong, this doesn't even edit the initialMessage. How do I check for what you said?
either call deferUpdate() or update() the message instead (it's the same as edit interaction.message)
const schema = require("../../Database/custom-commands");
const { EmbedBuilder, Util } = require("discord.js");
module.exports = {
name: "cc-list",
run: async (client, message, args) => {
const data = await schema.find({ Guild: message.guild.id });
if (data.length <= 0) {
const noEmbed = new EmbedBuilder()
.setTitle("No data")
.setDescription("There are no custom commands in this server")
.setColor(Util.resolveColor("DarkPurple"));
return message.channel.send({ embeds: [noEmbed] });
} else {
const embed = new EmbedBuilder()
.setColor(Util.resolveColor("DarkPurple"))
.setTitle(`A list of custom commands in ${message.guild.name}`)
.setDescription(`There a total of ${data.length} custom commands in this server!\n ${data.map((cmd, i) => `\`\`\`fix\n${cmd.Command}\`\`\``).join(", ")}`);
message.channel.send({ embeds: [embed] });
}
},
};
why does it show like this?
If I remove the codeblocks part it works fine
I want it like this
wrap it around the whole thing and not in .map()
ah yes that worked thanks
how can i save my stuff in a object?
How is it djs related?
i have ```js
client.on('messageCreate', async message => {
const prefix = 'm-';
let party = []
if(message.content === prefix + 'join'){
if(party.length === 0){
party.push({
name: ${message.author.username},
type: 'Party leader'
})
} else {
party.push({
name: `${message.author.username}`,
type: 'Player'
})
}
await message.channel.send({ content: ${party[0].name} joined and he is ${party[0].type} })
console.log(party)
}
})``` the user who join is not getting saved in the object
Your let party = [] is inside the messageCreate event
That means it gets reset every single message
ahhh
but even if i remove it it does not save
i think
I dont see what this has to do with discord.js v14 though
leme try
v13
This is the v14 channel and this is a basic JS scoping issue
Nothing to do with v13 too #useful-servers
fffff sorry bc on my pc i was on #djs-help-v14 now my pc died and im on phone i didnt notice so sorry
np
Its ok i forgive you, don't worry!
ty @knotty plover and @copper jetty
@knotty plover like i said the object is not saving the stuff
where are you declaring it?
nvm ty it is fixed
can bots not set guild vanities?
bots can set guild vanities, but its not documented so discord.js didnt implement it
whats the request path
thank you
intents are PascalCased
Hi i'm trying to send the user few menus but I have this problem:
with this code:
const res = [];
let currentMenu = new SelectMenuBuilder()
.setCustomId("value")
.setPlaceholder("Select a value.");
for(let i = 0; i < arr.size; i++) {
console.log(i);
if(i % 25 == 0 && i != 0) {
console.log("New Menu");
res.push(new ActionRowBuilder().setComponents(
currentMenu
));
currentMenu = new SelectMenuBuilder()
.setCustomId("value")
.setPlaceholder("Select a value.");
}
const currentOption = arr.at(i);
console.log(currentOption.name);
currentMenu.addOptions({
label: prefix + currentOption.name,
value: currentOption.id
});
}
if(currentMenu.options.length > 0) {
res.push(new ActionRowBuilder().setComponents(
currentMenu
));
}
interaction.reply({content: "f", components: res});
.setComponents and .addOptions now take an Array
I want to kill myself now.
After changing it it's still not working with the same error
show your updated code
const res = [];
let currentMenu = new SelectMenuBuilder()
.setCustomId("value")
.setPlaceholder("Select a value.");
for(let i = 0; i < arr.size; i++) {
if(i % 25 == 0 && i != 0) {
res.push(new ActionRowBuilder().setComponents([
currentMenu
]));
currentMenu = new SelectMenuBuilder()
.setCustomId("value")
.setPlaceholder("Select a value.");
}
const currentOption = arr.at(i);
currentMenu.addOptions([
{
label: prefix + currentOption.name,
value: currentOption.id
}
]);
}
if(currentMenu.options.length > 0) {
res.push(new ActionRowBuilder().setComponents([
currentMenu
]));
}
interaction.reply({content: "f", components: res})
.addOptions([{ label, value }])
I updated the code and It's still not working
check the stack then
i am using modals
error: DiscordAPIError: Invalid Form Body
data.components[0]: The specified component type is invalid in this context
You used modal in wrong context
its wrong?
new Modal()
.setCustomId('REQUEST_VIP_TAG')
.setTitle('❗» REQUEST VIP TAG')
.setComponents(
new TextInputComponent()
.setCustomId('EVIDENCE')
.setLabel('EVIDENCE')
.setStyle('SHORT')
.setMinLength(10)
.setMaxLength(100)
.setPlaceholder('LINK')
.setRequired(true)
)```
setComponents would take in an array
Yes Modal takes action rows
and it would be ModalBuilder?
and TextInputBuilder unless you use old version
is there any way to know the people who have entered through an invitation or which invitation a person entered with?
yes fetch all invites and when someone join check which invite uses went +1
ok
I assume MessageAttachment has changed to Attachment
indeed
Their removing Message from every class name
still a pr
No, maybe not yet 😂
Attachment don't have any builder methods like setName so its kinda useless
are you sure about that? https://discord.js.org/#/docs/discord.js/main/class/Attachment
nvm it has builder methods ive never seen anyone using it
Did setting a presence/status change at all?
ActivityType enum
Same
DiscordAPIError: Invalid Form Body
data.components[0].components[1]: The specified component exceeds the maximum width
data.components[0].components[2]: The specified component exceeds the maximum width
data.components[0].components[3]: The specified component exceeds the maximum width
new Modal()
.setCustomId('REPORT_PLAYER_MODAL')
.setTitle('❗» Denúnciar jogador')
.setComponents(
new MessageActionRow().addComponents([
new TextInputComponent()
.setCustomId('PLAYER_NAME')
.setLabel('Nome do jogador')
.setStyle('SHORT')
.setMinLength(1)
.setMaxLength(16)
.setPlaceholder('Insira o nome do jogador que deseja denúnciar.')
.setRequired(true),
new TextInputComponent()
.setCustomId('REASON')
.setLabel('Motivo')
.setStyle('PARAGRAPH')
.setMinLength(50)
.setMaxLength(500)
.setPlaceholder('Insira o motivo pelo qual está denúnciando este jogador.')
.setRequired(true),
new TextInputComponent()
.setCustomId('SERVER')
.setLabel('Servidor')
.setStyle('SHORT')
.setMinLength(1)
.setMaxLength(16)
.setPlaceholder('Insira o nome do servidor em que ocorreu esta denúncia.')
.setRequired(true),
new TextInputComponent()
.setCustomId('EVIDENCE')
.setLabel('Prova')
.setStyle('SHORT')
.setMinLength(10)
.setMaxLength(100)
.setPlaceholder('Insira um link de uma imagem que comprove esta denúncia.')
.setRequired(true)```
you can only have one textinput per row, 5 rows per modal
how come... what version is this? aren't these suffixed with Builder now?
yes, they probably just didnt update
13.06.0
whaaaa
I'm not familiar with a version like that?
are you using djs v13.6.0 with builders 0.13?
i wouldn't recommend that, see djs 13.6 uses builders 0.11 internally, so it's probably not the best idea to mash different versions and stick with the version djs uses internally
ah okay
i really think we should have a channel for v13-dev to avoid confusions like these
especially since it'll get more updates
i am not understand
on every actionrow, you can have up to 1 text input
and as usual, up to 5 rows on a modal
you added 4 text inputs to action row not 1
Is there a way to check if a message has been deleted? (I ask it because the .deleted method no longer exists in the version 14)
try and fetch it, if it fails, it doesn't exist
how can i fetch it?
message.fetch()
but like what, you're trying to delete a message? just call delete and handle the error
ok, thanks :D
How would I go through a list of users with the same name, then ban them if they have the same username?
Fetch all members and loop through the collection
await Promise.all([
members
.filter(member => member.user.username === 'someUsername')
.map(member => member.ban())
])
wouldnt it be member.user.username
Theres a rate limit on everything
So people cant abuse the APIs
yeah
can a GuildNews channel be a GuildText channel as well?
No
okay
Is the embed setFooter still broken?
Hmm just adding a footer causes my embed to crash. Only thing I changed
likely just coded incorrectly
whats the crash
I actually opened a issue ticket in the discordjs github but wasn't sure if it's implemented in the recent discord.js@dev release
const secretEmbed = new EmbedBuilder()
.setColor('#e7cb04')
.setTitle('test1')
.setDescription('test2')
.setImage(`attachment://${test3.name}`)
.setFooter('testFail');
omg...
Ah right. I forgot my old issue ticket was about footer not taking attachments correctly
Looks like thats using the old error message though, I did do a PR to improve the output so its more meaningful
Thanks. Dumb error by me
in modals anyway to change the character limit per text box?
.setMaxLength / .setMinLength
ty
TypeError: Cannot read properties of null (reading 'id')
at InteractionCollector._handleMessageDeletion (C:\RolexBot\node_modules\discord.js\src\structures\InteractionCollector.js:214:29)
at RolexBot.emit (node:events:527:28)
at MessageDeleteAction.handle (C:\RolexBot\node_modules\discord.js\src\client\actions\MessageDelete.js:22:16)
at module.exports [as MESSAGE_DELETE] (C:\RolexBot\node_modules\discord.js\src\client\websocket\handlers\MESSAGE_DELETE.js:4:32)
at WebSocketManager.handlePacket (C:\RolexBot\node_modules\discord.js\src\client\websocket\WebSocketManager.js:355:31)
at WebSocketShard.onPacket (C:\RolexBot\node_modules\discord.js\src\client\websocket\WebSocketShard.js:447:22)
at WebSocketShard.onMessage (C:\RolexBot\node_modules\discord.js\src\client\websocket\WebSocketShard.js:304:10)
at WebSocket.onMessage (C:\RolexBot\node_modules\ws\lib\event-target.js:199:18)
at WebSocket.emit (node:events:527:28)
at Receiver.receiverOnMessage (C:\RolexBot\node_modules\ws\lib\websocket.js:1137:20)
at Receiver.emit (node:events:527:28)
at Receiver.dataMessage (C:\RolexBot\node_modules\ws\lib\receiver.js:528:14)
at Receiver.getData (C:\RolexBot\node_modules\ws\lib\receiver.js:446:17)
at Receiver.startLoop (C:\RolexBot\node_modules\ws\lib\receiver.js:148:22)
at Receiver._write (C:\RolexBot\node_modules\ws\lib\receiver.js:83:10)
at writeOrBuffer (node:internal/streams/writable:390:12) uncaughtException
``` is this a bug or smth it works properly sometimes after it stops and gives this error which results in a interaction failed message
it's a bug but it has already been fixed, update
alright thanks
does dev version have attachments?
do you mean to ask attachment options?
yes in slash commands
yeah we have that and it'll drop in version 13.7 too
i have a problem using flags in v14 and some ppl told me to change intents to IntentsBitField because it got renamed
but if i change intents to ... then i'll get more problems
like?
which problems? what is your new code?
read the guide for updating
it's called intents, lowercase
oh rly?
only the client option btw, not you still have to change Intents.FLAGSIntents.FLAGS to IntentsBitField.Flags
they didn't tell you to change the property, they told you to change the flag accessing
again, there's a guide for updating and it's pinned
ReferenceError: Intents is not defined Next error
read the guide for updating
again, there's a guide for updating and it's pinned
i try to fix that code for hours and i looked for so much information ;-; i just want help
so go to guide
i am and it didnt helped me
can anyone help?
code:
if(cmd == `!h`){
let channel = message.member.voice.channel
if(channel) {
channel = "**מחכה בחדר: ** <#" + message.member.voice.channel + ">"
}else{
channel = ':x: **לא מחובר לשום חדר** :x: '
}
var reason = args.join(" ");
if(!reason) reason = "לא צויינה סיבה";
const embed = new EmbedBuilder()
.addField( "**__ממבר__**:\n",` ${message.author} | **זקוק לעזרתך!**`)
.addField("**__וויס__**:", `${channel}`)
.addField("**__סיבה__**:\n", reason)
.setColor(`#11CCEE`)
.setThumbnail(message.author.displayAvatarURL({dynamic: true}))
.setFooter(message.author.username + "#" + message.author.discriminator, message.author.avatarURL)
.setTimestamp(new Date())
message.channel.send({ content: '<@&968138149429649469>',embeds: [embed] });
setTimeout(function(){
}, 20000);
}```
use addFields
Now saying Im not connected to voice, even when I am.
if(cmd == `!h`){
let channel = message.member.voice.channel
if(channel) {
channel = "**מחכה בחדר: ** <#" + message.member.voice.channel + ">"
}else{
channel = ':x: **לא מחובר לשום חדר** :x: '
}
var reason = args.join(" ");
if(!reason) reason = "לא צויינה סיבה";
const embed = new EmbedBuilder()
.addFields(
{ name: ` **__ממבר__**:\n`, value: ` ${message.author} | **זקוק לעזרתך!**`},
{name: "**__וויס__**:", value: channel},
{name: "**__סיבה__**:\n",value: reason}
)
.setColor(`#11CCEE`)
.setThumbnail(message.author.displayAvatarURL({dynamic: true}))
.setTimestamp(new Date())
message.channel.send({ content: '<@&968138149429649469>',embeds: [embed] });
setTimeout(function(){
}, 20000);
}```
you need GuildVoiceStates intent
Thanks. next time I'll just enable all the possible intents.
don't
Why not?
bad idea, just use the ones you need, easy way to know, read the guide
just use the ones you need
Easier to do isn't?
Cuz you get payloads you dont need.
Its not easier.
it takes like 3 minutes to learn, saves up a lot of resource use
How I can create an message component collector on a interaction reply ?
(How I can listen to button interactions on a interaction reply)
reply({fetchReply: true,.........}) will return a message (resolving a promise)
okay, thanks
and the it's simple, create a collector on the the message
You don’t need fetchReply anymore for v14 to use collectors
whaa
So I just have to resolve the promise without adding fetchReply
yeah await it
since when? how
and why'd the source button on the docs break again
#7623 in discordjs/discord.js by suneettipirneni merged <t:1650185976:R>
feat: allow createMessageComponentCollector without using fetchReply
Are you on the latest dev version?
no
then just update..
Oh edit reply always gives the message back anyways you just need to cast it as a message
i mean this one makes sense right? shouldn't you be using the inCachedGuild type guard?
thanks
(intermediate value).setColor is not a function what does this supposed to mean?
show the code
let emb = new Embed()
.setColor(0x2F3136)
.setFooter({
text: `Page ${page}/${Math.ceil(ctx.client.guilds.cache.size / 10)}`
})
.setDescription(description);
its EmbedBuilder
is the import from builders or djs?
both work actually
djs just adds more functionality on the builders one
and why'd the source button on the docs break again
Do you have an example area?
How can I put hex code in embed color?
like here
Or just use a hex string
When is v14 coming out ?
Hi, can sb help me?
TypeError: components.map is not a function
const adContentModal = new TextInputBuilder();
adContentModal.setCustomId('adContentModal').setLabel('Treść reklamy').setStyle(TextInputStyle.Paragraph);
const firstActionRow = new ActionRowBuilder<ModalActionRowComponentBuilder>().addComponents([adContentModal]);
setAdModal.addComponents(firstActionRow);
await interaction.showModal(setAdModal);
This line returns error
setAdModal.addComponents(firstActionRow);
it takes an array
where
You tell us, how did you register them
Hey, cannot figure out why this is happening
Not our package, not supported
update to latest dev version
Theyre not even using the dev version
how
then install dev version @lavish snow
Also because I'd already spoken to them in another channel
i thought it was Modal in older versions sorry
no
Good morning.
Any ETA for when Discord.JS V14 would release, as in the date?
no eta
Looks like it expected a number and didn't get one
I believe it’s from a item.length constraint, where the item doesn't have a length property
ahh
what
🤔 where are the other get functions
oh nvm
it was CommandInteraction not ChatInputCommandInteraction
Is there an error?
use slash have this
You still haven’t showed the stack trace as requested earlier
Please just show the stack trace
what is MessageAttachment v14
Attachment
how can i install dev and will it break my v13?
that slice (probably) returned an empty array
check for the length .options.length, an empty array is truthy
I got this
where is this code?
are you modifying your .token? calling destroy, anything?
that really does not help
i asked where it was, and for additional context
ah so maybe that's just undefined
but this shouldn't be connected to the code you've shown though
Yes that's why I find that weird
and at the start?
the stack trace shows minified code which means you are not on the latest dev commit, you should update
deprecation 👀
There's a high possibility that whatever lead to you getting those errors is already fixed, there was a fix for invalid webhook tokens resetting the bot token
ah
why does it appear like this? was fine before
TypeError: Cannot read properties of undefined (reading 'permissions')
log interaction
How do you make the bot's status member count of a specific guild in v14?
current code:
client.on('ready', () => {
console.log("online")
setInterval(() => {
const totalMembers = client.guilds.cache.map(guild => guild.memberCount).reduce((a,b) => a + b, 0);
client.user.setPresence({ game: { name: totalMembers, type: 'WATCHING' }, status: 'online' })
.then(console.log)
.catch(console.error);
}, 1000 * 60 * 5);
})```
game is not a valid option
Then I am asking, how do I do that in v14.
same as v13 pretty much
except the ActivityType enum
Can't be simple as this?
client.on('ready', () => {
console.log("online")
client.user.setPresence({ activity: { name: `${client.users.cache.size} members` , type: 'WATCHING'}, status: 'online' })
});```
activities: [ { name: "name", type: ActivityType.Watching} ]
Idk if I made the enum correctly, I didn't really get to see how it is because docs don't link to it
it's fine
client.users.cache though, no that's not reliable really
your previous implementation was better
Wait so with this,
client.on('ready', () => {
console.log("online")
setInterval(() => {
const totalMembers = client.guilds.cache.map(guild => guild.memberCount).reduce((a,b) => a + b, 0);
client.user.setPresence({ game: { name: totalMembers, type: 'WATCHING' }, status: 'online' })
.then(console.log)
.catch(console.error);
}, 1000 * 60 * 5);
})
How do I involve what you sent in that?
replace game: {...} with that
right.
client.user.setPresence(activities: [ { name: client.users.cache.size + "members", type: ActivityType.Watching} ])```
now fix the syntax
you should still replace client.users.cache.size and fix syntax
Getting your bot's member count
• client.users.cache.size is unreliable because it will only return cached users
• The preferred method is using collection.reduce() on client.guilds.cache
client.guilds.cache.reduce((acc, guild) => acc + guild.memberCount, 0)
client.on('ready', () => {
console.log("online")
const count = client.guilds.cache.reduce((acc, guild) => acc + guild.memberCount, 0)
client.user.setPresence({ activities: [ { name: count + "members", type: ActivityType.Watching }]})
});```
looks fine, test it
Look at the bottom pic... that's the error I get.
ActivityType is not defined.
import it from djs then
import it from discord-api-types, I don't think djs exports it
actually, it does
👍
hey, how do I get v14 ?
check the topic of this channel
thanks, are there docs too?
thanks sir
const m = await cmd.reply({
components: buttons,
content: question,
ephemeral: true,
});
const buttonsCollector = m.createMessageComponentCollector({ time: 60000 });
buttonsCollector.on('collect', (interaction) => {
console.log(interaction);
});```
why is interaction not collected, is there a different way for collecting ephermeral interactions?
specify fetchReply: true on your reply option
will try
in v14 it returns an InteractionResponse object if fetchReply isn't specified
you shouldn't need to fetchReply anymore just to create a collector
that worked, thank you
this worked
@brazen knoll could you try and update to the latest commit first?
i did just yesterday
if this doesn't work, that's an issue right there
could you log m?
i can't test it now, but well it is an InteractionResponse, maybe it being ephemeral is the issue
probably, well the fetchReply fixed it so im happy
new Builders.ModalBuilder()
.setCustomId(`suggestionReason_${i.createdTimestamp}`)
.setTitle('Add Details')
.addComponents([
new Builders.ActionRowBuilder().setComponents(
new Builders.TextInputBuilder()
.setCustomId('longReason')
.setLabel('Put long Text here')
.setPlaceholder('optional')
.setStyle(Discord.TextInputStyle.Paragraph)
.setRequired(false)
.setMinLength(0)
.setMaxLength(4000),
),
]);```
data.components[0].components[BASE_TYPE_REQUIRED]: This field is required
now im trying to do modal stuff but i cant figure out how to make it work
issue was .addComponents([]), shouldnt be given an array
Update, it should.
setComponents takes an array as well
bots cant delete ephemeral messages can they?
no

how to fix?
remove ...
on components ...
it must be array
ok
they made it accept arrays now
update node
addComponents takes an array
they made it work with arrays for some reason
Anyway to fix this?
<GuildChannel>.isText()
isText() is a typeguard, use it like one
Hey, my code doesnt log it
modalSubmit isn't discord.js event, use interactionCreate
Are we able to create confirmation modals like this?
no
How I can install discord.js v14 ?

npm install discord.js@dev
Is there a guide for modals?
yes
Yes, Check the pinned messages
You can't 🙂
That's unfortunate.. thank you though!
is slashCommandBuilder not integrated into djs 14?
no
it is re-exported though
ok i dikdnt know sorry
no worries, everything from builders is being re-exported nowadays
because you can't get Message, Focused, Mentionable, Role, Attachment, Number, Integer, String, Channel, Boolean, SubcommandGroup or Subcommand from ContextMenuCommand
Interaction#isChatInputCommand()
Indicates whether this interaction is a [ChatInputCommandInteraction](<https://discord.js.org/#/docs/discord.js/main/class/ChatInputCommandInteraction>).
Any clue why this is happening? Pretty sure I'm setting the name?
whats moveCmd.moveCategory
i think thats what you can get from commands
what typeguard did you use?
you would have to check if its ChatInputCommand
it has to be an array of objects, { name: 'Name', value: 'name' }
@marble blade
what 
❌
you can only get subcommand from chatinputcommand
you cant from contextmenucommands
because you cant add any options to contextmenus

how to fix?
what is action
const action = new Menu()
Menu isn't discord.js constructor unless you renamed it
i get it from here
I changed it to this but still getting the same error
this is official discord.js constructor
yes right i forgot
can i find out if a user has their DMs closed before doing a post request
NO
OH OKAY :(
No, only way to check is to catch the error from .send
it'd be nice of discord to add something to the user object where you can figure that out
would also lessen ratelimit possibilities
How can I remove the APIInteractionDataResolvedChannel type?
typeguard
I don't understand why it's needed at all.
how to fix?
Add if (!interaction.inCachedGuild()) return in command handler
okay)

Channel.isTextBased() ?
no this includes dm, threads and news
And define all interactions as Interaction<"cached">
Kind of confused as to why I'm getting this error
just channel.isText()
The first provided choice is malformed
It’s missing a string name, and a string value property
Guild#commands
A manager of the application commands belonging to this guild
This is malformed?
are you on the latest versions? because it used to take an array, and then rest parameters, and now an array again
Try spreading the Array
The current main branch takes rest parameters for addChoices
oh yeah what 
@velvet jasper is this intentional? slash command string/number/whatever options addChoices takes rest parameters
https://github.com/discordjs/discord.js/blob/df64d3ea382c07e66bc7cc8877ee430206c31d63/packages/builders/src/interactions/slashCommands/mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin.ts#L22
don't ping contributors... their busy people
No Vlad stated they would change at some point
How to use descriptionLocalizations correctly? I tried to set the Ukrainian text, but the description is still in English. How does it work?
how do you set rest parameters for addChoices then? never heard of that
.addChoices({ name, value }, { name, value })
i think you have to set your discord lanuage to ukrainian or you have to be in ukraine
It doesn't work
well did you enable the build overwrite for it?
afaik its not rolled out yet on clients
https://discord.com/__development/link?s=2mmZHcCA7EGY7gaDAtbp1HeVsA6KCu1VQNMZX6thh0w%3D.eyJ0YXJnZXRCdWlsZE92ZXJyaWRlIjp7ImRpc2NvcmRfd2ViIjp7InR5cGUiOiJicmFuY2giLCJpZCI6ImZlYXR1cmUvd2ViLXNsYXNoLWNvbW1hbmQtbG9jYWxpemF0aW9uIn19LCJyZWxlYXNlQ2hhbm5lbCI6bnVsbCwidmFsaWRGb3JVc2VySWRzIjpbXSwiYWxsb3dMb2dnZWRPdXQiOmZhbHNlLCJleHBpcmVzQXQiOiJUaHUsIDA1IE1heSAyMDIyIDIyOjE1OjE4IEdNVCJ9
wha
no array?
it should take an array as well
apparently it only takes rest parameters but I just get an error if I put in 2 objects like that with no array
are you using the latest version of builders? aka 0.14.0-dev.1650931748-df64d3e
because it takes rest parameters
wow, what is this?
I'm on 14.0.0-dev.1650931749-df64d3e
ngl I have no clue what rest parameters are but I put it in like that with no array and it just gives me an error. MDN docs didn't make much sense to me
again, it should take an array
build overwrite for slashy localization
already tried that and got this error
"rawError": {
"message": "405: Method Not Allowed",
"code": 0
},
"code": 0,
"status": 405,
"method": "put",
"url": "https://discord.com/api/v10/applications/962304955971174440/guilds/626102413857652746/commands/permissions",
"requestBody": {
"json": [
{
"id": "965298369247453294",
"permissions": [
{
"id": "658779239117750285",
"type": 1,
"permission": true
}
]
},
{
"id": "964957793205514300",
"permissions": [
{
"id": "658779239117750285",
"type": 1,
"permission": true
}
]
}
]
}
}
const fullPermissions = [
// Ping - pong?
{
id: '965298369247453294',
permissions: [{
id: process.env.ADMIN_ROLE_ID!,
type: 1,
permission: true,
}],
},
// Mod Suggestions
{
id: '964957793205514300',
permissions: [{
id: process.env.MODERATOR_ROLE_ID!,
type: 1,
permission: true,
}],
}
];
if (!client.application?.owner) await client.application?.fetch();
await client.guilds.cache.get(guildId)?.commands.permissions.set({fullPermissions});
Known Discord issue
DiscordAPIError: Bots cannot use this endpoint
when setting command perms
Same issue
Okay
you can't set permissions...
Discord trying to roll out slash cmd perms v2
The whole point of permissions V2 is that you don't need to set permissions
how to fix it?>
The admins of the server do
maybe add this to faq because many people will try this
Using a UI
UI?
User Interface
Only a 30 min warning? 
Did Discord give an earlier warning?
no
Right, totally won’t affect bots that currently use it
so i delete the whole code setting perms?
yes
ok
Okay but can i set default perm for command?
its only in dev right?
unless your bot is in guilds that dont have permissions v2 yet
Which they're rolling out to all of them now
Okay thanks
it will be removed in v14 probably
There will be way to set perms from API soon?
Question, is addComponent array or not? Some say its a rest param?
Prob when Discord removes it from their docs
its more of a urgent fix i think
addComponents should definitely already take array
Not rly
or add a deprication tag
Bots can’t just not use it
not every server has permissions v2
Alr 👌
do you turn on the perms v2 or does it happen for random servers?
thats automatic
Discord has to process all of the guilds
where to look on the guild to set the perms?
Discord heavily relies on the eventual consistency model
Integrations and your application
or something like that
where?
ur looking at it
In Bots and Apps section
no commands tab seen
then its not on that guild yet
my client is getting the error and also doesnt see the commands tab on his server
again, they are rolling out perms v2, you will have to wait
do i shut down the bot till it appears?
you do what you wanna do
Does anyone see anything that is been changed? Cause I get a component.toJson error whenever I try to run this cmd
could you send the stack too?
and make sure all the packages are up to date
I mean i'm using the absolutely newest v14 version, could it be something with the package itself?
i dont see where you use showModal in this code
I don't, more or less getting the same error for every button I click
either way try updating builders to dev and djs to dev
How can I send components?
addComponents takes an array
now its good
Errors?
Alr well updating builder & rest package doesn't work, I assume its just a bug in the latest dev version
@marble blade #djs-in-dev-version message
if you don't show the part where you call ButtonInteraction#showModal we can't help you
Well it was just a button I clicked randomly, none of my buttons work but sure i'll show it
cannot reproduce the error with latest dev, is your builders package up to date? if you have it installed manually remove it, d.js exports re-everything from it
Its interactionCreate.js line 427?
don't do this it will slow down your bot
you can't use SCREAMING_SNAKE_CASE for things like styles anymore in v14 dev
see the changes/guide in pins
InteractionCollector (extends Collector)
Collects interactions. Will automatically stop if the message (Client#event:messageDelete messageDelete or Client#event:messageDeleteBulk messageDeleteBulk), channel (Client#event:channelDelete channelDelete), or guild (Client#event:guildDelete guildDelete) is deleted. (more...)
Modals arent message components
On the subject of modals, it is not impossible to modify the OG interaction once the modal has been shown, correct?
ModalSubmitInteraction#update()
Updates the original message of the component on which the interaction was received on.
Whenever I try to make edits to the original ephemeral interaction after a modal is shown, it tells me the interaction has already been acknowledged.
Hm
Let me give it the ole try
Or just interaction.editReply on the original
^ Now that I know fails
Why?
Already acknowledged means you're using the default reply again
editReply would work for up to 15 minutes
I really couldn't tell you why, but if I showModal() and then follow it up with editReply, then it fails. You're welcome to give it a quick shot on your end if you'd like
Been struggling with this all day
So uhh... what triggers the modal?
A button in an ephemeral message
So if a Slash Command triggers the modal, theres nothing to edit. Just reply to the modal
A button in a message, you should still be able to use ButtonInteraction.editReply I would have thought
But still, might as well use ModalSubmitInteraction#update to achieve the same thing
Let me give this a shot (ModalSubmitInteraction.update())
Since I need to do that on the modalSubmit event anyways
God fucking dammit.
No it worked perfectly.
oh good lol
I didn't think to do an update on the ModalSubmit interaction because I figured you can't update a Modal
I mean the verbiage Discord's API uses is weird. You're not updating the Modal, and a ModalSubmit stems from a modal interaction. Maybe I am just an idiot, but the wording is a bit strange.
A .reply() on a Modal makes sense to me, though.
Thank you
is there a bug on Guildmeber.displayAvatarURL in current dev version?
my code is iconLink: guild.members.cache.get(userid).displayAvatarURL({ format: 'png', dynamic: true, size: 2048 }), but it only return .webp url
format was replaced with extension, and the dynamic option was removed
oh thx
Hello,
I followed the instructions I found on https://discord.com/blog/slash-commands-permissions-discord-apps-bots but despite that I can't modify the permissions of my commands: when I click on "manage" on my bot line in my server's integrations list I don't have the part that allows me to allow or deny permissions for commands.
If it helps it's a certified bot on a partner server
That is not a DJS issue
Try restarting/updating your Discord client (not bot), and if that doesn't fix it, it may take a little time before the server gets the feature
Restarting my discord client worked, didn't think it was such a recent addition. Thanks
will djs14 use the permissions v2 system? and how will that work with updating the permissions since now bearer token from oauth2 is required?
The whole point of permissions v2 is so that bot developers dont have to update the permissions
Its unclear if we will or wont support the oauth endpoints but its would be up to you to get oauth bearer tokens to use with them if thats the case
but for developer commands, you want to set permissions programatically and restrict it only to few selected users
What do you mean by "developer commands"
Maybe commands like eval etc.
eval is a terrible command to have
Yep
But if you do have one
It probably shouldnt be global at all
Restrict default_member_permisisons
And then go into your server and add an override for yourself
Developer commands should only really be used on a single guild that you have strict control over. Any command you push globally will be usable by guild owners and anyone with the Administrator permission (and by extension anyone they allow access to that command to). That’s not something d.js can change
no not eval lol. like these (+ more)
Well those commands will be available to every admin/server owner
For guilds they're deployed to
At some point in the future yes, a new commit will be on the dev branch
There are new commits every day
So as the new addFields() takes arrays, can I have multiple addFields() or just multiple objects in a single array?
both
okay
How can I extend the class CommandInteraction<"cached">?
whats the point of doing that, discord.js will not use your extended class
Is localisation already in v14 ? 0.o
yes
nice
how does SlashCommandSubcommandBuilder#setDescriptionLocalizations() work?
SlashCommandBuilder#setDescriptionLocalization()
Sets a description localization
I didn't for ask that
What do you mean by "how does it work" then?
when I change my discord language to french it still show me the text in english
Client-side, theyre still locked behind the experiment
what's the format to pass in it
Whatever the docs say, I dont use builders
But thats probably why its not working
The experiment
U can use localization override
try it and see
I tried and what I did still doesn't work ._.
Why do i get an Message out of Fetch ? after i updated ? Shouldn't i get an Collection of Messages ? Am i missing something ?
cannot replicate
rip
Thats just one of the two overloads
Which is why it says +1 overload
cannot replicate
what is wrong with this now?
message is null
it's not
I am quite confused, i see there is an overload but i cant seem to target that one because both use FetchMessagesOptions and i cant seem to specify it 0.o
Is there some kind of trickery ?
send full code in scrb.in
Okay, i just restarted VS Code and that did the trick
const { GatewayIntentBits } = require('discord.js');
intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages],
bot not responding to commands
are you still using text command? you gotta need MessageContent intent as well
I write a bot for both text commands and slashes
const { GatewayIntentBits } = require('discord.js');
intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent],
```?
you passed rest parameters where you should pass an array
await command.execute([client, message, args]);
```?
this code has nothing to do with discord.js
Hello Admin & Mods!
Today, we have a new update for slash commands in your servers: Permissions! If you don’t know, slash commands are a new, easier way to use bots on Discord. You might already have some to use—type / to find out!
With this new system, you can:
dotControl who can use slash commands in your servers
dotControl in which channels commands can be used
dotSync or unsync commands like channels and categories, making mass management and special cases easy to handle
You can find these permissions in Server Settings → Integrations → Pick an app! If the app supports slash commands, you’ll see the UI.
warning If a bot you use has integrated slash commands, the old way of denying the bot Read Messages will not work to moderate commands usage. You’ll need to use this new system to control access.
Not sure if your bots support slash commands? Check out in Server Settings → Integrations, or just type /!
Check out our blog post to learn more and see a detailed walkthrough: https://discord.com/blog/slash-commands-permissions-discord-apps-bots
Does djs support it?
yes
In dev v14 or in v13 too?
in dev v14
We don’t support it yet
^
I think he's talking about this: https://github.com/discordjs/discord.js/pull/7857
The pr for perms v2 isn’t merged
rawError: { message: 'Bots cannot use this endpoint', code: 20001 },
don't use this endpoint
its disabled
do you know any alternative
yes you go to server settings and integrations and choose your bot and edit permissions
no
the bot has admin perms
bots can't set permissions
ohkay
I wonder why would they remove the ability of the bots to add or remove permissions
That's not a discussion for here
also this https://github.com/discordjs/discord.js/pull/7857 will be available in 13.7.0?
or only v14
Ok so bots can't set slash commands permissions now, but what happens if we want to clear them? Like for example I have some commands that I allow me to have explicit access to them and I can't seem to clear that extra permissions. The integrations panel says I cannot manage this user.
unrelated to discord.js #useful-servers or #archive-offtopic
Well those explicit permissions where set through d.js so how is it unrelated?
djs doesnt manage those perms
are you removing those with djs?
https://discord.js.org/#/docs/discord.js/stable/class/ApplicationCommandManager?scrollTo=permissions
since bots cant set, remove or add permissions anymore then will this be deprecated?
no nono you can't do permissions with discord.js you have to go to servers settings and integrations and choose your bot and edit the permissions here...
let menuOptions = [];
commandDir.forEach(folder => {
menuOptions.push({ name: `${folder}`, value: `**\`${client.commands.filter(x => x.folder === folder).map(x => x.name).join('`**, **`')}\`**`});
});
embed
.setTitle(`${lang.titleNoArgs.replace('%bot%', client.user.username)}`)
.setDescription(`${lang.descriptionNoArgs.replace('%prefix%', guildData.prefix)}`)
.setColor(cfg.colors.good)
.addFields(menuOptions);
addFields takes an array
menuOptions.push
then idk
I have tried putting an empty permissions array through the endpoint which as expected gives out a "Bots cannot use this endpoint"
I am only asking for a way to clear those extra permissions. Through discord it can't be done, the API is now updated, how can I achieve that?
Edit: nvm figured it out
let menu = []
commandDir.forEach(x => {
menu.push({ label: x, value: x });
});
const row = new BeQuite.ActionRow().addComponents(
new BeQuite.SelectMenu()
.setCustomId('help_menu')
.setPlaceholder(`${lang.selectCategory}`)
.addOptions(menu)
);
here are 2 pieces of code in which i use arrays
addComponents needs array
Those permissions are gone iirc
https://discord.com/developers/docs/topics/gateway#application-commands-permissions-update
this will be added as an event right?
How to fix? This channel id is correct
use await client.channels.fetch(id) for check if the promise is rejected
show your const channel
log channel
?
console.log(channel)
null
Just use a webhook
its worked
channel.permissionOverwrites.edit(...)
Could you please post an example instead of the ... part?
Documentation suggestion for @undone yew:
PermissionOverwriteManager#edit()
Edits permission overwrites for a user or role in this channel, or creates an entry if not already present.
^
TypeError: Cannot read properties of null (reading 'roles')
at Client.<anonymous> (/root/Generaly/app.js:1026:36)
at Client.emit (node:events:539:35)
at MessageCreateAction.handle (/root/Generaly/node_modules/discord.js/src/client/actions/MessageCreate.js:26:14)
at Object.module.exports [as MESSAGE_CREATE] (/root/Generaly/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32)
at WebSocketManager.handlePacket (/root/Generaly/node_modules/discord.js/src/client/websocket/WebSocketManager.js:351:31)
at WebSocketShard.onPacket (/root/Generaly/node_modules/discord.js/src/client/websocket/WebSocketShard.js:444:22)
at WebSocketShard.onMessage (/root/Generaly/node_modules/discord.js/src/client/websocket/WebSocketShard.js:301:10)
at WebSocket.onMessage (/root/Generaly/node_modules/ws/lib/event-target.js:199:18)
at WebSocket.emit (node:events:527:28)
at Receiver.receiverOnMessage (/root/Generaly/node_modules/ws/lib/websocket.js:1137:20)
at Receiver.emit (node:events:527:28)
at Receiver.dataMessage (/root/Generaly/node_modules/ws/lib/receiver.js:528:14)
at Receiver.getData (/root/Generaly/node_modules/ws/lib/receiver.js:446:17)
at Receiver.startLoop (/root/Generaly/node_modules/ws/lib/receiver.js:148:22)
at Receiver._write (/root/Generaly/node_modules/ws/lib/receiver.js:83:10)```
what can couse this error is used to require a specific role to run a command only some times not all time if giving this eror
a message without a member. DM, webhook or system message
how i can fix it is used only to check if member have a role and if not to give another messege like u cant use this command
help
check message.member for null, use optional chaining, check Message#system, Message#webhookId, Message#channel#type, ...
Documentation suggestion for @undone yew:
BaseGuildTextChannel#setTopic()
Sets a new topic for the guild channel.
SendMessages
ok
When showing a modal, does it automatically defer the interaction?
Ah right right. I got confused with slash commands, thank you
// Code
const userEmbedOptions = [{...}, {...}, {...}];
new ActionRowBuilder()
.addComponents(
new SelectMenuBuilder()
.setCustomId('ViewUser')
.setMaxValues(1)
.addOptions(...userEmbedOptions)
);
// Error
TypeError: options.map is not a function
at SelectMenuBuilder.addOptions
what's wrong with my code?
in addOptions u must put array
since it says options.map is not a function i tried to remove the spread operator but it too resulted in an error
- in actionRow.addComponents put array too
yea
Any clue why this aint working?
ty
still having problem with this, I checked the docs as well and it seems that addOptions and setOptions now take an array instead of objects
// Code
const userEmbedOptions = [
new SelectMenuOptionBuilder()
.setLabel('Overview')
.setValue('overview')
.setDefault(true),
new SelectMenuOptionBuilder()
.setLabel('Roles')
.setValue('roles'),
new SelectMenuOptionBuilder()
.setLabel('Avatar')
.setValue('avatar')
];
let x = new ActionRowBuilder()
.addComponents(
new SelectMenuBuilder()
.setCustomId('ViewUser')
.setMaxValues(1)
.setOptions(userEmbedOptions)
);
what am I doing wrong here?
addComponents takes an array
but im getting the same error even after giving an array in .addComponents
let userEmbedComponents = new ActionRowBuilder()
.addComponents([
new SelectMenuBuilder()
.setCustomId('ViewUser')
.setMaxValues(1)
.setOptions(userEmbedOptions)
]);
im getting the exact same error from .setOptions() line
im stuck with this for 2 hours now
this didnt have in the earlier versions of v14
i updated to the latest v14 version today
nvm i didnt read previous messages
edit the message manually
ButtonInteraction#message
The message to which the component was attached
showModal() is a reply to the interaction
no, show the modal and then edit the message manually
interaction.message.edit()
anyone..
// Code
const userEmbedOptions = [
{
label: 'Overview',
value: 'overview',
default: true
},
{
label: 'Roles',
value: 'roles'
},
{
label: 'Avatar',
value: 'avatar'
}
];
let userEmbedComponents = new ActionRowBuilder()
.addComponents([
new SelectMenuBuilder()
.setCustomId('ViewUser')
.setMaxValues(1)
.addOptions(userEmbedOptions)
]);
updated the code a bit
are you on the latest version?
that error message makes it seem like addOptions is expecting rest parameters
(and the latest version doesnt, it takes an array)
@tame gazelle looks like your problem might be fixed by https://github.com/discordjs/discord.js/pull/7862
It's 1. Use GuildDefaultMessageNotifications.ONLY_MENTIONS (the enumerable)
https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level
GuildDefaultMessageNotifications.OnlyMentions
and you'd have to import that from discord-api-types as its not exported in djs
Ah thank you, that (:
I have a feeling that should be
yeah idk why some of the enums that have an EnumResolver aren't reexported
How can I use messageCreate when Im not getting its content?
MessageContent its blocked look like it
enable it in the dev portal
Error [DISALLOWED_INTENTS]: Privileged intent provided is not enabled or whitelisted.
If you are using the GUILD_MEMBERS, GUILD_PRESENCES, or MESSAGE_CONTENT intents, you need to enable them in the developer portal:
• Developer Portal > Your app > Bot > Privileged Gateway Intents
• Websocket intents limit events and decrease memory usage: learn more
• See what intents you need here
emoji name is invalid
emoji is <:e_: 967169725090115704>
what would the name be
?
yes
I hope it will be merged in the next dev release
in my threadCreate event, client returns true (the readyState, even though I'm not using that...), in the exact same usage in other events that work perfectly. it functions fine on v13. any reason why this might be?
yes exactly, i think there was some error in the latest commit because neither can I add rest parameters nor an array in .addOptions and .setOptions both
well not latest but the commit where these changes were made
I am on the latest version, made sure of that 2 times
"discord.js": "^14.0.0-dev.1651147765-679dcda",
Ill just open an issue then, since both rest parameters and array returns an error
Are you importing from discord.js or builders directly?
I just ran this code without any errors, can't replicate the issue
discord.js
Yeah, cant replicate that issue
i just ran the same thing again and I got this
I didnt make a single change in the code either
its the same one that i posted above
Can you show me the full output of npm why @discordjs/builders
okay 1min
I get this
@discordjs/builders@0.14.0-dev.1650672503-3617093
node_modules/@discordjs/builders
@discordjs/builders@"^0.14.0-dev" from discord.js@14.0.0-dev.1651147765-679dcda
node_modules/discord.js
discord.js@"^14.0.0-dev.1651147765-679dcda" from the root project
Its almost like it thinks theres a nested array?
@discordjs/builders@0.14.0-dev.1650240529-9ef7ffd
node_modules/@discordjs/builders
@discordjs/builders@"^0.14.0-dev" from discord.js@14.0.0-dev.1651147765-679dcda
node_modules/discord.js
discord.js@"^14.0.0-dev.1651147765-679dcda" from the root project
do i need to update them separately? I have just done npm i discord.js@dev
You shouldnt
Uninstall discord.js fully first, then run npm why @discordjs/builders and make sure it errors
Then reinstall
i tried to uninstall discord.js instead of discord.js@\dev and it got removed
that looks better, the builders tag matches the discord.js tag
cool, no idea how they got out of sync
i dont either, I just remember that I had updated my dev version and thats it, the errors started coming up after i updated the version
receiving this error from one the fields but I cant figure out which
// Code
.addFields(
{ name: 'Sent By', value: `${target}`, inline: true },
{ name: 'Sent On', value: `<t:${Math.floor(message.createdTimestamp / 1000)}>`, inline: true },
{ name: 'Deleted By', value: `${executor}`, inline: true },
{ name: 'Message Id', value: message.id, inline: true },
{ name: 'Author Id', value: target.id, inline: true },
{ name: 'Executor User Id', value: executor.id, inline: true }
);
takes an array now
in the v13 to v14 switch guide that the functions have been renamed but isVoice()/isText() still exists and aren't even deprecated?
Yeah they got added back
What isText() used to do, is now isTextBased()
isText() now specifically checks the GUILD_TEXT type of channel
but what's the difference between isText() and isTextBased()?
https://discord.js.org/#/docs/discord.js/main/typedef/GuildAuditLogsFetchOptions
can we put more than 1 type in type parameter?
nope
then, how do we find which message was pinned or unpinned in channelPinsUpdate event?
this is a separate question
im trying to fetch pinned and unpinned events from audit logs
but since I dont know which event has triggered, unpinned or pinned i cant fetch the exact data from audit logs
const { executor, target, extra } = (await channel.guild.fetchAuditLogs({ type: AuditLogEvent.MessagePin })).entries.first();
const message = (await channel.messages.fetchPinned()).find(({ id }) => id === extra.messageId);
console.log(message);
this will return the message data if the message was pinned but will return undefined if it was unpinned since im searching for MessagePin Events and not MessageUnpin
fetch 2 times, first for pin and again for unpin, it isn't possible to fetch both at the same time as the api also takes an integer for the action_type..
any way to get the message that was pinned or unpinned from the channels? that way I could fetch the AuditLogs after wards and decide if type should be MessagePin or MessageUnpinned depending on the value of pinned property
i see
bump, is there any reason why this would happen?
Can you show how you are using it
I'll just paste it here as it is small:
const { ThreadChannel, Client } = require('discord.js');
const { logEmbed, getChannelInfo } = require('../../util/functions');
module.exports = {
name: 'threadCreate',
/**
* @param {ThreadChannel} thread
* @param {Client} client
*/
async execute(thread, client) {
logEmbed({ client, guild: thread.guild.id, channel: thread.parent, description: `A new thread, ${thread.toString()}, was created:\n\n${getChannelInfo(thread).join('\n')}`, title: `Thread Created`, color: 'Green', isEvent: true });
},
};
function logEmbed(input) {
const { client, guild, channel, description, title, color, thumbnail, attachment } = input;
...
client.channels.cache.get(targetChannel).send(attachment ? { embeds, files: [attachment] } : { embeds });
I can't see any issue with this at all, and nothing has changed since I migrated from v13
The second parameter isn't the client
I pass it through to each event from my events handler
client.once(event.name, (...args) => event.execute(...args, client));
In that case, the third parameter is your client
You are not using it
The second parameter is newlyCreated
https://discord.js.org/#/docs/discord.js/main/class/Client?scrollTo=e-threadCreate
ah well that explains it– I didn't know that was updated–
This worked for you on version 13 because this did not exist in version 13
thank you so much!!
You're welcome
do you know if there were similar changes to any other events? (I'll look through anyway)
You can also access the client via thread.client, you know that right? Just curious why you're passing it
Might be best to look through the ones you are using and compare them to the documentation tbh. Some events got a new parameter but I know threadMembersUpdate's parameters changed
that– is a very good point I hadn't thought of that!
will do, thanks so much for your help again :)
[:
Tag suggestion for @scarlet tangle:
Error [DISALLOWED_INTENTS]: Privileged intent provided is not enabled or whitelisted.
If you are using the GUILD_MEMBERS, GUILD_PRESENCES, or MESSAGE_CONTENT intents, you need to enable them in the developer portal:
• Developer Portal > Your app > Bot > Privileged Gateway Intents
I want to change the permissions of the bot when joining the server, not the role, nor the permissions of the channel.
what should I do?
not the role?
not the role.
yknow permissions in the invite url are the permissions that are set in the bot role?
If a bot could change it's permission right after joining 
What are you talking about specifically
I want to avoid errors caused by removing permissions when a user invites a bot, so I want to set permissions again immediately after rejoining
you have to edit the bot role then
So I can't edit the permissions of the bot in the server, can only edit the role?
If there are multiple roles after the bot is added, how do I know which one I should edit?
(Some bots will add roles for newly joined members.)
permissions are based on roles
execpt for the server owner
you can find a role by the bot name and check it it’s managed
but two bots can have the same so it isn’t reliable
a bit of topic but do you need to cache mysql data for a pokemon bot
data must be accessed and changed quickly
since it's off-topic, #useful-servers
you can find the role by <Role>.tags.botId
there's also <Guild>.roles.botRoleFor(<User>)
how do i use status in v14
?
you can set the presence option when instantiating your client
?
type must be number
ok
32767 doesn't mean all the intents anymore 
nor should you be using all of them
well no you should use the ActivityType enum instead
magic numbers are not recommended
yea but this isn`t in docs so i sends discord docs
it's easy to explain
instead of it being in all caps, the property is just in PascalCase, ActivityType.Streaming for example


Popular Topics: Interaction collectors