AlexzanderFlores / WOKCommands

130 stars 61 forks source link

"testServers" doesn't work with Slash Commands #91

Closed KabanFriends closed 3 years ago

KabanFriends commented 3 years ago

When you specify a testServer and try to register a slash command, the code fails at startup.

F:\WORKSPACE\UselessBot3\node_modules\discord.js\src\rest\RequestHandler.js:154
      throw new DiscordAPIError(request.path, data, request.method, res.status);
            ^

DiscordAPIError: Invalid Form Body
options[0].name: Command name is invalid
options[1].name: Command name is invalid
    at RequestHandler.execute (F:\WORKSPACE\UselessBot3\node_modules\discord.js\src\rest\RequestHandler.js:154:13)
    at processTicksAndRejections (node:internal/process/task_queues:94:5)
    at async RequestHandler.push (F:\WORKSPACE\UselessBot3\node_modules\discord.js\src\rest\RequestHandler.js:39:14) {
  method: 'post',
  path: '/applications/633203527115735060/guilds/610160488097251359/commands',
  code: 50035,
  httpStatus: 400
}
KabanFriends commented 3 years ago

sorry this was a dupe of #88