Skip to content

Commit

Permalink
Update EntitlementCreate.php
Browse files Browse the repository at this point in the history
  • Loading branch information
key2peace authored Oct 22, 2023
1 parent 7f4e39e commit 1587873
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/Discord/WebSockets/Events/EntitlementCreate.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,6 @@ public function handle($data)
$entitlementPart = $this->factory->part(Entitlement::class, (array) $data, true);

$this->discord->application->entitlements->set($data->id, $entitlementPart);
$entitlementPart = $this->discord->application->entitlements->get('id', $data->id);

if (isset($data->guild_id) && $guild = $this->discord->guilds->get('id', $data->guild_id)) {
$guild->entitlements->set($data->id, $entitlementPart);
}

if (isset($data->user_id) && $user = $this->discord->users->get('id', $data->user_id)) {
$user->entitlements->set($data->id, $entitlementPart);
}

return $entitlementPart;
}
Expand Down

0 comments on commit 1587873

Please sign in to comment.