on member update

This commit is contained in:
Faiz Ahmed
2021-07-17 18:47:49 -04:00
parent eb1c988c3d
commit 9a30720880
3 changed files with 15 additions and 5 deletions

View File

@@ -12,8 +12,7 @@ import sys
from app.header.configparser import roleid, PLEXUSER, PLEXPASS, PLEX_SERVER_NAME, Plex_LIBS, chan, ownerid, auto_remove_user
sys.stdout = sys.stderr
Plex_LIBS = list(Plex_LIBS.split(','))
roleid = list(roleid.split(','))
if auto_remove_user:
print("auto remove user = True")
@@ -23,7 +22,10 @@ account = MyPlexAccount(PLEXUSER, PLEXPASS)
plex = account.resource(PLEX_SERVER_NAME).connect() # returns a PlexServer instance
class app(commands.Cog):
def __init__(self, bot):
self.bot = bot
@commands.Cog.listener()
async def on_ready(self):
print('Made by Sleepingpirate https://github.com/Sleepingpirates/')

View File

@@ -64,6 +64,14 @@ try:
ownerid = int(config.get(BOT_SECTION, 'owner_id'))
auto_remove_user = config.get(BOT_SECTION, 'auto_remove_user') if config.get(BOT_SECTION, 'auto_remove_user') else False
switch = 1
if switch == 1:
if plex_libs.lower() == "all"
continue
else:
Plex_LIBS = list(Plex_LIBS.split(','))
roleid = list(roleid.split(','))
except:
print("Cannot find config/Incomplete config")