Fixed AttributeError: 'User' object has no attribute 'guild_permissions'
This commit is contained in:
@@ -127,7 +127,7 @@ class MyClient(discord.Client):
|
|||||||
if message.author.id == self.user.id:
|
if message.author.id == self.user.id:
|
||||||
return
|
return
|
||||||
|
|
||||||
if message.author.guild_permissions.administrator:
|
if message.author.has_permissions(administrators=True):
|
||||||
if message.content.startswith('-plex add'):
|
if message.content.startswith('-plex add'):
|
||||||
mgs = message.content.replace('-plex add ','')
|
mgs = message.content.replace('-plex add ','')
|
||||||
if plexadd(mgs):
|
if plexadd(mgs):
|
||||||
@@ -141,7 +141,7 @@ class MyClient(discord.Client):
|
|||||||
else:
|
else:
|
||||||
await secure.send('Error Check Logs! {0.author.mention}'.format(message))
|
await secure.send('Error Check Logs! {0.author.mention}'.format(message))
|
||||||
|
|
||||||
if message.author.guild_permissions.administrator:
|
if message.author.has_permissions(administrators=True):
|
||||||
if message.content.startswith('-db add'):
|
if message.content.startswith('-db add'):
|
||||||
mgs = message.content.replace('-db add ','')
|
mgs = message.content.replace('-db add ','')
|
||||||
try:
|
try:
|
||||||
@@ -163,7 +163,7 @@ class MyClient(discord.Client):
|
|||||||
print("Cannot add this user to db.")
|
print("Cannot add this user to db.")
|
||||||
#await message.delete()
|
#await message.delete()
|
||||||
|
|
||||||
if message.author.guild_permissions.administrator:
|
if message.author.has_permissions(administrators=True):
|
||||||
if message.content.startswith('-db ls') or message.content.startswith('-db rm'):
|
if message.content.startswith('-db ls') or message.content.startswith('-db rm'):
|
||||||
embed = discord.Embed(title='Invitarr Database.')
|
embed = discord.Embed(title='Invitarr Database.')
|
||||||
all = db.read_useremail()
|
all = db.read_useremail()
|
||||||
|
|||||||
Reference in New Issue
Block a user