This commit is contained in:
parent
703feb8ca3
commit
9759eb7bf4
@ -59,7 +59,7 @@ async def pixivprev(interaction: discord.Interaction, url: str):
|
|||||||
loop = asyncio.get_running_loop()
|
loop = asyncio.get_running_loop()
|
||||||
data = await loop.run_in_executor(
|
data = await loop.run_in_executor(
|
||||||
None,
|
None,
|
||||||
pixiv_api.dowload_pixiv_images,
|
pixiv_api.download_pixiv_images,
|
||||||
int(match.group("id")),
|
int(match.group("id")),
|
||||||
tmp_dir,
|
tmp_dir,
|
||||||
REFRESH_TOKEN,
|
REFRESH_TOKEN,
|
||||||
@ -95,7 +95,7 @@ async def pixiv_preview(interaction: discord.Interaction, message: discord.Messa
|
|||||||
loop = asyncio.get_running_loop()
|
loop = asyncio.get_running_loop()
|
||||||
data = await loop.run_in_executor(
|
data = await loop.run_in_executor(
|
||||||
None,
|
None,
|
||||||
pixiv_api.dowload_pixiv_images,
|
pixiv_api.download_pixiv_images,
|
||||||
int(match.group("id")),
|
int(match.group("id")),
|
||||||
tmp_dir,
|
tmp_dir,
|
||||||
REFRESH_TOKEN,
|
REFRESH_TOKEN,
|
||||||
@ -116,7 +116,7 @@ async def pixiv_preview(interaction: discord.Interaction, message: discord.Messa
|
|||||||
title=title,
|
title=title,
|
||||||
art_author=author,
|
art_author=author,
|
||||||
url=match.group("url"),
|
url=match.group("url"),
|
||||||
author=interaction.user,
|
author=message.author,
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
await interaction.response.send_message(
|
await interaction.response.send_message(
|
||||||
@ -140,7 +140,7 @@ async def on_message(message: discord.Message):
|
|||||||
loop = asyncio.get_running_loop()
|
loop = asyncio.get_running_loop()
|
||||||
data = await loop.run_in_executor(
|
data = await loop.run_in_executor(
|
||||||
None,
|
None,
|
||||||
pixiv_api.dowload_pixiv_images,
|
pixiv_api.download_pixiv_images,
|
||||||
int(match.group("id")),
|
int(match.group("id")),
|
||||||
tmp_dir,
|
tmp_dir,
|
||||||
REFRESH_TOKEN,
|
REFRESH_TOKEN,
|
||||||
|
@ -13,7 +13,7 @@ if max_thread_num > 10:
|
|||||||
max_thread_num = 10
|
max_thread_num = 10
|
||||||
|
|
||||||
|
|
||||||
def dowload_pixiv_images(
|
def download_pixiv_images(
|
||||||
illust_id: int,
|
illust_id: int,
|
||||||
dest_folder: str,
|
dest_folder: str,
|
||||||
refresh_token: str,
|
refresh_token: str,
|
||||||
|
Loading…
Reference in New Issue
Block a user