🐛 Add avatar list to set command

This commit is contained in:
xtaodada 2024-07-06 18:24:20 +08:00
parent 159a4cb6b6
commit fc5656158a
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659
2 changed files with 3 additions and 1 deletions

View File

@ -26,6 +26,7 @@ class SetCommandPlugin(Plugin):
BotCommand("signal_log_import", "导入调频记录"), BotCommand("signal_log_import", "导入调频记录"),
BotCommand("signal_log_export", "导出调频记录"), BotCommand("signal_log_export", "导出调频记录"),
BotCommand("signal_log_delete", "删除调频记录"), BotCommand("signal_log_delete", "删除调频记录"),
BotCommand("avatars", "查询角色练度"),
BotCommand("agent_detail", "角色详细信息"), BotCommand("agent_detail", "角色详细信息"),
# Cookie 查询类 # Cookie 查询类
BotCommand("sign", "米游社绝区零每日签到"), BotCommand("sign", "米游社绝区零每日签到"),

View File

@ -15,6 +15,7 @@ from core.services.cookies import CookiesService
from core.services.template.models import FileType from core.services.template.models import FileType
from core.services.template.services import TemplateService from core.services.template.services import TemplateService
from core.services.wiki.services import WikiService from core.services.wiki.services import WikiService
from gram_core.config import config
from gram_core.plugin.methods.inline_use_data import IInlineUseData from gram_core.plugin.methods.inline_use_data import IInlineUseData
from gram_core.services.template.models import RenderGroupResult from gram_core.services.template.models import RenderGroupResult
from plugins.tools.genshin import GenshinHelper, CharacterDetails from plugins.tools.genshin import GenshinHelper, CharacterDetails
@ -210,7 +211,7 @@ class AvatarListPlugin(Plugin):
await message.reply_chat_action(ChatAction.TYPING) await message.reply_chat_action(ChatAction.TYPING)
async with self.helper.genshin(user_id, player_id=uid, offset=offset) as client: async with self.helper.genshin(user_id, player_id=uid, offset=offset) as client:
notice = await message.reply_text("彦卿需要收集整理数据,还请耐心等待哦~") notice = await message.reply_text(f"{config.notice.bot_name}需要收集整理数据,还请耐心等待哦~")
self.add_delete_message_job(notice, delay=60) self.add_delete_message_job(notice, delay=60)
images = await self.render(client, all_avatars) images = await self.render(client, all_avatars)