新增了考试周100人品值

This commit is contained in:
SharwOrange橙夜 2024-01-09 19:19:35 +08:00
parent 51011ec401
commit 5dbd3aa87a

View File

@ -277,12 +277,21 @@ async def add_message(data: Dict[str, Any]):
await asyncio.sleep(random.random() * 2)
await sio.emit('sendMessage', message.to_json())
elif data['message']['content'] == '!!jrrp':
randomer = random.Random(f'{sender_id}-{data["message"]["date"]}-jrrp-v2')
result = randomer.randint(0, 50) + randomer.randint(0, 50)
print(f'{sender_name} 今日人品值为 {result}')
message = Message(content=f'{sender_name} 今日人品值为 {result}',
reply_to=reply,
room_id=room_id)
bool examSet = false
if examSet == true:
print('examSet参数被设定替换人品值')
message = Message(content=f'{sender_name} 今日人品值为 100\n为了让你安心备考加油考试今天你的人品值是100',
reply_to=reply,
room_id=room_id)
await asyncio.sleep(0.5)
await sio.emit('sendMessage', message.to_json())
else:
randomer = random.Random(f'{sender_id}-{data["message"]["date"]}-jrrp-v2')
result = randomer.randint(0, 50) + randomer.randint(0, 50)
print(f'{sender_name} 今日人品值为 {result}')
message = Message(content=f'{sender_name} 今日人品值为 {result}',
reply_to=reply,
room_id=room_id)
await asyncio.sleep(0.5)
await sio.emit('sendMessage', message.to_json())
# 如果只包括一个或多个 6