diff --git a/README.md b/README.md index 7415bd3..bc78268 100644 --- a/README.md +++ b/README.md @@ -178,20 +178,23 @@ json结构(默认值):

更新日志

-- v0.4.5 +- v0.4.8 - - 🐛 修复依赖缺失的错误 + - ✨ 使用UTC-8显示时间 +- v0.4.6 + + - 🐛 修复依赖顺序加载错误 +- v0.4.5 + - 🐛 修复依赖缺失的错误 - v0.4.3 - ✨ 优化入退群消息 - ✨ 优化了烦人的每天插件更新播报(仅在每次启动 bot 时自动发送) - - v0.4.2 - 🐛 修复 nickname 未格式化 - - v0.4.1 - 🐛 修复配置文件读取错误 @@ -199,7 +202,6 @@ json结构(默认值): - 🐛 修复配置文件读取错误 - 🐛 修复版本号读取错误 - - v0.4.0 - ✨ 使用 Localstore 管理插件数据 @@ -207,7 +209,6 @@ json结构(默认值): - ✨ 重构代码,增加可读性便于维护 - 💥 弃用插件指令自动更新(仅可手动更新) - - v0.3.2 - ✨ 新增插件定时任务 - ✨ 新增消息文字转图片 @@ -217,17 +218,14 @@ json结构(默认值): - ✨ 新增插件自动更新 - 🐛 修复红包运气王无法检测 bug - 🐛 修复自动更新时意外报错 bug - - v0.2.1 - ✨ 适配插件元数据 - 🐛 修复 bug - - v0.2.0 - 🐛 修复 bot 加群 bug[issue6](https://github.com/Reversedeer/nonebot_plugin_eventmonitor/issues/18) - ♻️ 优化提示 - - v0.1.9 - ✨ 新增功能开关指令:event 状态/event 配置 - 🐛 修复群文件不能检测 bug(少写一个字母 qwq) @@ -237,36 +235,29 @@ json结构(默认值): - ✨ 新增所有功能开关[#issue5](https://github.com/Reversedeer/nonebot_plugin_eventmonitor/issues/9) - ✨ 新增权限控制 - 🐛 修复潜在的 bug - - v0.1.6 - 🐛 修复 bug - - v0.1.5 - 🐛 修复获取 superusers 数值 bug - ♻️ 优化配置文件 [#issue4](https://github.com/Reversedeer/nonebot_plugin_eventmonitor/issues/6) - 💥 删除冗余代码 - - v0.1.3 - 🐛 修复配置文件 bug - - v0.1.2 - ✨ 增加戳一戳的文案 - 🐛 修复 bug - - v0.1.1 - 🐛 修复 bug - - v0.1.0 - ✨ 新增戳一戳加了 cd(本人觉得功能鸡肋) - 🐛 修复管理员变动时 API 报错问题[#issue1](https://github.com/Reversedeer/nonebot_plugin_eventmonitor/issues/1) - ♻️ 优化原有的配置模式 - - v0.0.6 - 🐛 修复了大量的 bug diff --git a/nonebot_plugin_eventmonitor/__init__.py b/nonebot_plugin_eventmonitor/__init__.py index 4d98c30..ea3d4a8 100644 --- a/nonebot_plugin_eventmonitor/__init__.py +++ b/nonebot_plugin_eventmonitor/__init__.py @@ -125,7 +125,7 @@ async def _() -> None: supported_adapters={'~onebot.v11'}, extra={ 'author': 'Reversedeer', - 'version': '0.4.7', + 'version': '0.4.8', 'priority': 50, 'email': 'ysjvillmark@gmail.com', }, diff --git a/nonebot_plugin_eventmonitor/config.py b/nonebot_plugin_eventmonitor/config.py index a28891e..934b358 100644 --- a/nonebot_plugin_eventmonitor/config.py +++ b/nonebot_plugin_eventmonitor/config.py @@ -57,7 +57,7 @@ def __init__(self) -> None: } self.g_temp = {} self.chuo_CD_dir = {} - self.current_version = 'v0.4.7' + self.current_version = 'v0.4.8' self.config_path: Path = store.get_plugin_config_dir() self.data_address: Path = self.config_path / 'config.json' self.release_url = 'https://api.github.com/repos/Reversedeer/nonebot_plugin_eventmonitor/releases/latest' diff --git a/nonebot_plugin_eventmonitor/handle.py b/nonebot_plugin_eventmonitor/handle.py index 0283073..a439a63 100644 --- a/nonebot_plugin_eventmonitor/handle.py +++ b/nonebot_plugin_eventmonitor/handle.py @@ -1,7 +1,6 @@ """事件处理""" import json -from typing import NoReturn import asyncio from httpx import AsyncClient, ConnectError, RequestError, HTTPStatusError @@ -181,7 +180,7 @@ async def switch( else: await matcher.finish(f'{name}功能已关闭喵') - async def usage(self, matcher: Matcher) -> NoReturn: + async def usage(self, matcher: Matcher) -> None: """获取指令帮助""" if await utils.check_txt_to_img(config_data.event_check_txt_img): await matcher.send(MessageSegment.image(await txt_to_img.txt_to_img(utils.usage))) diff --git a/nonebot_plugin_eventmonitor/matcher.py b/nonebot_plugin_eventmonitor/matcher.py index c52aa0e..c5d41e6 100644 --- a/nonebot_plugin_eventmonitor/matcher.py +++ b/nonebot_plugin_eventmonitor/matcher.py @@ -2,7 +2,7 @@ from typing import Literal import secrets -from datetime import datetime, timezone +from datetime import datetime, timezone, timedelta from nonebot.adapters.onebot.v11 import MessageSegment from nonebot.adapters.onebot.v11.message import Message @@ -30,7 +30,7 @@ async def admin_changer(self, sub_type: str, user_id: int, bot_qq: int) -> str: async def del_user_bye(self, del_time: int, user_id: int, nickname: str) -> str | Message: """发送退群消息""" - del_datatime = datetime.fromtimestamp(del_time, tz=timezone.utc) + del_datatime = datetime.fromtimestamp(del_time, tz=timezone(timedelta(hours=8))) # 检查用户ID是否在超级用户列表superusers中 if user_id in config_data.superusers: # 如果是超级用户,生成特定的离开消息 @@ -49,7 +49,7 @@ async def add_user_wecome( ) -> Literal['本喵被邀进入贵群喵~\n火速上个管理喵~', '✨ 成员变动 ✨\n欢迎主人进群喵~'] | Message: """发送入群消息""" # 将时间戳转换为datetime类型的时间add_time - add_datetime = datetime.fromtimestamp(add_time, tz=timezone.utc) + add_datetime = datetime.fromtimestamp(add_time, tz=timezone(timedelta(hours=8))) # 判断用户ID是否等于机器人的QQ号 if user_id == bot_qq: # 如果是机器人自己加入群组,生成特定的欢迎消息 diff --git a/pyproject.toml b/pyproject.toml index 47f5800..0285b1d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "nonebot-plugin-eventmonitor" -version = "0.4.7" +version = "0.4.8" description = "监控群事件的插件 For Nonebot2" authors = [{ name = "Reversedeer", email = "ysjvillmark@gmail.com" }] readme = "README.md"