Esempio n. 1
0
 async def predicate(ctx: commands.Context):
     scrim = await Scrim.get_scrim(ctx)
     if not scrim.state == ScrimState.INACTIVE:
         raise BotCheckFailure(
             "There is already an active scrim on the channel.")
     ctx.scrim = scrim
     return True
Esempio n. 2
0
 async def predicate(ctx: commands.Context):
     scrim = await Scrim.get_scrim(ctx)
     if ctx.author != scrim.master:
         raise BotCheckFailure("Only the scrim creator can do that.")
     elif scrim.state == ScrimState.INACTIVE:
         raise BotCheckFailure(
             "That command requires an active scrim on the channel.")
     ctx.scrim = scrim
     return True