Skip to content
This repository has been archived by the owner on Dec 3, 2023. It is now read-only.

Commit

Permalink
better error handler
Browse files Browse the repository at this point in the history
  • Loading branch information
PineaFan committed Feb 26, 2022
1 parent bc998a0 commit 8e0b360
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export class HaikuClient extends Client {

ownerIDs: null,
enableDevelopment: false,

enableTextCommands: false,

defaultCheck: async () => true,
Expand Down Expand Up @@ -156,7 +156,7 @@ export class HaikuClient extends Client {
return await sendErrorMessage("You don't have permission to run this command");
}
} catch (error) {
return await sendErrorMessage(`It doesn't look like you can run that command right now: ${error}`);
return await sendErrorMessage(`It doesn't look like you can run that command right now:\n> ${error}`);
}

try {
Expand Down
2 changes: 1 addition & 1 deletion src/commands/senryu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class Senryu {
//TODO: Make this work like jsk py
async js(interaction: HaikuCommandInteraction) {
if(!this.JSShells.has(interaction.user.id)) {

let stdin = new Readable();
let stdout = new Writable();

Expand Down

1 comment on commit 8e0b360

@Minion3665
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: This doesn't solve #7, it's not the better error handler talked about there; it simply changes the message returned with a custom error message to be a bit clearer

Please sign in to comment.