diff --git a/bot/cogs/fun.py b/bot/cogs/fun.py index 68b623b..5a3e6d4 100644 --- a/bot/cogs/fun.py +++ b/bot/cogs/fun.py @@ -683,6 +683,24 @@ async def officeclip(self, ctx: commands.Context) -> Message: data = await response.json() random_clip = random.choice(data) await ctx.send(random_clip["video_url"]) + + @commands.hybrid_command(name="anime", description="Get a random anime quote") + @commands.guild_only() + @app_commands.guild_only() + async def anime(self, ctx: commands.Context) -> Message: + """ + Get a random anime quote + """ + async with self.client.session.get("https://animechan.xyz/api/random") as response: + if response.status == 200: + quote = await response.json() + embed = Embed( + description=f'"{quote["quote"]}" - {quote["character"]} ({quote["anime"]})', + timestamp=ctx.message.created_at, + ) + embed.colour = Colour.blurple() + embed.set_footer(text="https://animechan.xyz/") + await ctx.send(embed=embed) async def setup(client: commands.Bot) -> None: