Only administrators can register channels

This commit is contained in:
Elnath 2020-12-26 21:34:40 +01:00
parent d1656dcc45
commit 36b31989c4
1 changed files with 3 additions and 0 deletions

View File

@ -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: