nonebot.adapters.onebot.v12.adapter
OneBot v12 ้้ ๅจใ
class Adapter(driver, **kwargs)
ๅๆฐ
driver
(Driver)**kwargs
(Any)
classmethod get_name()
ๅๆฐ
empty
่ฟๅ
- str
classmethod add_custom_model(*model, impl=None, platform=None)
ๅๆฐ
*model
(type[Event])impl
(str | None)platform
(str | None)
่ฟๅ
- None
classmethod get_event_model(data, impl=None)
่ฏดๆ: ๆ นๆฎไบไปถ่ทๅๅฏนๅบ
Event Model
ๅFallBack Event Model
ๅ่กจใๅๆฐ
data
(dict[str, Any])impl
(str | None)
่ฟๅ
- Generator[type[Event], None, None]
classmethod add_custom_exception(exc)
ๅๆฐ
exc
(type[ActionFailedWithRetcode])
่ฟๅ
- None
classmethod get_exception(retcode)
ๅๆฐ
retcode
(int)
่ฟๅ
- type[ActionFailedWithRetcode]
classmethod json_to_event(json_data, impl=None)
ๅๆฐ
json_data
(Any)impl
(str | None)
่ฟๅ
- Event | None
classmethod custom_send(send_func, impl=None, platform=None)
่ฏดๆ: ่ชๅฎไน Bot ็ๅๅคๅฝๆฐใ
ๅๆฐ
send_func
((Bot, Event, str | Message | MessageSegment) -> Any)impl
(str | None)platform
(str | None)
่ฟๅ
- None
classmethod get_send(impl=None, platform=None)
ๅๆฐ
impl
(str | None)platform
(str | None)
่ฟๅ
- (Bot, Event, str | Message | MessageSegment) -> Any