async def hentai(self, ctx): if ctx.invoked_subcommand is None and not ctx.subcommand_passed is None: await ctx.send('Invalid hentai command passed...') elif ctx.invoked_subcommand is None: id_ = Hentai.get_random_id() embedVar = await ctx.channel.send(embed=embed_hentai(id_)) await embedVar.add_reaction('❗')
def test_random_id(self): random_id = Hentai.get_random_id() response = requests.get(f"{Hentai._URL}{random_id}") self.assertTrue(response.ok, msg=f"Failing ID: {random_id} and URL: {response.url}")