Skip to content

Commit

Permalink
通过pixiv_max_page_per_illust配置单张插画发送页数
Browse files Browse the repository at this point in the history
  • Loading branch information
ssttkkl committed Sep 15, 2024
1 parent 2260a30 commit 990a306
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/nonebot_plugin_pixivbot/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ def compression_validator(cls, v, values, field: ModelField):
pixiv_send_forward_message: Literal['always', 'auto', 'never'] = 'auto'

pixiv_max_item_per_query = 10
pixiv_max_page_per_illust = 10

pixiv_tag_translation_enabled = True

Expand Down
2 changes: 1 addition & 1 deletion src/nonebot_plugin_pixivbot/handler/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ async def post_illust(self, illust: Illust, *,
header: Optional[str] = None,
number: Optional[int] = None):
model = await IllustMessagesModel.from_illust(illust, header=header, number=number,
max_page=conf.pixiv_max_item_per_query,
max_page=conf.pixiv_max_page_per_illust,
block_r18=(not await self.is_r18_allowed()),
block_r18g=(not await self.is_r18g_allowed()))
if model:
Expand Down

0 comments on commit 990a306

Please sign in to comment.