示例#1
0
    async def pick(self, ctx, *args):
        match = Match.get(ctx.channel.id)
        arg = " ".join(args)

        # To allow changing base with =p:
        if arg not in ("vs", "tr", "nc", "help",
                       "h"):  # Those args are reserved for =p
            # bl is True if arg is detected to relate to base picking
            bl = arg in ("list", "l")
            bl = bl or Base.get_bases_from_name(arg, base_pool=True)
            if bl:
                await match.command.base(ctx, args)
                return
        await match.command.pick(ctx, args)
示例#2
0
 def __init__(self, data):
     self.data = data
     self.id = data["_id"]
     self.match = Match(data=data)
示例#3
0
 async def squittal(self, ctx):
     match = Match.get(ctx.channel.id)
     await match.command.squittal(ctx)
示例#4
0
 async def ready(self, ctx):  # when ready
     match = Match.get(ctx.channel.id)
     await match.command.ready(ctx)
示例#5
0
 async def base(self, ctx, *args):
     match = Match.get(ctx.channel.id)
     await match.command.base(ctx, args)
示例#6
0
 async def unbench(self, ctx, *args):
     match = Match.get(ctx.channel.id)
     await match.command.bench(ctx, args, bench=False)
示例#7
0
 async def swap(self, ctx, *args):
     match = Match.get(ctx.channel.id)
     await match.command.swap(ctx, args)