Missing Access for Slash Commands

Issue Heres the error message: PS C:\Users\User\Documents\Discord Bot> node . ready C:\Users\User\Documents\Discord Bot\node_modules\discord.js\src\rest\RequestHandler.js:154 throw new DiscordAPIError(request.path, data, request.method, res.status); ^ DiscordAPIError: Missing Access at RequestHandler.execute (C:\Users\User\Documents\Discord Bot\node_modules\discord.js\src\rest\RequestHandler.js:154:13) at processTicksAndRejections (node:internal/process/task_queues:93:5) at async RequestHandler.push (C:\Users\User\Documents\Discord Bot\node_modules\discord.js\src\rest\RequestHandler.js:39:14) { method: ‘post’, path: ‘/applications/723863781607997451/guilds/722043668730740788/commands’,

Continue reading

Discord.js – How to change style of Button

Issue This is how I create and send the button: client.on(‘messageCreate’, (message) => { /* … Checking Command … */ const actionRow = new MessageActionRow().addComponents( new MessageButton() .setStyle("PRIMARY") .setLabel("X") .setCustomId("test")); message.channel.send({ content: "Test", components: [actionRow] }); } A blue Button

Continue reading

Discord Oauth2 Join Guild

Issue const guildMembersResponse = fetch(`http://discordapp.com/api/guilds/440494010595803136/members/278628366213709824`, { method: ‘PUT’, headers: { Authorization: `Bearer TOKEN`, }, }); setTimeout(() => { console.log(guildMembersResponse) }, 500); I want to join a user to my Discord server with his userid and his token in nodejs, but

Continue reading

Message Collector first Message

Issue I’m using thecreateMessageCollector. It is collecting messages, but the problem is, that it is not getting the first message sent in the channel. const filter = m => m.content.toLowerCase() === message.content.toLowerCase(); const collector = message.channel.createMessageCollector(filter, { max: 1, time:

Continue reading

Color text in discord

Issue My goal is to partly color a text. I know I can use .sendCode(“css”,”this is my message”); which we’ll make my text yellow but I don’t want my whole text to be yellow. Perhaps I could create another .css

Continue reading

Discord.js v12 server member count

Issue (Welcome command using canvas) How could I fetch the server member count as soon as someone joins?? Because I use that line of code const guild = client.guilds.cache.get("843190900930510869"); let image = await welcomeCanvas .setUsername(member.user.tag) .setDiscriminator(member.user.discriminator) .setMemberCount(guild.memberCount) //this line etc…

Continue reading

Missing Access for Slash Commands

Issue Heres the error message: PS C:\Users\User\Documents\Discord Bot> node . ready C:\Users\User\Documents\Discord Bot\node_modules\discord.js\src\rest\RequestHandler.js:154 throw new DiscordAPIError(request.path, data, request.method, res.status); ^ DiscordAPIError: Missing Access at RequestHandler.execute (C:\Users\User\Documents\Discord Bot\node_modules\discord.js\src\rest\RequestHandler.js:154:13) at processTicksAndRejections (node:internal/process/task_queues:93:5) at async RequestHandler.push (C:\Users\User\Documents\Discord Bot\node_modules\discord.js\src\rest\RequestHandler.js:39:14) { method: ‘post’, path: ‘/applications/723863781607997451/guilds/722043668730740788/commands’,

Continue reading

discord line color off

Issue How to remove the strip to the left of the insert so that it turns out, as in screenshot #1, removing setcolor does not help. is it embed at all? https://i.stack.imgur.com/OF8lW.png https://i.stack.imgur.com/BW6yq.png Solution You can’t remove it. You have

Continue reading

discord line color off

Issue How to remove the strip to the left of the insert so that it turns out, as in screenshot #1, removing setcolor does not help. is it embed at all? https://i.stack.imgur.com/OF8lW.png https://i.stack.imgur.com/BW6yq.png Solution You can’t remove it. You have

Continue reading

Missing Access for Slash Commands

Issue Heres the error message: PS C:\Users\User\Documents\Discord Bot> node . ready C:\Users\User\Documents\Discord Bot\node_modules\discord.js\src\rest\RequestHandler.js:154 throw new DiscordAPIError(request.path, data, request.method, res.status); ^ DiscordAPIError: Missing Access at RequestHandler.execute (C:\Users\User\Documents\Discord Bot\node_modules\discord.js\src\rest\RequestHandler.js:154:13) at processTicksAndRejections (node:internal/process/task_queues:93:5) at async RequestHandler.push (C:\Users\User\Documents\Discord Bot\node_modules\discord.js\src\rest\RequestHandler.js:39:14) { method: ‘post’, path: ‘/applications/723863781607997451/guilds/722043668730740788/commands’,

Continue reading

Discord.js v12 server member count

Issue (Welcome command using canvas) How could I fetch the server member count as soon as someone joins?? Because I use that line of code const guild = client.guilds.cache.get("843190900930510869"); let image = await welcomeCanvas .setUsername(member.user.tag) .setDiscriminator(member.user.discriminator) .setMemberCount(guild.memberCount) //this line etc…

Continue reading

ENOENT: no such file or directory, open 'Filename'

Issue I was requiring some data from a .json file but I am getting this error: Error: ENOENT: no such file or directory, open ‘../Jsons/eshop.json’ at Object.openSync (node:fs:585:3) at Object.readFileSync (node:fs:453:35) at Object.execute (C:\Users\Pooyan\Desktop\PDM Bot Main\commands\shop.js:9:24) at module.exports (C:\Users\Pooyan\Desktop\PDM Bot

Continue reading

TypeError: Cannot read properties of undefined (reading 'execute') command handler

Issue const discord = require(‘discord.js’) const client = new discord.Client({ intents: ["GUILDS", "GUILD_MESSAGES"] }) const prefix = ‘&’; const fs = require(‘fs’); client.commands = new discord.Collection(); const commandFiles = fs.readdirSync(‘./commands’).filter(file => file.endsWith(‘.js’)); for(const file of commandFiles){ const command = require(`./commands/${file}`);

Continue reading