Zhamao Framework  3.0.0-beta1
A high-performance chatbot + web framework
BotContext类 参考
类 BotContext 继承关系图:
[图例]
BotContext 的协作图:
[图例]

Public 成员函数

 __construct (string $bot_id, string $platform)
 
 getEvent ()
 
 hasReplied ()
 
 getBot (string $bot_id, string $platform='')
 
 sendMessage (\Stringable|array|MessageSegment|string $message, string $detail_type, array $params=[])
 
 getEchoAction (mixed $echo)
 

构造及析构函数说明

◆ __construct()

__construct ( string  $bot_id,
string  $platform 
)

成员函数说明

◆ getBot()

getBot ( string  $bot_id,
string  $platform = '' 
)

获取其他机器人的上下文操作对象

参数
string$bot_id机器人的 self.user_id 对应的 ID
string$platform机器人的 self.platform 对应的 platform
返回
$this

◆ getEchoAction()

getEchoAction ( mixed  $echo)

◆ getEvent()

getEvent ( )
函数调用图:

◆ hasReplied()

hasReplied ( )

返回是否已经调用过回复了

◆ sendMessage()

sendMessage ( \Stringable|array|MessageSegment|string  $message,
string  $detail_type,
array  $params = [] 
)
异常
函数调用图:

该类的文档由以下文件生成: