-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #325 from NekoAria/2.0
优化逻辑和样式,适配插件元数据 (#325)
- Loading branch information
Showing
21 changed files
with
139 additions
and
179 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "ELF_RSS" | ||
version = "2.6.3" | ||
version = "2.6.4" | ||
description = "QQ机器人 RSS订阅 插件,订阅源建议选择 RSSHub" | ||
authors = ["Quan666 <[email protected]>"] | ||
license = "GPL-3.0-only" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,24 @@ | ||
import asyncio | ||
|
||
import arrow | ||
import nonebot | ||
from nonebot import on_metaevent, require | ||
from nonebot.adapters.onebot.v11 import Event, LifecycleMetaEvent | ||
from nonebot.adapters.onebot.v11 import Bot, Event, LifecycleMetaEvent | ||
from nonebot.log import logger | ||
from nonebot.plugin import PluginMetadata | ||
|
||
from . import command | ||
from . import my_trigger as tr | ||
from .config import DATA_PATH, config | ||
from .rss_class import Rss | ||
|
||
VERSION = "2.6.4" | ||
__plugin_meta__ = PluginMetadata( | ||
name="ELF_RSS", | ||
description="QQ机器人 RSS订阅 插件,订阅源建议选择 RSSHub", | ||
usage="https://github.com/Quan666/ELF_RSS", | ||
extra={"author": "Quan666 <[email protected]>", "version": VERSION}, | ||
) | ||
|
||
scheduler = require("nonebot_plugin_apscheduler").scheduler | ||
START_TIME = arrow.now() | ||
|
||
|
@@ -26,17 +34,14 @@ async def check_first_connect(event: Event) -> bool: | |
|
||
# 启动时发送启动成功信息 | ||
@start_metaevent.handle() | ||
async def start() -> None: | ||
bot = nonebot.get_bot() | ||
async def start(bot: Bot) -> None: | ||
|
||
# 启动后检查 data 目录,不存在就创建 | ||
if not DATA_PATH.is_dir(): | ||
DATA_PATH.mkdir() | ||
|
||
boot_message = ( | ||
f"Version: {config.version}\n" | ||
"Author:Quan666\n" | ||
"https://github.com/Quan666/ELF_RSS" | ||
f"Version: v{VERSION}\nAuthor:Quan666\nhttps://github.com/Quan666/ELF_RSS" | ||
) | ||
|
||
rss_list = Rss.read_rss() # 读取list | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.