Browse Source

Use split instead of substring for bulkDelete

master
Abheek Dhawan 4 years ago
parent
commit
d74d18e23e
  1. 2
      bot.js

2
bot.js

@ -1027,7 +1027,7 @@ async function bulkDelete(message) {
message.reply("you do not have high enough permissions!"); message.reply("you do not have high enough permissions!");
return; return;
} }
const amount = parseInt(message.content.substring(12)); const amount = parseInt(message.content.split(" ")[1]);
if (!amount) { if (!amount) {
message.reply('please add the number of messages to be deleted!'); message.reply('please add the number of messages to be deleted!');

Loading…
Cancel
Save