Closed xHaruke closed 2 years ago
it was a bug, you can wait for the fix in version 2.3
@aiko-chan-ai any way around it?
@aiko-chan-ai any way around it?
you can fix it temporarily by replacing searchInteraction
with this
force: true
@aiko-chan-ai
await client.applications.fetch({
^
TypeError: Cannot read properties of undefined (reading 'fetch')
TypeError: Cannot read properties of undefined (reading 'fetch')
no
const bot = await client.users.fetch('idbot')
await bot.applications.fetch({ ...
@aiko-chan-ai
Code :
client.on("messageCreate", async (message) => {
if (message.content === "a") {
const bot = await client.users.fetch("302050872383242240");
await bot.applications.fetch({
guildId: "771238821550620703",
force: "true",
});
message.channel.sendSlash("302050872383242240", "help");
}
});
Error :
throw new DiscordAPIError(data, res.status, request);
^
DiscordAPIError: You are not authorized to perform this action on this application
at RequestHandler.execute (C:\Users\arvind kumar\Desktop\Desktop\Coding stuff\Node\slash selfbot\node_modules\discord.js-selfbot-v13\src\rest\RequestHandler.js:350:13)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async RequestHandler.push (C:\Users\arvind kumar\Desktop\Desktop\Coding stuff\Node\slash selfbot\node_modules\discord.js-selfbot-v13\src\rest\RequestHandler.js:51:14)
at async ApplicationCommandManager.fetch (C:\Users\arvind kumar\Desktop\Desktop\Coding stuff\Node\slash selfbot\node_modules\discord.js-selfbot-v13\src\managers\ApplicationCommandManager.js:102:18)
at async Client.<anonymous> (C:\Users\arvind kumar\Desktop\Desktop\Coding stuff\Node\slash selfbot\index.js:11:5) {
method: 'get',
path: '/applications/302050872383242240/guilds/771238821550620703/commands',
code: 20012,
httpStatus: 403,
requestData: { json: undefined, files: [] }
}
and I have the perms
@xHaruke you need to open DMs with bot first (if error You are not authorized to perform this action on this application
)
@xHaruke you need to open DMs with bot first (if error
You are not authorized to perform this action on this application
)
what do you mean by open DMs?
what do you mean by open DMs?
did it still not working
did it still not working
if you already did it, you can skip fetch
wdym by i can skip fetch?
wdym by i can skip fetch?
.-.
Issue description
I am just trying to send an application command
Code sample
Package version
2.2.0
Node.js version
16.14.0
Operating system
windows
Priority this issue should have
Medium (should be fixed soon)
Checklist
Additional Information
error
C:\Users\someone\node_modules\discord.js-selfbot-v13\src\client\websocket\handlers\GUILD_APPLICATION_COMMANDS_UPDATE.js:13 client.users.cache.get(data.application_commands[0].application_id).applications.cache, ^
TypeError: Cannot read properties of undefined (reading 'applications') at Object.module.exports [as GUILD_APPLICATION_COMMANDS_UPDATE] (C:\Users\arvind kumar\node_modules\discord.js-selfbot-v13\src\client\websocket\handlers\GUILD_APPLICATION_COMMANDS_UPDATE.js:13:72) at WebSocketManager.handlePacket (C:\Users\arvind kumar\node_modules\discord.js-selfbot-v13\src\client\websocket\WebSocketManager.js:346:31) at WebSocketShard.onPacket (C:\Users\arvind kumar\node_modules\discord.js-selfbot-v13\src\client\websocket\WebSocketShard.js:478:22)
at WebSocketShard.onMessage (C:\Users\arvind kumar\node_modules\discord.js-selfbot-v13\src\client\websocket\WebSocketShard.js:317:10)
at WebSocket.onMessage (C:\Users\arvind kumar\node_modules\discord.js-selfbot-v13\node_modules\ws\lib\event-target.js:199:18) at WebSocket.emit (node:events:520:28) at Receiver.receiverOnMessage (C:\Users\arvind kumar\node_modules\discord.js-selfbot-v13\node_modules\ws\lib\websocket.js:1169:20)
at Receiver.emit (node:events:520:28) at Receiver.dataMessage (C:\Users\arvind kumar\node_modules\discord.js-selfbot-v13\node_modules\ws\lib\receiver.js:528:14) at Receiver.getData (C:\Users\arvind kumar\node_modules\discord.js-selfbot-v13\node_modules\ws\lib\receiver.js:446:17)