Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in slash command #1234

Closed
3 tasks done
Bhavya-Goyal423 opened this issue Aug 5, 2024 · 3 comments
Closed
3 tasks done

Error in slash command #1234

Bhavya-Goyal423 opened this issue Aug 5, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@Bhavya-Goyal423
Copy link

Which package has the bugs?

The core library

Issue description

Whenever I run this it says TypeError: Cannot read properties of undefined (reading 'id')

Code sample

client.on("ready", async () => {
  console.log(`${client.user.username} is ready!`);
  const channel = await client.channels.fetch("1217125275180073000");
  await channel.sendSlash("211032990195777537", "aha");
});

Package version

3.3.0

Node.js version

18.18.2

Operating system

No response

Priority this issue should have

Medium (should be fixed soon)

Checklist

  • I have searched the open issues for duplicates.
  • I have shared the entire traceback.
  • I am using a user token (and it isn't visible in the code).

Additional Information

No response

@Bhavya-Goyal423 Bhavya-Goyal423 added the bug Something isn't working label Aug 5, 2024
@ee3devYT
Copy link

same :(

@Iamlel
Copy link

Iamlel commented Aug 12, 2024

same issue here:
node --version => v22.6.0
os => ubuntu
npm --version => 10.8.2

test code:

const { Client } = require('discord.js-selfbot-v13')

const client = new Client()
client.on('ready', async () => {
    const channel = await client.channels.fetch(channelid)
    await channel.sendSlash(userid, "bump").catch(ignored => console.log("same error"));
})
client.login(token);

@aiko-chan-ai
Copy link
Owner

There might have been an error; I'll check it later (this weekend).

@aiko-chan-ai aiko-chan-ai self-assigned this Aug 15, 2024
aiko-chan-ai added a commit that referenced this issue Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants