mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-11-15 02:21:21 +01:00
Add permission checking for ban and kick
This commit is contained in:
parent
c21742fb72
commit
d90cd64b0f
@ -4,6 +4,9 @@ class Commands():
|
|||||||
self.database = database
|
self.database = database
|
||||||
|
|
||||||
async def ban(self, message):
|
async def ban(self, message):
|
||||||
|
if not message.author.server_permissions.ban_members:
|
||||||
|
await self.client.send_message(message.channel, message.author.mention + " I'm sorry, but you do not have permissions to ban guest members.")
|
||||||
|
return
|
||||||
serverid = message.server.id
|
serverid = message.server.id
|
||||||
content = message.content.strip()
|
content = message.content.strip()
|
||||||
if len(content.split()) == 2:
|
if len(content.split()) == 2:
|
||||||
@ -16,6 +19,9 @@ class Commands():
|
|||||||
await self.client.send_message(message.channel, message.author.mention + " " + reason)
|
await self.client.send_message(message.channel, message.author.mention + " " + reason)
|
||||||
|
|
||||||
async def kick(self, message):
|
async def kick(self, message):
|
||||||
|
if not message.author.server_permissions.kick_members:
|
||||||
|
await self.client.send_message(message.channel, message.author.mention + " I'm sorry, but you do not have permissions to kick guest members.")
|
||||||
|
return
|
||||||
serverid = message.server.id
|
serverid = message.server.id
|
||||||
content = message.content.strip()
|
content = message.content.strip()
|
||||||
if len(content.split()) == 2:
|
if len(content.split()) == 2:
|
||||||
|
Loading…
Reference in New Issue
Block a user