From 44fcfb644df08a491bcb24248c334f305a5c9cca Mon Sep 17 00:00:00 2001 From: Abheek Dhawan Date: Wed, 31 Mar 2021 20:30:52 -0500 Subject: [PATCH] use message.member.hasPermission --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 1791315..60edbf2 100644 --- a/index.js +++ b/index.js @@ -19,7 +19,7 @@ client.on("message", message => { }); async function bulkDelete(message) { - if (!message.member.permissions.toArray().has('ADMINISTRATOR')) { + if (!message.member.hasPermission('ADMINISTRATOR')) { message.reply("you do not have permissions!"); return; }