on member update
This commit is contained in:
@@ -12,8 +12,7 @@ import sys
|
|||||||
from app.header.configparser import roleid, PLEXUSER, PLEXPASS, PLEX_SERVER_NAME, Plex_LIBS, chan, ownerid, auto_remove_user
|
from app.header.configparser import roleid, PLEXUSER, PLEXPASS, PLEX_SERVER_NAME, Plex_LIBS, chan, ownerid, auto_remove_user
|
||||||
|
|
||||||
sys.stdout = sys.stderr
|
sys.stdout = sys.stderr
|
||||||
Plex_LIBS = list(Plex_LIBS.split(','))
|
|
||||||
roleid = list(roleid.split(','))
|
|
||||||
|
|
||||||
if auto_remove_user:
|
if auto_remove_user:
|
||||||
print("auto remove user = True")
|
print("auto remove user = True")
|
||||||
@@ -23,7 +22,10 @@ account = MyPlexAccount(PLEXUSER, PLEXPASS)
|
|||||||
plex = account.resource(PLEX_SERVER_NAME).connect() # returns a PlexServer instance
|
plex = account.resource(PLEX_SERVER_NAME).connect() # returns a PlexServer instance
|
||||||
|
|
||||||
class app(commands.Cog):
|
class app(commands.Cog):
|
||||||
|
|
||||||
|
def __init__(self, bot):
|
||||||
|
self.bot = bot
|
||||||
|
|
||||||
@commands.Cog.listener()
|
@commands.Cog.listener()
|
||||||
async def on_ready(self):
|
async def on_ready(self):
|
||||||
print('Made by Sleepingpirate https://github.com/Sleepingpirates/')
|
print('Made by Sleepingpirate https://github.com/Sleepingpirates/')
|
||||||
|
|||||||
@@ -64,6 +64,14 @@ try:
|
|||||||
ownerid = int(config.get(BOT_SECTION, 'owner_id'))
|
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
|
auto_remove_user = config.get(BOT_SECTION, 'auto_remove_user') if config.get(BOT_SECTION, 'auto_remove_user') else False
|
||||||
switch = 1
|
switch = 1
|
||||||
|
|
||||||
|
if switch == 1:
|
||||||
|
if plex_libs.lower() == "all"
|
||||||
|
continue
|
||||||
|
else:
|
||||||
|
Plex_LIBS = list(Plex_LIBS.split(','))
|
||||||
|
roleid = list(roleid.split(','))
|
||||||
|
|
||||||
except:
|
except:
|
||||||
print("Cannot find config/Incomplete config")
|
print("Cannot find config/Incomplete config")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user