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

Send slash subcommand #11

Closed
pwaillette opened this issue Mar 30, 2022 · 9 comments
Closed

Send slash subcommand #11

pwaillette opened this issue Mar 30, 2022 · 9 comments
Labels
bug Something isn't working

Comments

@pwaillette
Copy link

Hello !
I can send slash commands, but I can't send subcommands. How can I do it, with the v2 method ?

@aiko-chan-ai aiko-chan-ai added the bug Something isn't working label Mar 30, 2022
@aiko-chan-ai
Copy link
Owner

I think I missed a few pieces of code. I will correct it as soon as possible. Sorry for your experience :<

@pwaillette
Copy link
Author

No problem ! I have edit manually the module for my own experience, and it's work perfectly ! Thanks a lot !!

@aiko-chan-ai
Copy link
Owner

No problem ! I have edit manually the module for my own experience, and it's work perfectly ! Thanks a lot !!

oh, I just fixed it too =)

@aiko-chan-ai
Copy link
Owner

Added method: here

but if you edited it manually you can make 1 pull request :))

@pwaillette
Copy link
Author

Uh, I have an issue if I try to send a subcommand without options..

client.on("message", async (message) => {
  if (message.content === "s!startfarm ccp") {
    setInterval(async () => {
      await message.channel.sendSlash(skyID, "rpg-farm", ["chasser"]); //fonctionnel
      setTimeout(async () => {
        await message.channel.sendSlash(skyID, "rpg-farm", ["cueillir"]); //fonctionnel
      }, getRandomInt(2100, 3000));
      setTimeout(async () => {
        await message.channel.sendSlash(skyID, "rpg-farm", ["pecher"]); //fonctionnel
      }, getRandomInt(2100, 3000));
    }, 125000);
  }
});

The error :

`/Users/aiko/Desktop/Developpement/Projets/JavaScript/Test/node_modules/discord.js-selfbot-v13/src/structures/ApplicationCommand.js:489
if (subCommandCheck && !subCommand.options[i]) continue;
^

TypeError: Cannot read properties of undefined (reading '0')
at ApplicationCommand.sendSlashCommand (/Users/aiko/Desktop/Developpement/Projets/JavaScript/Test/node_modules/discord.js-selfbot-v13/src/structures/ApplicationCommand.js:489:49)
at TextChannel.sendSlash (/Users/aiko/Desktop/Developpement/Projets/JavaScript/Test/node_modules/discord.js-selfbot-v13/src/structures/Channel.js:256:25)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Timeout._onTimeout (/Users/aiko/Desktop/Developpement/Projets/JavaScript/Test/index.js:12:7)
MacBook-Aiko:Test aiko$ `

@aiko-chan-ai
Copy link
Owner

I'm at school, it's expected to be fixed in 4 hours

@aiko-chan-ai
Copy link
Owner

Uh, I have an issue if I try to send a subcommand without options..

client.on("message", async (message) => {
  if (message.content === "s!startfarm ccp") {
    setInterval(async () => {
      await message.channel.sendSlash(skyID, "rpg-farm", ["chasser"]); //fonctionnel
      setTimeout(async () => {
        await message.channel.sendSlash(skyID, "rpg-farm", ["cueillir"]); //fonctionnel
      }, getRandomInt(2100, 3000));
      setTimeout(async () => {
        await message.channel.sendSlash(skyID, "rpg-farm", ["pecher"]); //fonctionnel
      }, getRandomInt(2100, 3000));
    }, 125000);
  }
});

The error :

`/Users/aiko/Desktop/Developpement/Projets/JavaScript/Test/node_modules/discord.js-selfbot-v13/src/structures/ApplicationCommand.js:489 if (subCommandCheck && !subCommand.options[i]) continue; ^

TypeError: Cannot read properties of undefined (reading '0') at ApplicationCommand.sendSlashCommand (/Users/aiko/Desktop/Developpement/Projets/JavaScript/Test/node_modules/discord.js-selfbot-v13/src/structures/ApplicationCommand.js:489:49) at TextChannel.sendSlash (/Users/aiko/Desktop/Developpement/Projets/JavaScript/Test/node_modules/discord.js-selfbot-v13/src/structures/Channel.js:256:25) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async Timeout._onTimeout (/Users/aiko/Desktop/Developpement/Projets/JavaScript/Test/index.js:12:7) MacBook-Aiko:Test aiko$ `

I fixed it, please update to the latest version
sorry for your experience

@pwaillette
Copy link
Author

Don't apologize! It's already very nice of you to provide a tool like this by risking your Discord account, so thank you very much! Only you do this, it's extremely convenient!

@aiko-chan-ai
Copy link
Owner

Thank you !
I'll close this issue, maybe it won't be a bug anymore ehehe =))

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

2 participants