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):
|
async def on_member_update(self, before, after):
|
||||||
role = after.guild.get_role(roleid)
|
role = after.guild.get_role(roleid)
|
||||||
|
secure = client.get_channel(chan)
|
||||||
if (role in after.roles and role not in before.roles):
|
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('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.')
|
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)
|
db.save_user(str(after.id), email.content)
|
||||||
await asyncio.sleep(20)
|
await asyncio.sleep(20)
|
||||||
await after.send('You have Been Added To Plex!')
|
await after.send('You have Been Added To Plex!')
|
||||||
secure = client.get_channel(chan)
|
|
||||||
await secure.send(plexname + ' ' + after.mention + ' was added to plex')
|
await secure.send(plexname + ' ' + after.mention + ' was added to plex')
|
||||||
else:
|
else:
|
||||||
await after.send('There was an error adding this email address. Message Server Admin.')
|
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)
|
deleted = db.delete_user(user_id)
|
||||||
if deleted:
|
if deleted:
|
||||||
print("Removed {} from db".format(email))
|
print("Removed {} from db".format(email))
|
||||||
secure = client.get_channel(chan)
|
|
||||||
await secure.send(plexname + ' ' + after.mention + ' was removed from plex')
|
await secure.send(plexname + ' ' + after.mention + ' was removed from plex')
|
||||||
else:
|
else:
|
||||||
print("Cannot remove this user from db.")
|
print("Cannot remove this user from db.")
|
||||||
@@ -143,8 +142,6 @@ class MyClient(discord.Client):
|
|||||||
else:
|
else:
|
||||||
message.channel.send('Error Check Logs! {0.author.mention}'.format(message))
|
message.channel.send('Error Check Logs! {0.author.mention}'.format(message))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
async def on_member_remove(self, member):
|
async def on_member_remove(self, member):
|
||||||
if auto_remove_user:
|
if auto_remove_user:
|
||||||
@@ -161,11 +158,6 @@ class MyClient(discord.Client):
|
|||||||
print("Cannot remove this user from db.")
|
print("Cannot remove this user from db.")
|
||||||
except:
|
except:
|
||||||
print("Cannot remove this user from plex.")
|
print("Cannot remove this user from plex.")
|
||||||
|
|
||||||
def printdb():
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
client = MyClient()
|
client = MyClient()
|
||||||
client.run(Discord_bot_token)
|
client.run(Discord_bot_token)
|
||||||
Reference in New Issue
Block a user