Skip to content

Commit

Permalink
Construct override for Repository\EmojiRepository
Browse files Browse the repository at this point in the history
  • Loading branch information
valzargaming committed Sep 22, 2024
1 parent 8496dbb commit 12f91e9
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/Discord/Repository/EmojiRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

namespace Discord\Repository;

use Discord\Discord;
use Discord\Http\Endpoint;
use Discord\Parts\Guild\Emoji;
use Discord\Repository\AbstractRepository;
Expand All @@ -21,7 +22,7 @@
* @see Emoji
* @see \Discord\Parts\User\Client
*
* @since 4.0.2
* @since 10.0.0
*
* @method Emoji|null get(string $discrim, $key)
* @method Emoji|null pull(string|int $key, $default = null)
Expand All @@ -46,4 +47,14 @@ class EmojiRepository extends AbstractRepository
* {@inheritDoc}
*/
protected $class = Emoji::class;

/**
* {@inheritDoc}
*/
public function __construct(Discord $discord, array $vars = [])
{
$vars['application_id'] = $discord->application->id;

parent::__construct($discord, $vars);
}
}

0 comments on commit 12f91e9

Please sign in to comment.