-
-
Notifications
You must be signed in to change notification settings - Fork 305
Expand file tree
/
Copy pathanimechan.py
More file actions
25 lines (20 loc) · 631 Bytes
/
animechan.py
File metadata and controls
25 lines (20 loc) · 631 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Ultroid - UserBot
#
# This file is a part of < https://github.com/TeamUltroid/UltroidAddons/>
"""
Fetch Random anime quotes
Command : `{i}aniquote`
"""
from . import ultroid_cmd, async_searcher
@ultroid_cmd(pattern="aniquote")
async def _(ult):
u = await ult.eor("...")
try:
resp = await async_searcher(
"https://animechan.vercel.app/api/random", re_json=True
)
results = f"**{resp['quote']}**\n"
results += f" — __{resp['character']} ({resp['anime']})__"
return await u.edit(results)
except Exception:
await u.edit("`Something went wrong LOL ...`")