mirror of
https://github.com/xuthus83/LittlePaimon.git
synced 2024-10-21 16:27:15 +08:00
🐛 修复错字,原神猜语音
增加自定义时间配置项
This commit is contained in:
parent
4d2a333cdf
commit
efcdeb9633
@ -71,3 +71,5 @@ class Config(BaseModel):
|
||||
notice_event: bool = Field(True, alias='启用好友和群欢迎消息')
|
||||
|
||||
screenshot_enable: bool = Field(True, alias='启用网页截图权限')
|
||||
|
||||
guess_voice_time: int = Field(30, alias='原神猜语音时间')
|
||||
|
@ -11,6 +11,7 @@ from nonebot.plugin import PluginMetadata
|
||||
from LittlePaimon.utils.message import CommandCharacter, CommandLang, MessageBuild
|
||||
from LittlePaimon.utils.alias import get_match_alias
|
||||
from LittlePaimon.database.models import GenshinVoice
|
||||
from LittlePaimon.manager.plugin_manager import plugin_manager as pm
|
||||
from .handler import GuessVoice, get_character_voice, get_rank, get_voice_list
|
||||
from .resources import update_voice_resources
|
||||
|
||||
@ -59,7 +60,7 @@ async def _(event: GroupMessageEvent, msg: Message = CommandArg(), lang=CommandL
|
||||
result = await get_rank(event.group_id)
|
||||
await guess_voice.finish(result)
|
||||
else:
|
||||
game = GuessVoice(event.group_id, 30, lang)
|
||||
game = GuessVoice(event.group_id, pm.config.guess_voice_time, lang)
|
||||
result = await game.start()
|
||||
await guess_voice.send('即将发送一段语音,将在30秒后公布答案')
|
||||
try:
|
||||
|
@ -95,11 +95,11 @@ def get_chara_icon(name: Optional[str] = None, chara_id: Optional[int] = None,
|
||||
if info := info_file.get(str(chara_id)):
|
||||
side_icon = info['SideIconName']
|
||||
elif chara_id == '10000070':
|
||||
side_icon = 'UI_AvatarIcon_Side_Nilou.png'
|
||||
side_icon = 'UI_AvatarIcon_Side_Nilou'
|
||||
elif chara_id == '10000071':
|
||||
side_icon = 'UI_AvatarIcon_Side_Cyno.png'
|
||||
side_icon = 'UI_AvatarIcon_Side_Cyno'
|
||||
elif chara_id == '10000072':
|
||||
side_icon = 'UI_AvatarIcon_Side_Candace.png'
|
||||
side_icon = 'UI_AvatarIcon_Side_Candace'
|
||||
else:
|
||||
return None
|
||||
if icon_type == 'side':
|
||||
|
Loading…
Reference in New Issue
Block a user