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/meme/__init__.py

34 lines
1.1 KiB
Python
Raw Normal View History

2023-02-05 14:33:33 +00:00
from core.builtins import Bot
2023-03-04 08:51:56 +00:00
from core.component import module
2022-01-03 09:13:42 +00:00
from core.dirty_check import check
2023-04-30 03:30:59 +00:00
# from modules.meme.jiki import jiki
2022-01-03 09:13:42 +00:00
from modules.meme.moegirl import moegirl
from modules.meme.nbnhhsh import nbnhhsh
from modules.meme.urban import urban
2023-03-04 08:51:56 +00:00
meme = module(
2022-01-03 09:13:42 +00:00
bind_prefix='meme',
2022-07-26 09:54:43 +00:00
# well, people still use it though it only lived for an hour or so
2023-06-01 17:08:10 +00:00
alias='nbnhhsh',
2023-04-05 02:22:37 +00:00
desc='{meme.help.desc}',
2023-04-15 09:43:34 +00:00
developers=['Dianliang233'],
support_languages=['zh_cn', 'en_us'])
2022-01-03 09:13:42 +00:00
2023-09-27 14:36:26 +00:00
@meme.handle('<term> {{meme.help}}')
2023-06-09 10:23:48 +00:00
async def _(msg: Bot.MessageSession, term: str):
2023-04-30 03:30:59 +00:00
# res_jiki = await jiki(msg.parsed_msg['<term>'], msg.locale)
# R.I.P. jikipedia
2023-06-09 10:23:48 +00:00
res_moegirl = await moegirl(term, msg.locale)
res_nbnhhsh = await nbnhhsh(term, msg.locale)
res_urban = await urban(term, msg.locale)
2023-03-04 04:54:24 +00:00
chk = await check(res_moegirl, res_nbnhhsh, res_urban)
2022-01-03 09:13:42 +00:00
res = ''
for i in chk:
if not i['status']:
2023-04-15 08:50:44 +00:00
i = '[???] ' + msg.locale.t('check.redacted')
res += i + '\n'
else:
res += i['content'] + '\n'
2022-05-21 16:04:29 +00:00
await msg.finish(res)