修复非文本消息导致的报错
This commit is contained in:
parent
a3688bad16
commit
5edd7cd133
@ -110,6 +110,8 @@ class SioDecorator:
|
|||||||
self.cmds[f'/{cmd}'] = func
|
self.cmds[f'/{cmd}'] = func
|
||||||
|
|
||||||
async def route2cmd_and_run(self):
|
async def route2cmd_and_run(self):
|
||||||
|
if self._cmd == '':
|
||||||
|
return None
|
||||||
func = self.cmds.get(self._cmd[0])
|
func = self.cmds.get(self._cmd[0])
|
||||||
if func:
|
if func:
|
||||||
sender_id = self.data['message']['senderId']
|
sender_id = self.data['message']['senderId']
|
||||||
|
Loading…
Reference in New Issue
Block a user