Skip to content

Commit

Permalink
Remove deprecated application ID from global & guild command extensio…
Browse files Browse the repository at this point in the history
…ns (#86)
  • Loading branch information
Exanlv authored Mar 28, 2024
1 parent 80b3374 commit 2576386
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
7 changes: 0 additions & 7 deletions src/Command/GlobalCommandExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,6 @@
*/
class GlobalCommandExtension extends CommandExtension
{
public function __construct(?string $applicationId = null)
{
if (!is_null($applicationId)) {
trigger_error('Providing an application ID is no longer required and will be removed in a later version');
}
}

protected function emitInteraction(InteractionCreate $interaction): bool
{
return !isset($interaction->data->guild_id);
Expand Down
5 changes: 1 addition & 4 deletions src/Command/GuildCommandExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,8 @@
*/
class GuildCommandExtension extends CommandExtension
{
public function __construct(?string $applicationId, private readonly string $guildId)
public function __construct(private readonly string $guildId)
{
if (!is_null($applicationId)) {
trigger_error('Providing an application ID is no longer required and will be removed in a later version');
}
}

protected function emitInteraction(InteractionCreate $interaction): bool
Expand Down

0 comments on commit 2576386

Please sign in to comment.