Skip to content
This repository has been archived by the owner on Feb 14, 2022. It is now read-only.

Commit

Permalink
Change example in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Dustin Rouillard committed Jul 24, 2020
1 parent db86e89 commit 4eccfab
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@ client.on('message', async (msg) => {
args.unshift();

if (command == 'test') {
msg.Edit('Test success');
msg.edit('Test success');
} else if (command == 'eval') {
try {
let evaluation = (() => {
return eval(raw);
})();

msg.Edit(`Evaluation complete!\n\nInput:\n\`\`\`js\n${raw}\n\`\`\`\nOutput:\n\`\`\`\n${evaluation}\n\`\`\``);
msg.edit(`Evaluation complete!\n\nInput:\n\`\`\`js\n${raw}\n\`\`\`\nOutput:\n\`\`\`\n${evaluation}\n\`\`\``);
} catch (error) {
msg.Edit(`Evaluation failed!\n\nInput:\n\`\`\`js\n${raw}\n\`\`\`\nOutput:\n\`\`\`\n${error}\n\`\`\``);
msg.edit(`Evaluation failed!\n\nInput:\n\`\`\`js\n${raw}\n\`\`\`\nOutput:\n\`\`\`\n${error}\n\`\`\``);
}
}
});

client.Connect(process.env.TOKEN);
client.connect(process.env.TOKEN);

0 comments on commit 4eccfab

Please sign in to comment.