Fixed parameters in message handlers.

Originally this function took the third parameter as the message content in the parameter when really it was the penguin ID, but it should take the penguin id as the third parameter and the message as the fourth.
This commit is contained in:
rsakeys 2019-08-30 00:43:33 +04:00
parent e964f838d6
commit 9c83287ecb

View File

@ -24,7 +24,7 @@ class Example(IPlugin):
@handlers.handler(XTPacket('m', 'sm')) @handlers.handler(XTPacket('m', 'sm'))
@handlers.cooldown(1, callback=message_cooling) @handlers.cooldown(1, callback=message_cooling)
async def handle_send_message(self, p, message: str): async def handle_send_message(self, p, penguin_id: int, message: str):
print('Do stuff with {}'.format(message)) print('Do stuff with {}'.format(message))
@commands.command('ping') @commands.command('ping')