mirror of
				https://github.com/nonebot/nonebot2.git
				synced 2025-10-30 22:46:40 +00:00 
			
		
		
		
	🎉 init feishu adapter
This commit is contained in:
		| @@ -0,0 +1,26 @@ | ||||
| from typing import Union, Mapping, Iterable | ||||
| from nonebot.adapters import Message as BaseMessage, MessageSegment as BaseMessageSegment | ||||
|  | ||||
|  | ||||
| class MessageSegment(BaseMessageSegment): | ||||
|  | ||||
|     def __str__(self) -> str: | ||||
|         raise NotImplementedError | ||||
|  | ||||
|     def __add__(self, other) -> "Message": | ||||
|         return Message(self) + other | ||||
|  | ||||
|     def __radd__(self, other) -> "Message": | ||||
|         return Message(other) + self | ||||
|  | ||||
|     def is_text(self) -> bool: | ||||
|         raise NotImplementedError | ||||
|  | ||||
|  | ||||
| class Message(BaseMessage): | ||||
|  | ||||
|     @staticmethod | ||||
|     def _construct( | ||||
|         msg: Union[str, Mapping, | ||||
|                    Iterable[Mapping]]) -> Iterable[MessageSegment]: | ||||
|         raise NotImplementedError | ||||
		Reference in New Issue
	
	Block a user