diff options
author | Kyomotoi <[email protected]> | 2022-03-27 15:20:53 +0800 |
---|---|---|
committer | Kyomotoi <[email protected]> | 2022-03-27 15:43:40 +0800 |
commit | 347699256c1e063698474b8c07dc8a9ee67b104f (patch) | |
tree | 05ac4548db3d42c4d05b5f7b7ccf7bd400038328 /ATRI | |
parent | e0fd4320e77c3e7d29b4f5507ec0e6f82e7dc389 (diff) | |
download | ATRI-347699256c1e063698474b8c07dc8a9ee67b104f.tar.gz ATRI-347699256c1e063698474b8c07dc8a9ee67b104f.tar.bz2 ATRI-347699256c1e063698474b8c07dc8a9ee67b104f.zip |
🔥 移除无用功能
Diffstat (limited to 'ATRI')
-rw-r--r-- | ATRI/plugins/setu/__init__.py | 21 | ||||
-rw-r--r-- | ATRI/plugins/setu/data_source.py | 25 |
2 files changed, 0 insertions, 46 deletions
diff --git a/ATRI/plugins/setu/__init__.py b/ATRI/plugins/setu/__init__.py index cf38fd6..f4bc99d 100644 --- a/ATRI/plugins/setu/__init__.py +++ b/ATRI/plugins/setu/__init__.py @@ -171,27 +171,6 @@ async def _deal_setting(msg: str = ArgPlainText("catcher_set")): await catcher_setting.finish(repo) [email protected]_job( - "interval", name="涩批诱捕器", hours=1, misfire_grace_time=60, args=[Bot] -) -async def _scheduler_setu(bot): - try: - group_list = await bot.get_group_list() - lucky_group = choice(group_list) - group_id = lucky_group["group_id"] - setu = await Setu().scheduler() - if not setu: - return - - msg_0 = await bot.send_group_msg(group_id=int(group_id), message=Message(setu)) - message_id = msg_0["message_id"] - await asyncio.sleep(60) - await bot.delete_msg(message_id=message_id) - - except Exception: - pass - - _ag_l = ["涩图来", "来点涩图", "来份涩图"] _ag_patt = r"来[张点丶份](.*?)的[涩色🐍]图" diff --git a/ATRI/plugins/setu/data_source.py b/ATRI/plugins/setu/data_source.py index b7c5162..e7d769d 100644 --- a/ATRI/plugins/setu/data_source.py +++ b/ATRI/plugins/setu/data_source.py @@ -1,5 +1,4 @@ import asyncio -from random import choice from nonebot.adapters.onebot.v11 import Bot, MessageSegment from ATRI.service import Service @@ -78,30 +77,6 @@ class Setu(Service): data = await detect_image(url, file_size) return data - @classmethod - async def scheduler(cls) -> str: - """ - 每隔指定时间随机抽取一个群发送涩图. - 格式: - 是{tag}哦~❤ - {setu} - """ - res = await request.get(LOLICON_URL) - data: dict = res.json() - temp_data: dict = data.get("data", list()) - if not temp_data: - return "" - - tag = choice(temp_data.get("tags", ["女孩子"])) - - url = temp_data[0]["urls"].get( - "original", - cls._use_proxy(DEFAULT_SETU), - ) - setu = MessageSegment.image(url, timeout=114514) - repo = f"是{tag}哦~❤\n{setu}" - return repo - @staticmethod async def async_recall(bot: Bot, event_id): await asyncio.sleep(30) |