Browse Source

use message.member.hasPermission

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

2
index.js

@ -19,7 +19,7 @@ client.on("message", message => {
}); });
async function bulkDelete(message) { async function bulkDelete(message) {
if (!message.member.permissions.toArray().has('ADMINISTRATOR')) { if (!message.member.hasPermission('ADMINISTRATOR')) {
message.reply("you do not have permissions!"); message.reply("you do not have permissions!");
return; return;
} }

Loading…
Cancel
Save