Skip to content

Commit 4ada5a0

Browse files
authored
Update index.js
1 parent 027881e commit 4ada5a0

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

test/index.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,18 @@ client.on("message", (message) => {
1616

1717
const args = message.content.slice("!".length).split(" ");
1818
const cmd = args.shift().toLowerCase();
19-
20-
if (cmd === "!abandon") {
19+
20+
if (cmd === "abandon") {
2121
//create image and send it in the channel
2222
memer.abandon(args.join(" ")).then(image => {
2323
const attachment = new Discord.MessageAttachment(image, "spank.png");
2424
return message.channel.send(attachment);
25+
}).catch(e => {
26+
message.channel.send(String(e).substr(0, 2000), {code: "js"})
2527
})
2628
}
2729

2830
});
2931

3032
//login to the Discord Bot
31-
client.login("TOKEN");
33+
client.login("YOUR DISCORD BOT TOKEN GOES HERE");

0 commit comments

Comments
 (0)