Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 7 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,36 +178,37 @@ json结构(默认值):
<details>
<summary><h2>更新日志</h2></summary>

- 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

- 🐛 修复配置文件读取错误
- 🐛 修复版本号读取错误

- 🐛 修复配置文件读取错误
- 🐛 修复版本号读取错误

- v0.4.0

- ✨ 使用 Localstore 管理插件数据

- ✨ 重构代码,增加可读性便于维护

- 💥 弃用插件指令自动更新(仅可手动更新)

- v0.3.2
- ✨ 新增插件定时任务
- ✨ 新增消息文字转图片
Expand All @@ -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)
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion nonebot_plugin_eventmonitor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
},
Expand Down
2 changes: 1 addition & 1 deletion nonebot_plugin_eventmonitor/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
3 changes: 1 addition & 2 deletions nonebot_plugin_eventmonitor/handle.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"""事件处理"""

import json
from typing import NoReturn
import asyncio

from httpx import AsyncClient, ConnectError, RequestError, HTTPStatusError
Expand Down Expand Up @@ -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)))
Expand Down
6 changes: 3 additions & 3 deletions nonebot_plugin_eventmonitor/matcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
# 如果是超级用户,生成特定的离开消息
Expand All @@ -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:
# 如果是机器人自己加入群组,生成特定的欢迎消息
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
Loading