From 916ba8459694c458fa1f5963e6236a98f265395c Mon Sep 17 00:00:00 2001 From: Abheek Dhawan Date: Fri, 2 Apr 2021 21:56:39 -0500 Subject: [PATCH] Add admin check for addROle --- index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index e8e4d9f..4efe0e6 100644 --- a/index.js +++ b/index.js @@ -112,7 +112,9 @@ client.on("message", async message => { }); async function addRole(message) { - + if (!message.member.hasPermission('ADMINISTRATOR')) { + message.reply("you do not have adequate permissions!") + } if (!message.content.split(" ")[1]) { message.reply("role query must contain at least 3 characters!")