mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-02-17 16:20:05 +08:00
🚑 fix message segment setitem
This commit is contained in:
parent
96ce29fd52
commit
1377f7337d
@ -285,6 +285,9 @@ class BaseMessageSegment(abc.ABC):
|
||||
def __getitem__(self, key):
|
||||
return getattr(self, key)
|
||||
|
||||
def __setitem__(self, key, value):
|
||||
return setattr(self, key, value)
|
||||
|
||||
@classmethod
|
||||
@abc.abstractmethod
|
||||
def text(cls, text: str) -> "BaseMessageSegment":
|
||||
|
Loading…
x
Reference in New Issue
Block a user