mirror of
https://github.com/PaiGramTeam/PaiGram.git
synced 2024-11-22 07:07:46 +00:00
🐛 Fix challenge
is not stored in the cache
修复 challenge 变量没有存储到 redis 缓存问题
This commit is contained in:
parent
9ed30d4143
commit
80577042da
@ -74,16 +74,17 @@ class SignSystem:
|
||||
) -> Optional[InlineKeyboardMarkup]:
|
||||
if not config.pass_challenge_user_web:
|
||||
return None
|
||||
if challenge and gt:
|
||||
await self.set_challenge(uid, gt, challenge)
|
||||
if not challenge or not gt:
|
||||
gt, challenge = await self.get_challenge(uid)
|
||||
if not challenge or not gt:
|
||||
return None
|
||||
if callback:
|
||||
await self.set_challenge(uid, gt, challenge)
|
||||
data = f"sign|{user_id}|{uid}"
|
||||
return InlineKeyboardMarkup([[InlineKeyboardButton("请尽快点我进行手动验证", callback_data=data)]])
|
||||
else:
|
||||
url = f"{config.pass_challenge_user_web}?username={bot.app.bot.username}>={gt}&challenge={challenge}&uid={uid}"
|
||||
url = f"{config.pass_challenge_user_web}?username={bot.app.bot.username}&command=sign>={gt}&challenge={challenge}&uid={uid}"
|
||||
return InlineKeyboardMarkup([[InlineKeyboardButton("请尽快点我进行手动验证", url=url)]])
|
||||
|
||||
@staticmethod
|
||||
|
Loading…
Reference in New Issue
Block a user