nonebot-plugin-jmdownloader 1.0.0__tar.gz → 1.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (14) hide show
  1. {nonebot_plugin_jmdownloader-1.0.0 → nonebot_plugin_jmdownloader-1.0.1}/PKG-INFO +1 -1
  2. {nonebot_plugin_jmdownloader-1.0.0 → nonebot_plugin_jmdownloader-1.0.1}/nonebot_plugin_jmdownloader/__init__.py +16 -4
  3. {nonebot_plugin_jmdownloader-1.0.0 → nonebot_plugin_jmdownloader-1.0.1}/nonebot_plugin_jmdownloader.egg-info/PKG-INFO +1 -1
  4. {nonebot_plugin_jmdownloader-1.0.0 → nonebot_plugin_jmdownloader-1.0.1}/pyproject.toml +1 -1
  5. {nonebot_plugin_jmdownloader-1.0.0 → nonebot_plugin_jmdownloader-1.0.1}/LICENSE +0 -0
  6. {nonebot_plugin_jmdownloader-1.0.0 → nonebot_plugin_jmdownloader-1.0.1}/README.md +0 -0
  7. {nonebot_plugin_jmdownloader-1.0.0 → nonebot_plugin_jmdownloader-1.0.1}/nonebot_plugin_jmdownloader/config.py +0 -0
  8. {nonebot_plugin_jmdownloader-1.0.0 → nonebot_plugin_jmdownloader-1.0.1}/nonebot_plugin_jmdownloader/data_source.py +0 -0
  9. {nonebot_plugin_jmdownloader-1.0.0 → nonebot_plugin_jmdownloader-1.0.1}/nonebot_plugin_jmdownloader/utils.py +0 -0
  10. {nonebot_plugin_jmdownloader-1.0.0 → nonebot_plugin_jmdownloader-1.0.1}/nonebot_plugin_jmdownloader.egg-info/SOURCES.txt +0 -0
  11. {nonebot_plugin_jmdownloader-1.0.0 → nonebot_plugin_jmdownloader-1.0.1}/nonebot_plugin_jmdownloader.egg-info/dependency_links.txt +0 -0
  12. {nonebot_plugin_jmdownloader-1.0.0 → nonebot_plugin_jmdownloader-1.0.1}/nonebot_plugin_jmdownloader.egg-info/requires.txt +0 -0
  13. {nonebot_plugin_jmdownloader-1.0.0 → nonebot_plugin_jmdownloader-1.0.1}/nonebot_plugin_jmdownloader.egg-info/top_level.txt +0 -0
  14. {nonebot_plugin_jmdownloader-1.0.0 → nonebot_plugin_jmdownloader-1.0.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nonebot-plugin-jmdownloader
3
- Version: 1.0.0
3
+ Version: 1.0.1
4
4
  Summary: 基于 Nonebot2 的 JMComic 插件
5
5
  Author-email: Misty02600 <xiao02600@gmail.com>
6
6
  Project-URL: Repository, https://github.com/Misty02600/nonebot-plugin-jmdownloader
@@ -5,9 +5,10 @@ import random
5
5
  import shutil
6
6
  import time
7
7
 
8
+ from httpx import get
8
9
  from jmcomic import (JmcomicException, JmDownloader,
9
10
  MissingAlbumPhotoException, create_option_by_str)
10
- from nonebot import logger, on_command, require
11
+ from nonebot import logger, on_command, require, get_bot
11
12
  from nonebot.adapters.onebot.v11 import (GROUP_ADMIN, GROUP_OWNER,
12
13
  ActionFailed, Bot, GroupMessageEvent,
13
14
  Message, MessageEvent, MessageSegment,
@@ -52,6 +53,7 @@ except JmcomicException as e:
52
53
 
53
54
  results_per_page = plugin_config.jmcomic_results_per_page
54
55
 
56
+
55
57
  # region jm功能指令
56
58
  jm_download = on_command("jm下载", aliases={"JM下载"}, block=True, rule=check_group_and_user)
57
59
  @jm_download.handle()
@@ -180,7 +182,7 @@ async def _(bot: Bot, event: MessageEvent, arg: Message = CommandArg()):
180
182
  avatar = await blur_image_async(avatar)
181
183
  message += MessageSegment.image(avatar)
182
184
 
183
- message_node = MessageSegment("node", {"name": "jm查询结果", "content": message})
185
+ message_node = MessageSegment("node", {"name": "jm查询结果", "uin": bot.self_id, "content": message})
184
186
  messages = [message_node]
185
187
 
186
188
  try:
@@ -222,6 +224,7 @@ async def _(bot: Bot, event: MessageEvent, arg: Message = CommandArg()):
222
224
  if data_manager.has_restricted_tag(photo.tags):
223
225
  message_node = MessageSegment("node", {
224
226
  "name": "jm搜索结果",
227
+ "uin": bot.self_id,
225
228
  "content": blocked_message
226
229
  })
227
230
  else:
@@ -236,6 +239,7 @@ async def _(bot: Bot, event: MessageEvent, arg: Message = CommandArg()):
236
239
 
237
240
  message_node = MessageSegment("node", {
238
241
  "name": "jm搜索结果",
242
+ "uin": bot.self_id,
239
243
  "content": node_content
240
244
  })
241
245
  messages.append(message_node)
@@ -306,7 +310,11 @@ async def handle_jm_next_page(bot: Bot, event: MessageEvent):
306
310
  continue
307
311
 
308
312
  if data_manager.has_restricted_tag(photo.tags):
309
- message_node = MessageSegment("node", {"name": "jm搜索结果", "content": blocked_message})
313
+ message_node = MessageSegment("node", {
314
+ "name": "jm搜索结果",
315
+ "uin": bot.self_id,
316
+ "content": blocked_message
317
+ })
310
318
  else:
311
319
  node_content = Message()
312
320
  node_content += f"jm{photo.id} | {photo.title}\n"
@@ -317,7 +325,11 @@ async def handle_jm_next_page(bot: Bot, event: MessageEvent):
317
325
  avatar = await blur_image_async(avatar)
318
326
  node_content += MessageSegment.image(avatar)
319
327
 
320
- message_node = MessageSegment("node", {"name": "jm搜索结果", "content": node_content})
328
+ message_node = MessageSegment("node", {
329
+ "name": "jm搜索结果",
330
+ "uin": bot.self_id,
331
+ "content": node_content
332
+ })
321
333
  messages.append(message_node)
322
334
 
323
335
  try:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nonebot-plugin-jmdownloader
3
- Version: 1.0.0
3
+ Version: 1.0.1
4
4
  Summary: 基于 Nonebot2 的 JMComic 插件
5
5
  Author-email: Misty02600 <xiao02600@gmail.com>
6
6
  Project-URL: Repository, https://github.com/Misty02600/nonebot-plugin-jmdownloader
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "nonebot-plugin-jmdownloader"
3
- version = "1.0.0"
3
+ version = "1.0.1"
4
4
  description = "基于 Nonebot2 的 JMComic 插件"
5
5
  readme = "README.md"
6
6
  authors = [{ name = "Misty02600", email = "xiao02600@gmail.com" }]