mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-01-31 23:51:28 +08:00
🔊 add desc and name of NoticeEvent
This commit is contained in:
parent
ca09fb8372
commit
09d9f414ce
@ -225,11 +225,11 @@ class NoticeEvent(Event):
|
|||||||
|
|
||||||
@overrides(Event)
|
@overrides(Event)
|
||||||
def get_event_name(self) -> str:
|
def get_event_name(self) -> str:
|
||||||
raise ValueError("Event has no name!")
|
return self.header.event_type
|
||||||
|
|
||||||
@overrides(Event)
|
@overrides(Event)
|
||||||
def get_event_description(self) -> str:
|
def get_event_description(self) -> str:
|
||||||
raise ValueError("Event has no description!")
|
return str(self.dict())
|
||||||
|
|
||||||
@overrides(Event)
|
@overrides(Event)
|
||||||
def get_message(self) -> Message:
|
def get_message(self) -> Message:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user