From 36b31989c4604ca3a9b72d07b68cd15e82b79d2c Mon Sep 17 00:00:00 2001 From: Elnath Date: Sat, 26 Dec 2020 21:34:40 +0100 Subject: [PATCH] Only administrators can register channels --- VocalMaisBot.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/VocalMaisBot.py b/VocalMaisBot.py index d604f86..072d7cd 100755 --- a/VocalMaisBot.py +++ b/VocalMaisBot.py @@ -74,6 +74,9 @@ class VocalMaisBot(discord.Client): except ValueError: return await message.channel.send(f":x: {channel_id} can not be converted to number") + if not message.author.guild_permissions.administrator: + return await message.channel.send(f":dragon_face: Only an administrator can control me!") + # Retrieving the channel channel = self.get_channel(channel_id) if channel is None: