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 monster_check(self, ctx, monster_name, check, *args): """Rolls a check for a monster. __Valid Arguments__ *adv/dis* *-b [conditional bonus]* -phrase [flavor text] -title [title] *note: [name] and [cname] will be replaced automatically* -dc [dc] -rr [iterations] str/dex/con/int/wis/cha (different skill base; e.g. Strength (Intimidation)) -h (hides name and image of monster) An italicized argument means the argument supports ephemeral arguments - e.g. `-b1` applies a bonus to one check. """ monster: Monster = await select_monster_full(ctx, monster_name) skill_key = await search_and_select(ctx, SKILL_NAMES, check, lambda s: s) embed = discord.Embed() embed.colour = random.randint(0, 0xffffff) args = await helpers.parse_snippets(args, ctx) args = argparse(args) checkutils.run_check(skill_key, monster, args, embed) if args.last('image') is not None: embed.set_thumbnail(url=args.last('image')) elif not args.last('h', type_=bool): embed.set_thumbnail(url=monster.get_image_url()) if monster.source == 'homebrew': embeds.add_homebrew_footer(embed) await ctx.send(embed=embed) await try_delete(ctx.message)