Missing type of data defined that is received in the handlers

This commit is contained in:
rsakeys 2019-08-30 00:48:17 +04:00
parent 9c83287ecb
commit 82eacb42e7
2 changed files with 3 additions and 3 deletions

View File

@ -5,7 +5,7 @@ from houdini.commands import invoke_command_string, has_command_prefix
@handlers.handler(XTPacket('m', 'sm'))
@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:
return await p.close()

View File

@ -16,7 +16,7 @@ def get_mascot_string_key(_, p, mascot_id):
@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:
return await p.server.penguins_by_id[penguin_id].string
else:
@ -26,7 +26,7 @@ async def get_player_string(p, penguin_id):
@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:
return await p.server.penguins_by_character_id[mascot_id].string
else: