moved werewolf specific commands to werewolf.cog

This commit is contained in:
Bibin Muttappillil 2020-07-15 16:59:30 +02:00
parent 812ae8a990
commit cbaafe0b85
2 changed files with 18 additions and 25 deletions

View file

@ -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))