Skip to content

Commit

Permalink
Update Guild.php
Browse files Browse the repository at this point in the history
  • Loading branch information
key2peace authored Oct 22, 2023
1 parent 629e65f commit 79290e7
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/Discord/Parts/Guild/Guild.php
Original file line number Diff line number Diff line change
Expand Up @@ -1590,6 +1590,18 @@ public function setFeatures(array $features, ?string $reason = null): ExtendedPr
});
}

/**
* Returns the guilds entitlements for this application.
*
* @link https://discord.com/developers/docs/monetization/entitlements#list-entitlements
*
* @return Collection[]|Entitlement[]
*/
public function getMyApplicationEntitlement(): Collection
{
return $this->discord->application->entitlements->get('guild_id', $this->id);
}

/**
* {@inheritDoc}
*
Expand Down Expand Up @@ -1665,16 +1677,4 @@ public function createdTimestamp()
{
return \Discord\getSnowflakeTimestamp($this->id);
}

/**
* Returns the guilds entitlements for this application.
*
* @link https://discord.com/developers/docs/monetization/entitlements#list-entitlements
*
* @return ExtendedPromiseInterface<Collection|Invite[]>
*/
public function getMyApplicationEntitlement(): ExtendedPromiseInterface
{
return $this->discord->application->entitlements->get('guild_id', $this->id);
}
}

0 comments on commit 79290e7

Please sign in to comment.