Browse Source

Use parseInt() to convert string to integer

master
Abheek Dhawan 4 years ago
parent
commit
f583b9ff00
  1. 2
      index.js

2
index.js

@ -19,7 +19,7 @@ client.on("message", message => {
});
async function bulkDelete(message) {
const amount = message.content.substring(12);
const amount = Integer.parseInt(message.content.substring(12));
if (!amount) {
message.reply('please add the number of messages to be deleted!');

Loading…
Cancel
Save