fix self property bug

This commit is contained in:
crazywhalecc
2023-03-05 14:39:04 +08:00
committed by Jerry
parent 23e12db915
commit f1adbf1ba6
2 changed files with 2 additions and 2 deletions

View File

@@ -25,7 +25,7 @@ class BotContext implements ContextInterface
private static array $bots = [];
/** @var null|string[] 记录当前上下文绑定的机器人 */
private array $self;
private ?array $self;
/** @var array 如果是 BotCommand 匹配的上下文,这里会存放匹配到的参数 */
private array $params = [];

View File

@@ -40,7 +40,7 @@ trait BotActionTrait
$message = MessageUtil::convertToArr($message);
$params['message'] = $message;
$params['detail_type'] = $detail_type;
return $this->sendAction(Utils::camelToSeparator(__FUNCTION__), $params, $this->getSelf());
return $this->sendAction(Utils::camelToSeparator(__FUNCTION__), $params, $this->self);
}
/**