Improved unsupported message type alert
This commit is contained in:
parent
ffcb564d1a
commit
bbfb732f85
@ -560,9 +560,9 @@ class GoCQHttp(BaseClient):
|
||||
try:
|
||||
func = getattr(self.msg_decorator, 'qq_{}_wrapper'.format(msg_type))
|
||||
except AttributeError:
|
||||
self.deliver_alert_to_master(self._(f"Unsupported message type: {msg_type}"))
|
||||
self.logger.error(f"Unsupported message type: {msg_type}")
|
||||
return []
|
||||
msg = f"Unsupported message type: {msg_type}"
|
||||
self.logger.error(msg)
|
||||
return self.msg_decorator.qq_unsupported_wrapper(msg)
|
||||
else:
|
||||
return func(*args)
|
||||
|
||||
|
@ -271,3 +271,10 @@ class QQMsgProcessor:
|
||||
mime=mime
|
||||
)
|
||||
return [efb_msg]
|
||||
|
||||
def qq_unsupported_wrapper(self, data, chat: Chat = None):
|
||||
efb_msg = Message(
|
||||
type=MsgType.Unsupported,
|
||||
text=data
|
||||
)
|
||||
return [efb_msg]
|
||||
|
Loading…
Reference in New Issue
Block a user