sendSlash Issue [discord.js-selfbot-v13]

Code:
const { Client } = require('discord.js-selfbot-v13');
const client = new Client({
checkUpdate: false,
});

client.on('ready', async () => {
const channelId = '1190781950944886870';
const channel = client.channels.cache.get(channelId);

if (channel) {
console.log(`Channel found: ${channel.name}`);
channel.sendSlash('1190781950944886867', 'about');
} else {
console.error('Channel not found.');
}
});

client.login('my token');
const { Client } = require('discord.js-selfbot-v13');
const client = new Client({
checkUpdate: false,
});

client.on('ready', async () => {
const channelId = '1190781950944886870';
const channel = client.channels.cache.get(channelId);

if (channel) {
console.log(`Channel found: ${channel.name}`);
channel.sendSlash('1190781950944886867', 'about');
} else {
console.error('Channel not found.');
}
});

client.login('my token');
Error:
Channel found: general
C:\Users\sir\node_modules\discord.js-selfbot-v13\src\errors\DJSError.js:40
if (!msg) throw new Error(`An invalid error message key was used: ${key}.`);
^

Error: An invalid error message key was used: botId is not a bot or does not have an application slash command.
at message (C:\Users\sir\node_modules\discord.js-selfbot-v13\src\errors\DJSError.js:40:19)
at new DiscordjsError (C:\Users\sir\node_modules\discord.js-selfbot-v13\src\errors\DJSError.js:16:13)
at TextChannel.sendSlash (C:\Users\sir\node_modules\discord.js-selfbot-v13\src\structures\interfaces\TextBasedChannel.js:497:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v20.10.0
Channel found: general
C:\Users\sir\node_modules\discord.js-selfbot-v13\src\errors\DJSError.js:40
if (!msg) throw new Error(`An invalid error message key was used: ${key}.`);
^

Error: An invalid error message key was used: botId is not a bot or does not have an application slash command.
at message (C:\Users\sir\node_modules\discord.js-selfbot-v13\src\errors\DJSError.js:40:19)
at new DiscordjsError (C:\Users\sir\node_modules\discord.js-selfbot-v13\src\errors\DJSError.js:16:13)
at TextChannel.sendSlash (C:\Users\sir\node_modules\discord.js-selfbot-v13\src\structures\interfaces\TextBasedChannel.js:497:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v20.10.0
2 Replies
d.js toolkit
d.js toolkit11mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by staff
treble/luna
treble/luna11mo ago
We do not support tos violations
Want results from more Discord servers?
Add your server