discord api error 50001

const { SlashCommandBuilder } = require('discord.js');
const { EmbedBuilder } = require('discord.js')

module.exports = {
data: new SlashCommandBuilder()
.setName('user')
.setDescription('Provides information about the user.'),
async execute(interaction) {
const embedExample = new EmbedBuilder()
.setColor(ED4245)
.setURL('https://google.com')
.setTitle('${interaction.user.username} history in discord')
.addFields(
{ name: 'User joined at', value: '${interaction.member.joinedAt}' },
{ name: 'This command was run by', value: '${interaction.user.username} '}
)
// interaction.user is the object representing the User who ran the command
// interaction.member is the GuildMember object, which represents the user in the specific guild
await interaction.reply({ embeds: [embedExample] });
},
};
const { SlashCommandBuilder } = require('discord.js');
const { EmbedBuilder } = require('discord.js')

module.exports = {
data: new SlashCommandBuilder()
.setName('user')
.setDescription('Provides information about the user.'),
async execute(interaction) {
const embedExample = new EmbedBuilder()
.setColor(ED4245)
.setURL('https://google.com')
.setTitle('${interaction.user.username} history in discord')
.addFields(
{ name: 'User joined at', value: '${interaction.member.joinedAt}' },
{ name: 'This command was run by', value: '${interaction.user.username} '}
)
// interaction.user is the object representing the User who ran the command
// interaction.member is the GuildMember object, which represents the user in the specific guild
await interaction.reply({ embeds: [embedExample] });
},
};
at this time i make user history command, this is the error
DiscordAPIError[50001]: Missing Access
DiscordAPIError[50001]: Missing Access
7 Replies
d.js toolkit
d.js toolkit2y ago
- What's your exact discord.js npm list discord.js and node node -v version? - Post the full error stack trace, not just the top part! - Show your code! - Explain what exactly your issue is. - Not a discord.js issue? Check out #useful-servers.
chewie
chewie2y ago
Show the full error
thememe
thememeOP2y ago
chewie
chewie2y ago
Your bot doesnt have the applications.commands scope ln that guild Reinvite with the scope
thememe
thememeOP2y ago
okay thank you i'll try again
chewie
chewie2y ago
And make sure the bot is on that guild myDudes
thememe
thememeOP2y ago
it say my client id is not snowflake nvm i got it the error still same i'll tryna to fix it i got the solution the serverid is wrong
Want results from more Discord servers?
Add your server