🐛 ysb绑定无反应

This commit is contained in:
CMHopeSunshine 2022-08-27 10:39:37 +08:00
parent 799540f7f3
commit 7140f2eced
3 changed files with 4 additions and 1 deletions

View File

@ -43,6 +43,7 @@ class Config(BaseModel):
sim_gacha_cd_group: int = Field(30, alias='模拟抽卡群冷却') sim_gacha_cd_group: int = Field(30, alias='模拟抽卡群冷却')
sim_gacha_cd_member: int = Field(60, alias='模拟抽卡群冷却') sim_gacha_cd_member: int = Field(60, alias='模拟抽卡群冷却')
sim_gacha_max: int = Field(5, alias='模拟抽卡单次最多十连数')
auto_myb_enable: bool = Field(True, alias='米游币自动获取开关') auto_myb_enable: bool = Field(True, alias='米游币自动获取开关')
auto_myb_hour: int = Field(8, alias='米游币开始执行时间(小时)') auto_myb_hour: int = Field(8, alias='米游币开始执行时间(小时)')

View File

@ -76,7 +76,7 @@ async def _(event: MessageEvent, msg: Message = CommandArg()):
if not msg: if not msg:
await ysb.finish(f'成功绑定uid为{uid.group()}如果还需绑定cookie可看教程\ndocs.qq.com/doc/DQ3JLWk1vQVllZ2Z1', await ysb.finish(f'成功绑定uid为{uid.group()}如果还需绑定cookie可看教程\ndocs.qq.com/doc/DQ3JLWk1vQVllZ2Z1',
at_sender=True) at_sender=True)
elif msg: if msg:
if data := await get_bind_game_info(msg): if data := await get_bind_game_info(msg):
game_name = data['nickname'] game_name = data['nickname']
game_uid = data['game_role_id'] game_uid = data['game_role_id']

View File

@ -74,6 +74,8 @@ async def _(event: MessageEvent, reGroup: Dict = RegexDict()):
num = reGroup['num'] num = reGroup['num']
pool = reGroup['pool'] pool = reGroup['pool']
num = int(num) if num and num.isdigit() else 1 num = int(num) if num and num.isdigit() else 1
if num > pm.config.sim_gacha_max:
await sim_gacha.finish(f'单次最多只能{pm.config.sim_gacha_max}十连哦!')
pool = pool or '角色1' pool = pool or '角色1'
result = await draw_gacha_img(event.user_id, pool, num, nickname) result = await draw_gacha_img(event.user_id, pool, num, nickname)
if isinstance(event, GroupMessageEvent): if isinstance(event, GroupMessageEvent):