async def save(self, ctx, *, tag): '''Saves a Clash Royale tag to your discord profile. Ability to save multiple tags coming soon. ''' tag = self.conv.resolve_tag(tag) if not tag: raise InvalidTag('Invalid tag') ctx.save_tag(tag, 'clashroyale') await ctx.send('Successfuly saved tag.')
async def convert(self, ctx, argument): # Try to convert it to a member. try: user = await super().convert(ctx, argument) except commands.BadArgument: pass else: return user # Not a user so its a tag. tag = self.resolve_tag(argument) if not tag: raise InvalidTag('Invalid cr-tag passed.') else: return tag
async def convert(self, ctx, argument): tag = self.resolve_tag(argument) if not tag: raise InvalidTag('Invalid tag passed') else: return tag