fixed bugs
This commit is contained in:
committed by
repl.it user
parent
495b714135
commit
0bc6cfce0b
10
Invitarr.py
10
Invitarr.py
@@ -65,6 +65,7 @@ class MyClient(discord.Client):
|
||||
|
||||
async def on_member_update(self, before, after):
|
||||
role = after.guild.get_role(roleid)
|
||||
secure = client.get_channel(chan)
|
||||
if (role in after.roles and role not in before.roles):
|
||||
await after.send('Welcome To '+ PLEX_SERVER_NAME +'. Just reply with your email so we can add you to Plex!')
|
||||
await after.send('I will wait 10 minutes for your message, if you do not send it by then I will cancel the command.')
|
||||
@@ -84,7 +85,6 @@ class MyClient(discord.Client):
|
||||
db.save_user(str(after.id), email.content)
|
||||
await asyncio.sleep(20)
|
||||
await after.send('You have Been Added To Plex!')
|
||||
secure = client.get_channel(chan)
|
||||
await secure.send(plexname + ' ' + after.mention + ' was added to plex')
|
||||
else:
|
||||
await after.send('There was an error adding this email address. Message Server Admin.')
|
||||
@@ -97,7 +97,6 @@ class MyClient(discord.Client):
|
||||
deleted = db.delete_user(user_id)
|
||||
if deleted:
|
||||
print("Removed {} from db".format(email))
|
||||
secure = client.get_channel(chan)
|
||||
await secure.send(plexname + ' ' + after.mention + ' was removed from plex')
|
||||
else:
|
||||
print("Cannot remove this user from db.")
|
||||
@@ -143,8 +142,6 @@ class MyClient(discord.Client):
|
||||
else:
|
||||
message.channel.send('Error Check Logs! {0.author.mention}'.format(message))
|
||||
|
||||
|
||||
|
||||
|
||||
async def on_member_remove(self, member):
|
||||
if auto_remove_user:
|
||||
@@ -161,11 +158,6 @@ class MyClient(discord.Client):
|
||||
print("Cannot remove this user from db.")
|
||||
except:
|
||||
print("Cannot remove this user from plex.")
|
||||
|
||||
def printdb():
|
||||
|
||||
|
||||
|
||||
|
||||
client = MyClient()
|
||||
client.run(Discord_bot_token)
|
||||
Reference in New Issue
Block a user