forked from viveksantayana/geas-bot
Hotfix for enabling the /tcard command
This commit is contained in:
parent
9014bdaac4
commit
e441ba63a0
@ -123,6 +123,9 @@ class Configuration(commands.Cog, name='Configuration Commands'):
|
|||||||
if self.client.get_cog('Player Commands') is None:
|
if self.client.get_cog('Player Commands') is None:
|
||||||
loadCog(f'./{cogsDir}/slashcommands/secondary/player_commands.py')
|
loadCog(f'./{cogsDir}/slashcommands/secondary/player_commands.py')
|
||||||
flag = True
|
flag = True
|
||||||
|
if self.client.get_cog('T-Card Command') is None:
|
||||||
|
loadCog(f'./{cogsDir}/slashcommands/secondary/tcard.py')
|
||||||
|
flag = True
|
||||||
if self.client.get_cog('Pitch Command') is None:
|
if self.client.get_cog('Pitch Command') is None:
|
||||||
loadCog(f'./{cogsDir}/slashcommands/secondary/pitch.py')
|
loadCog(f'./{cogsDir}/slashcommands/secondary/pitch.py')
|
||||||
flag = True
|
flag = True
|
||||||
@ -301,6 +304,9 @@ class Configuration(commands.Cog, name='Configuration Commands'):
|
|||||||
if self.client.get_cog('Player Commands') is None:
|
if self.client.get_cog('Player Commands') is None:
|
||||||
loadCog(f'./{cogsDir}/slashcommands/secondary/player_commands.py')
|
loadCog(f'./{cogsDir}/slashcommands/secondary/player_commands.py')
|
||||||
Flag = True
|
Flag = True
|
||||||
|
if self.client.get_cog('T-Card Command') is None:
|
||||||
|
loadCog(f'./{cogsDir}/slashcommands/secondary/tcard.py')
|
||||||
|
Flag = True
|
||||||
if self.client.get_cog('Pitch Command') is None:
|
if self.client.get_cog('Pitch Command') is None:
|
||||||
loadCog(f'./{cogsDir}/slashcommands/secondary/pitch.py')
|
loadCog(f'./{cogsDir}/slashcommands/secondary/pitch.py')
|
||||||
Flag = True
|
Flag = True
|
||||||
|
@ -290,6 +290,9 @@ class GameCreate(commands.Cog, name='Game Create'):
|
|||||||
if self.client.get_cog('Player Commands') is None:
|
if self.client.get_cog('Player Commands') is None:
|
||||||
loadCog(f'./{cogsDir}/slashcommands/secondary/player_commands.py')
|
loadCog(f'./{cogsDir}/slashcommands/secondary/player_commands.py')
|
||||||
flag = True
|
flag = True
|
||||||
|
if self.client.get_cog('T-Card Command') is None:
|
||||||
|
loadCog(f'./{cogsDir}/slashcommands/secondary/tcard.py')
|
||||||
|
flag = True
|
||||||
if self.client.get_cog('Pitch Command') is None:
|
if self.client.get_cog('Pitch Command') is None:
|
||||||
loadCog(f'./{cogsDir}/slashcommands/secondary/pitch.py')
|
loadCog(f'./{cogsDir}/slashcommands/secondary/pitch.py')
|
||||||
flag = True
|
flag = True
|
||||||
|
@ -97,6 +97,7 @@ class GameManagement(commands.Cog, name='Game Management'):
|
|||||||
if not any([x for x in yaml_load(lookupFile).values()]):
|
if not any([x for x in yaml_load(lookupFile).values()]):
|
||||||
unloadCog(f'./{cogsDir}/slashcommands/secondary/game_management.py')
|
unloadCog(f'./{cogsDir}/slashcommands/secondary/game_management.py')
|
||||||
if self.client.get_cog('Player Commands') is not None: unloadCog(f'./{cogsDir}/slashcommands/secondary/player_commands.py')
|
if self.client.get_cog('Player Commands') is not None: unloadCog(f'./{cogsDir}/slashcommands/secondary/player_commands.py')
|
||||||
|
if self.client.get_cog('T-Card Command') is not None: unloadCog(f'./{cogsDir}/slashcommands/secondary/tcard.py')
|
||||||
if self.client.get_cog('Pitch Command') is not None: unloadCog(f'./{cogsDir}/slashcommands/secondary/pitch.py')
|
if self.client.get_cog('Pitch Command') is not None: unloadCog(f'./{cogsDir}/slashcommands/secondary/pitch.py')
|
||||||
await self.client.slash.sync_all_commands()
|
await self.client.slash.sync_all_commands()
|
||||||
|
|
||||||
@ -553,6 +554,7 @@ class GameManagement(commands.Cog, name='Game Management'):
|
|||||||
if not any([x for x in yaml_load(lookupFile).values()]):
|
if not any([x for x in yaml_load(lookupFile).values()]):
|
||||||
unloadCog(f'./{cogsDir}/slashcommands/secondary/game_management.py')
|
unloadCog(f'./{cogsDir}/slashcommands/secondary/game_management.py')
|
||||||
if self.client.get_cog('Player Commands') is not None: unloadCog(f'./{cogsDir}/slashcommands/secondary/player_commands.py')
|
if self.client.get_cog('Player Commands') is not None: unloadCog(f'./{cogsDir}/slashcommands/secondary/player_commands.py')
|
||||||
|
if self.client.get_cog('T-Card Command') is not None: unloadCog(f'./{cogsDir}/slashcommands/secondary/tcard.py')
|
||||||
if self.client.get_cog('Pitch Command') is not None: unloadCog(f'./{cogsDir}/slashcommands/secondary/pitch.py')
|
if self.client.get_cog('Pitch Command') is not None: unloadCog(f'./{cogsDir}/slashcommands/secondary/pitch.py')
|
||||||
await self.client.slash.sync_all_commands()
|
await self.client.slash.sync_all_commands()
|
||||||
|
|
||||||
|
@ -91,14 +91,11 @@ class ManipulateTimeslots(commands.Cog, name='Manipulate Timeslots'):
|
|||||||
yaml_dump(conf, configFile)
|
yaml_dump(conf, configFile)
|
||||||
if not any([x['timeslots'] for x in yaml_load(configFile).values()]):
|
if not any([x['timeslots'] for x in yaml_load(configFile).values()]):
|
||||||
unloadCog(f'./{cogsDir}/slashcommands/secondary/manipulate_timeslots.py')
|
unloadCog(f'./{cogsDir}/slashcommands/secondary/manipulate_timeslots.py')
|
||||||
if self.client.get_cog('Game Management') is not None:
|
if self.client.get_cog('Game Management') is not None: unloadCog(f'./{cogsDir}/slashcommands/secondary/game_management.py')
|
||||||
unloadCog(f'./{cogsDir}/slashcommands/secondary/game_management.py')
|
if self.client.get_cog('Game Create') is not None: unloadCog(f'./{cogsDir}/slashcommands/secondary/game_create.py')
|
||||||
if self.client.get_cog('Game Create') is not None:
|
if self.client.get_cog('Player Commands') is not None: unloadCog(f'./{cogsDir}/slashcommands/secondary/player_commands.py')
|
||||||
unloadCog(f'./{cogsDir}/slashcommands/secondary/game_create.py')
|
if self.client.get_cog('T-Card Command') is not None: unloadCog(f'./{cogsDir}/slashcommands/secondary/tcard.py')
|
||||||
if self.client.get_cog('Player Commands') is not None:
|
if self.client.get_cog('Pitch Command') is not None: unloadCog(f'./{cogsDir}/slashcommands/secondary/pitch.py')
|
||||||
unloadCog(f'./{cogsDir}/slashcommands/secondary/player_commands.py')
|
|
||||||
if self.client.get_cog('Pitch Command') is not None:
|
|
||||||
unloadCog(f'./{cogsDir}/slashcommands/secondary/pitch.py')
|
|
||||||
await self.client.slash.sync_all_commands()
|
await self.client.slash.sync_all_commands()
|
||||||
else:
|
else:
|
||||||
await ctx.send('```Error: You cannot delete a timeslot that has existing game entries. Please delete all games first.```',hidden=True)
|
await ctx.send('```Error: You cannot delete a timeslot that has existing game entries. Please delete all games first.```',hidden=True)
|
||||||
|
Loading…
Reference in New Issue
Block a user