moved werewolf specific commands to werewolf.cog
This commit is contained in:
parent
812ae8a990
commit
cbaafe0b85
|
@ -37,6 +37,18 @@ class Werewolf_cog(Game_cog, commands.Cog):
|
|||
"""registers all mentioned players for the game"""
|
||||
await super().players(ctx)
|
||||
|
||||
@werewolf.command()
|
||||
@commands.check(Game_cog.pre_game_check)
|
||||
async def roles(self, ctx, *args):
|
||||
"""registers roles you want to play with"""
|
||||
await self.game_instances[ctx.channel].set_roles(args)
|
||||
|
||||
@werewolf.command()
|
||||
@commands.check(Game_cog.pre_game_check)
|
||||
async def minutes(self, ctx, i):
|
||||
"""set discussion time"""
|
||||
await self.game_instances[ctx.channel].set_time(i)
|
||||
|
||||
@werewolf.command()
|
||||
@commands.check(Game_cog.pre_game_check)
|
||||
async def start(self, ctx):
|
||||
|
@ -49,6 +61,12 @@ class Werewolf_cog(Game_cog, commands.Cog):
|
|||
"""aborts the current round of werewolf"""
|
||||
await super().stop(ctx)
|
||||
|
||||
@werewolf.command()
|
||||
@commands.check(Game_cog.in_game_check)
|
||||
async def time(self, ctx):
|
||||
"""checks how much discussion time there is left"""
|
||||
await self.send_friendly(ctx, self.game_instances[ctx.channel].remaining_time_string())
|
||||
|
||||
|
||||
def setup(bot):
|
||||
bot.add_cog(Werewolf_cog(bot, Werewolf_game))
|
||||
|
|
|
@ -50,29 +50,4 @@ def error_handling(command):
|
|||
return wrapper
|
||||
'''
|
||||
|
||||
'''
|
||||
|
||||
# TODO: (specifig game) werewolf COG
|
||||
|
||||
@game.command()
|
||||
@game_not_running
|
||||
@error_handling
|
||||
async def roles(ctx, *args):
|
||||
await game_instances[ctx.channel].set_roles(args)
|
||||
|
||||
|
||||
@game.command()
|
||||
@game_not_running
|
||||
@error_handling
|
||||
async def minutes(ctx, i):
|
||||
await game_instances[ctx.channel].set_time(i)
|
||||
|
||||
|
||||
@game.command()
|
||||
@game_running
|
||||
@error_handling
|
||||
async def time(ctx):
|
||||
await send_friendly(ctx, game_instances[ctx.channel].remaining_time_string())
|
||||
'''
|
||||
|
||||
bot.run(TOKEN)
|
||||
|
|
Loading…
Reference in New Issue