Update Invitarr-docker.py

This commit is contained in:
Sleepingpirates
2020-06-10 13:36:38 -04:00
committed by GitHub
parent 633be6816c
commit 501bb45f88

View File

@@ -103,17 +103,6 @@ class MyClient(discord.Client):
secure = client.get_channel(chan)
if message.author.id == self.user.id:
return
if message.content.startswith('-dbadd'):
mgs = message.content.replace('-dbadd ','')
try:
mgs = mgs.split(' ')
email = mgs[0]
username = mgs[1].replace('@', '').split('#')[0]
db.save_user(username, email)
await message.channel.send('The user {} has been added to db!'.format(mgs[1]))
except:
print("Cannot add this user to db.")
if str(message.channel) == str(secure):
if message.content.startswith('-plexadd'):
@@ -128,6 +117,17 @@ class MyClient(discord.Client):
await message.channel.send('The email has been removed! {0.author.mention}'.format(message))
else:
message.channel.send('Error Check Logs! {0.author.mention}'.format(message))
if message.content.startswith('-dbadd'):
mgs = message.content.replace('-dbadd ','')
try:
mgs = mgs.split(' ')
email = mgs[0]
username = mgs[1].replace('@', '').split('#')[0]
db.save_user(username, email)
await message.channel.send('The user {} has been added to db!'.format(mgs[1]))
except:
print("Cannot add this user to db.")
client = MyClient()
client.run(Discord_bot_token)