mirror of
https://github.com/solero/houdini.git
synced 2024-11-13 22:28:21 +00:00
Tidy report handler
This commit is contained in:
parent
a05f22d2b3
commit
68d4bbd6b3
@ -62,8 +62,8 @@ async def handle_report(p, penguin_id: int, *reason):
|
|||||||
reason = int(reason[0]) if reason else 0
|
reason = int(reason[0]) if reason else 0
|
||||||
date_now = datetime.datetime.now()
|
date_now = datetime.datetime.now()
|
||||||
server_id = p.server.server_config['Id']
|
server_id = p.server.server_config['Id']
|
||||||
print(server_id)
|
await Report.create(penguin_id=penguin_id, reporter_id=p.data.id, report_type=reason,
|
||||||
await Report.create(penguin_id=penguin_id, reporter_id=p.data.id, report_type=reason, date=date_now, server_id=server_id, room_id=p.room.id)
|
date=date_now, server_id=server_id, room_id=p.room.id)
|
||||||
|
|
||||||
|
|
||||||
@handlers.handler(XTPacket('o', 'moderatormessage'))
|
@handlers.handler(XTPacket('o', 'moderatormessage'))
|
||||||
|
Loading…
Reference in New Issue
Block a user