mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-07-16 19:11:00 +00:00
✅ Add test to prove the fix is valid
This commit is contained in:
@ -21,9 +21,9 @@ def make_fake_message() -> Type["Message"]:
|
||||
def text(cls, text: str):
|
||||
return cls("text", {"text": text})
|
||||
|
||||
@classmethod
|
||||
def image(cls, url: str):
|
||||
return cls("image", {"url": url})
|
||||
@staticmethod
|
||||
def image(url: str):
|
||||
return FakeMessageSegment("image", {"url": url})
|
||||
|
||||
def is_text(self) -> bool:
|
||||
return self.type == "text"
|
||||
|
Reference in New Issue
Block a user