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)
def __init__(self, data): self.data = data self.id = data["_id"] self.match = Match(data=data)
async def squittal(self, ctx): match = Match.get(ctx.channel.id) await match.command.squittal(ctx)
async def ready(self, ctx): # when ready match = Match.get(ctx.channel.id) await match.command.ready(ctx)
async def base(self, ctx, *args): match = Match.get(ctx.channel.id) await match.command.base(ctx, args)
async def unbench(self, ctx, *args): match = Match.get(ctx.channel.id) await match.command.bench(ctx, args, bench=False)
async def swap(self, ctx, *args): match = Match.get(ctx.channel.id) await match.command.swap(ctx, args)