Skip to content

Commit

Permalink
Merge pull request #301 from NekoAria/2.0
Browse files Browse the repository at this point in the history
🐛 修正添加订阅时如果已经存在同名订阅时的逻辑
  • Loading branch information
NekoAria authored May 17, 2022
2 parents 2695652 + 50801aa commit 8b81299
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
ENVIRONMENT=prod
VERSION='v2.6.1'
VERSION='v2.6.2'
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "ELF_RSS"
version = "2.6.1"
version = "2.6.2"
description = "QQ机器人 RSS订阅 插件,订阅源建议选择 RSSHub"
authors = ["Quan666 <[email protected]>"]
license = "GPL-3.0-only"
Expand All @@ -14,6 +14,7 @@ keywords = ["nonebot", "nonebot2", "rss" ,"elf" ,"rsshub"]

[tool.poetry.dependencies]
python = "^3.8.3"
aerich = "^0.6.3"
aiohttp = "^3.8.1"
arrow = "^1.2.0"
bbcode = "^1.1.0"
Expand All @@ -31,8 +32,8 @@ pydantic = "^1.9.0"
pyquery = "^1.4.3"
python-qbittorrent = "^0.4.2"
tenacity = "^7.0.0"
tinydb = "^4.7.0"
typing-extensions = "^3.10.0.2"
tortoise-orm = {extras = ["accel"], version = "^0.19.0"}
yarl = "^1.7.2"

[tool.poetry.dev-dependencies]
Expand Down
5 changes: 5 additions & 0 deletions src/plugins/ELF_RSS2/command/add_dy.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ async def handle_rss_add(
await RSS_ADD.reject(prompt)
return

if _ := Rss.get_one_by_name(name):
await RSS_ADD.send(f"已存在订阅名为 {name} 的订阅")
await RSS_ADD.reject(prompt)
return

user_id = event.get_user_id()
group_id = None
guild_channel_id = None
Expand Down

0 comments on commit 8b81299

Please sign in to comment.