fixed bugs

This commit is contained in:
Sleepingpirates
2020-06-12 17:24:35 +00:00
committed by repl.it user
parent bd8e5e87a9
commit 73f16672f2
2 changed files with 14 additions and 2 deletions

View File

@@ -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.')
@@ -145,6 +144,8 @@ class MyClient(discord.Client):
message.channel.send('Error Check Logs! {0.author.mention}'.format(message))
async def on_member_remove(self, member):
if auto_remove_user:
try:
@@ -161,5 +162,10 @@ class MyClient(discord.Client):
except:
print("Cannot remove this user from plex.")
def printdb():
client = MyClient()
client.run(Discord_bot_token)

6
db.py
View File

@@ -71,3 +71,9 @@ def delete_user(username):
return False
else:
return "username cannot be empty"
def read_useremail():
data = cursor.fetchall()
for row in data :
print row[1]