diff --git a/Invitarr.py b/Invitarr.py index 596d86e..1303f83 100644 --- a/Invitarr.py +++ b/Invitarr.py @@ -122,7 +122,6 @@ class MyClient(discord.Client): user_id = user_id.replace(i, '') db.save_user(user_id, email) await message.channel.send('The user has been added to db!') - secure = client.get_channel(chan) await secure.send(email + ' ' + msg[1] + ' was added to plex') except: await message.channel.send('Cannot add this user to db.') @@ -144,6 +143,8 @@ 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: @@ -160,6 +161,11 @@ 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) \ No newline at end of file diff --git a/db.py b/db.py index c3d8df0..7c38558 100644 --- a/db.py +++ b/db.py @@ -70,4 +70,10 @@ def delete_user(username): except: return False else: - return "username cannot be empty" \ No newline at end of file + return "username cannot be empty" + +def read_useremail(): + data = cursor.fetchall() + for row in data : + print row[1] +