コード例 #1
0
ファイル: hentai.py プロジェクト: shamahdotdev/robo-hasbi
 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('❗')
コード例 #2
0
ファイル: test_hentai.py プロジェクト: mousesama/hentai
 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}")