Skip to content

Commit

Permalink
add self field to EventBuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
peaksol-deprecated committed Nov 30, 2024
1 parent dcee7d2 commit 4867f15
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/OneBot/V12/EventBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ public function __construct(string $type, string $detail_type = '', string $sub_
$this->data['time'] = $time ?? time();
$this->data['detail_type'] = $detail_type;
$this->data['sub_type'] = $sub_type;
$this->data['self'] = [
'platform' => OneBot::getInstance()->getPlatform(),
'user_id' => OneBot::getInstance()->getSelfId(),
];
}

public function feed(string $key, $value): EventBuilder
Expand Down

0 comments on commit 4867f15

Please sign in to comment.