Skip to content

Commit

Permalink
fix: wrong command data being display on command API errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Mirasaki committed Jun 19, 2023
1 parent 5094caa commit 61de626
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/handlers/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,7 @@ const registerGlobalCommands = async (client) => {
// Invalid Form Body error
if (err.status === 400) {
logger.syserr(`Error encountered while trying to register command API data: ${ err.message }`);
for (const [ index ] in err.rawError.errors) {
// Logging the invalid data to the console
console.log(err.requestBody.json[Number(index)]);
}
logger.printErr(err);
}

else {
Expand Down

0 comments on commit 61de626

Please sign in to comment.