mirror of
https://github.com/solero/houdini.git
synced 2025-01-11 15:17:00 +00:00
Missing type of data defined that is received in the handlers
This commit is contained in:
parent
9c83287ecb
commit
82eacb42e7
@ -5,7 +5,7 @@ from houdini.commands import invoke_command_string, has_command_prefix
|
|||||||
|
|
||||||
@handlers.handler(XTPacket('m', 'sm'))
|
@handlers.handler(XTPacket('m', 'sm'))
|
||||||
@handlers.cooldown(.5)
|
@handlers.cooldown(.5)
|
||||||
async def handle_send_message(p, penguin_id: int, message):
|
async def handle_send_message(p, penguin_id: int, message: str):
|
||||||
if penguin_id != p.data.id:
|
if penguin_id != p.data.id:
|
||||||
return await p.close()
|
return await p.close()
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ def get_mascot_string_key(_, p, mascot_id):
|
|||||||
|
|
||||||
|
|
||||||
@cached(alias='default', key_builder=get_player_string_key)
|
@cached(alias='default', key_builder=get_player_string_key)
|
||||||
async def get_player_string(p, penguin_id):
|
async def get_player_string(p, penguin_id: int):
|
||||||
if penguin_id in p.server.penguins_by_id:
|
if penguin_id in p.server.penguins_by_id:
|
||||||
return await p.server.penguins_by_id[penguin_id].string
|
return await p.server.penguins_by_id[penguin_id].string
|
||||||
else:
|
else:
|
||||||
@ -26,7 +26,7 @@ async def get_player_string(p, penguin_id):
|
|||||||
|
|
||||||
|
|
||||||
@cached(alias='default', key_builder=get_mascot_string_key)
|
@cached(alias='default', key_builder=get_mascot_string_key)
|
||||||
async def get_mascot_string(p, mascot_id):
|
async def get_mascot_string(p, mascot_id: int):
|
||||||
if mascot_id in p.server.penguins_by_character_id:
|
if mascot_id in p.server.penguins_by_character_id:
|
||||||
return await p.server.penguins_by_character_id[mascot_id].string
|
return await p.server.penguins_by_character_id[mascot_id].string
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user