async def check(self, ctx, check, *args): """Rolls a check for your current active character. __Valid Arguments__ *adv/dis* *-b [conditional bonus]* -phrase [flavor text] -title [title] *note: [name] and [cname] will be replaced automatically* -dc [dc] -mc [minimum roll] -rr [iterations] str/dex/con/int/wis/cha (different skill base; e.g. Strength (Intimidation)) An italicized argument means the argument supports ephemeral arguments - e.g. `-b1` applies a bonus to one check. """ char: Character = await Character.from_ctx(ctx) skill_key = await search_and_select(ctx, SKILL_NAMES, check, lambda s: s) embed = EmbedWithCharacter(char, False) skill = char.skills[skill_key] args = await self.new_arg_stuff(args, ctx, char) checkutils.update_csetting_args(char, args, skill) checkutils.run_check(skill_key, char, args, embed) if args.last('image') is not None: embed.set_thumbnail(url=args.last('image')) await ctx.send(embed=embed) await try_delete(ctx.message)
async def save(self, ctx, skill, *args): """Rolls a save for your current active character. __Valid Arguments__ *adv/dis* *-b [conditional bonus]* -phrase [flavor text] -title [title] *note: [name] and [sname] will be replaced automatically* -image [image URL] -dc [dc] (does not apply to Death Saves) -rr [iterations] (does not apply to Death Saves) An italicized argument means the argument supports ephemeral arguments - e.g. `-b1` applies a bonus to one save. """ if skill == 'death': ds_cmd = self.bot.get_command('game deathsave') if ds_cmd is None: return await ctx.send("Error: GameTrack cog not loaded.") return await ctx.invoke(ds_cmd, *args) char: Character = await Character.from_ctx(ctx) embed = EmbedWithCharacter(char, name=False) args = await self.new_arg_stuff(args, ctx, char) checkutils.update_csetting_args(char, args) checkutils.run_save(skill, char, args, embed) if args.last('image') is not None: embed.set_thumbnail(url=args.last('image')) # send await ctx.send(embed=embed) await try_delete(ctx.message)