Archived
1
0
Fork 0
This repository has been archived on 2024-04-26. You can view files and clone it, but cannot push or open issues or pull requests.
akari-bot/modules/ask/tools/meme.py

19 lines
664 B
Python
Raw Normal View History

2023-04-08 04:25:48 +00:00
import asyncio
from modules.meme.moegirl import moegirl
from modules.meme.nbnhhsh import nbnhhsh
from modules.meme.urban import urban
2023-04-19 07:41:39 +00:00
from .utils import locale_en, AkariTool
2023-04-08 04:25:48 +00:00
2023-06-20 07:29:56 +00:00
async def meme(query: str):
2023-04-08 04:25:48 +00:00
results = await asyncio.gather(
2023-06-20 07:29:56 +00:00
moegirl(query, locale_en), nbnhhsh(query, locale_en), urban(query, locale_en)
2023-04-08 04:25:48 +00:00
)
return f'Moegirlpedia result: {results[0]}\n\nNbnhhsh result: {results[1]}\n\nUrban Dictionary result: {results[2]}'
2023-06-20 07:29:56 +00:00
meme_tool = AkariTool.from_function(
func=meme,
2023-04-08 04:25:48 +00:00
description='A tool for looking up Internet memes, powered by Moegirlpedia, Nbnhhsh and Urban Dictionary. Input should be the exact name of the meme.'
)