Skip to content

Commit

Permalink
Merge pull request #212 from Ljzd-PRO/dev
Browse files Browse the repository at this point in the history
更新至 v1.4.0
  • Loading branch information
Ljzd-PRO authored Nov 12, 2023
2 parents e0ae4aa + 450d41c commit 3c1f515
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 21 deletions.
17 changes: 13 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,25 @@
# mysTool - 米游社辅助工具插件

## 📣 更新内容
### 2023.11.13 - v1.4.0
- 跟进QQ频道适配器的变更,已更换停止维护的 `nonebot-adapter-qqguild` 适配器为 `nonebot-adapter-qq`

> **Warning**
> 对于之前使用QQ频道适配器的机器人项目,进行本次更新的同时,还需要修改之前的QQ频道适配器配置 \
> 大致只需要修改**配置选项名**即可,可参考适配器的说明:
> https://github.com/nonebot/adapter-qq \
> 例如:`QQGUILD_BOTS` -> `QQ_BOTS`
> 在QQ频道适配器**变更之前安装的**用户仍可正常使用 \
> 但现在 nonebot 各类文档指向的适配器都是新的 `nonebot-adapter-qq`,因此现在按照文档指引,如果安装本插件之前的版本,将无法正常支持QQ频道

### 2023.11.3 - v1.3.5
- 修复兑换计划商品不存在导致插件启动失败的问题 #205 #206
- 支持自定义时区 #201
> [插件偏好设置 - timezone](https://github.com/Ljzd-PRO/nonebot-plugin-mystool/wiki/Configuration-Preference#timezone)
> 默认为上海时区 `Asia/Shanghai`
### 2023.9.23 - v1.3.4
- 修复人机验证 gt 和 challenge 固定不变的问题 #196 by @Sakamakiiizayoi
- 修复插件数据文件中 `geetest_json` 被改变的问题

### 2023.8.30 - v1.3.1
- 登录功能增加黑名单/白名单功能 #178
> [插件偏好设置 - enable_blacklist](https://github.com/Ljzd-PRO/nonebot-plugin-mystool/wiki/Configuration-Preference#enable_blacklist)
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "nonebot-plugin-mystool"
version = "v1.3.5"
version = "v1.4.0"
description = "QQ聊天、频道机器人插件 | 米游社工具-每日米游币任务、游戏签到、商品兑换、免抓包登录、原神崩铁便笺提醒"
license = "MIT"
authors = [
Expand All @@ -11,7 +11,7 @@ readme = "README.md"
homepage = "https://github.com/Ljzd-PRO/nonebot-plugin-mystool"
repository = "https://github.com/Ljzd-PRO/nonebot-plugin-mystool"
documentation = "https://github.com/Ljzd-PRO/nonebot-plugin-mystool/wiki"
keywords = ["bot", "qq", "qqbot", "onebotv11", "onebot", "nonebot2", "nonebot", "mihoyo", "mihoyobbs", "qqguild", "star-rail", "genshin-impact"]
keywords = ["bot", "qq", "qqbot", "onebotv11", "onebot", "nonebot2", "nonebot", "mihoyo", "mihoyobbs", "qq-guild", "star-rail", "genshin-impact"]
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
Expand All @@ -30,7 +30,7 @@ ntplib = "^0.4.0"
Pillow = ">=9.5,<11.0"
requests = "^2.31.0"
nonebot_adapter_onebot = "^2.2.4"
nonebot-adapter-qqguild = ">=0.2.4,<0.5.0"
nonebot-adapter-qq = "^1.0.1"
tenacity = "^8.2.3"
qrcode = "^7.4.2"
pydantic = "^1.10.0"
Expand Down
2 changes: 1 addition & 1 deletion src/nonebot_plugin_mystool/exchange.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from apscheduler.events import JobExecutionEvent, EVENT_JOB_EXECUTED
from nonebot import on_command, get_driver
from nonebot.adapters.onebot.v11 import MessageEvent as OneBotV11MessageEvent, MessageSegment as OneBotV11MessageSegment
from nonebot.adapters.qqguild import MessageEvent as QQGuildMessageEvent, MessageSegment as QQGuildMessageSegment
from nonebot.adapters.qq import MessageEvent as QQGuildMessageEvent, MessageSegment as QQGuildMessageSegment
from nonebot.internal.params import ArgStr
from nonebot.matcher import Matcher
from nonebot.params import ArgPlainText, T_State, CommandArg, Command
Expand Down
2 changes: 1 addition & 1 deletion src/nonebot_plugin_mystool/help.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from typing import Union

from nonebot import on_command
from nonebot.adapters.qqguild.exception import ActionFailed as QQGuildActionFailed
from nonebot.adapters.qq.exception import ActionFailed as QQGuildActionFailed
from nonebot.internal.params import ArgStr
from nonebot.matcher import Matcher
from nonebot.params import CommandArg
Expand Down
4 changes: 2 additions & 2 deletions src/nonebot_plugin_mystool/login.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
from typing import Union

from nonebot import on_command
from nonebot.adapters.qqguild import MessageSegment as QQGuildMessageSegment, DirectMessageCreateEvent
from nonebot.adapters.qqguild.exception import AuditException
from nonebot.adapters.qq import MessageSegment as QQGuildMessageSegment, DirectMessageCreateEvent
from nonebot.adapters.qq.exception import AuditException
from nonebot.exception import ActionFailed
from nonebot.internal.matcher import Matcher
from nonebot.internal.params import ArgStr
Expand Down
4 changes: 2 additions & 2 deletions src/nonebot_plugin_mystool/plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
from nonebot import on_command, get_adapters
from nonebot.adapters.onebot.v11 import MessageSegment as OneBotV11MessageSegment, Adapter as OneBotV11Adapter, \
MessageEvent as OneBotV11MessageEvent
from nonebot.adapters.qqguild import MessageSegment as QQGuildMessageSegment, Adapter as QQGuildAdapter, \
from nonebot.adapters.qq import MessageSegment as QQGuildMessageSegment, Adapter as QQGuildAdapter, \
MessageEvent as QQGuildMessageEvent
from nonebot.adapters.qqguild.exception import AuditException
from nonebot.adapters.qq.exception import AuditException
from nonebot.exception import ActionFailed
from nonebot.internal.matcher import Matcher
from nonebot_plugin_apscheduler import scheduler
Expand Down
2 changes: 1 addition & 1 deletion src/nonebot_plugin_mystool/plugin_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from . import user_data
from .user_data import UserData, UserAccount

VERSION = "v1.3.4"
VERSION = "v1.4.0"
"""程序当前版本"""

ROOT_PATH = Path(__name__).parent.absolute()
Expand Down
6 changes: 3 additions & 3 deletions src/nonebot_plugin_mystool/user_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

from nonebot import get_driver, on_request, on_command, Bot
from nonebot.adapters.onebot.v11 import FriendRequestEvent, GroupRequestEvent, RequestEvent, Bot as OneBotV11Bot
from nonebot.adapters.qqguild import Bot as QQGuildBot, DirectMessageCreateEvent, MessageCreateEvent
from nonebot.adapters.qqguild.exception import ActionFailed as QQGuildActionFailed, AuditException
from nonebot.adapters.qq import Bot as QQGuildBot, DirectMessageCreateEvent, MessageCreateEvent
from nonebot.adapters.qq.exception import ActionFailed as QQGuildActionFailed, AuditException
from nonebot.internal.matcher import Matcher
from nonebot.params import CommandArg, Command

Expand All @@ -22,7 +22,7 @@


@_driver.on_bot_connect
def check_qqguild_config(bot: QQGuildBot):
def check_qq_config(bot: QQGuildBot):
"""
检查QQGuild适配器是否开启了私信功能 Intents.direct_message
Expand Down
7 changes: 4 additions & 3 deletions src/nonebot_plugin_mystool/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@
from nonebot.adapters import Message
from nonebot.adapters.onebot.v11 import MessageEvent as OneBotV11MessageEvent, PrivateMessageEvent, GroupMessageEvent, \
Adapter as OneBotV11Adapter, Bot as OneBotV11Bot, ActionFailed as OneBotV11ActionFailed
from nonebot.adapters.qqguild import DirectMessageCreateEvent, MessageCreateEvent, \
from nonebot.adapters.qq import DirectMessageCreateEvent, MessageCreateEvent, \
Adapter as QQGuildAdapter, Bot as QQGuildBot, MessageSegment as QQGuildMessageSegment, Message as QQGuildMessage
from nonebot.adapters.qqguild.api import DMS
from nonebot.adapters.qqguild.exception import ActionFailed as QQGuildActionFailed, AuditException

from nonebot.adapters.qq.exception import ActionFailed as QQGuildActionFailed, AuditException
from nonebot.adapters.qq.models import DMS
from nonebot.exception import ActionFailed
from nonebot.internal.matcher import Matcher
from nonebot.log import logger
Expand Down
2 changes: 1 addition & 1 deletion test-nonebot-project/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ requires-python = ">=3.8, <4.0"
[tool.nonebot]
adapters = [
{ name = "OneBotV11", module_name = "nonebot.adapters.onebot.v11" },
{ name = "QQGuild", module_name = "nonebot.adapters.qqguild" }
{ name = "QQGuild", module_name = "nonebot.adapters.qq" }
]
plugins = ["nonebot_plugin_mystool"]
plugin_dirs = []
Expand Down

0 comments on commit 3c1f515

Please sign in to comment.