Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ use laravel's event dispatcher for discord events #123

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/Events/Discord/ApplicationCommandPermissionsUpdate.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

namespace Laracord\Events\Discord;

class ApplicationCommandPermissionsUpdate
{
public function __construct(
public readonly \Laracord\Laracord $laracord,
public readonly \Discord\Parts\Guild\CommandPermissions $commandPermission,
public readonly ?\Discord\Parts\Guild\CommandPermissions $oldCommandPermission,
) {}
}
11 changes: 11 additions & 0 deletions src/Events/Discord/AutoModerationActionExecution.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

namespace Laracord\Events\Discord;

class AutoModerationActionExecution
{
public function __construct(
public readonly \Laracord\Laracord $laracord,
public readonly \Discord\Parts\WebSockets\AutoModerationActionExecution $actionExecution,
) {}
}
11 changes: 11 additions & 0 deletions src/Events/Discord/AutoModerationRuleCreate.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

namespace Laracord\Events\Discord;

class AutoModerationRuleCreate
{
public function __construct(
public readonly \Laracord\Laracord $laracord,
public readonly \Discord\Parts\Guild\AutoModeration\Rule $rule,
) {}
}
11 changes: 11 additions & 0 deletions src/Events/Discord/AutoModerationRuleDelete.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

namespace Laracord\Events\Discord;

class AutoModerationRuleDelete
{
public function __construct(
public readonly \Laracord\Laracord $laracord,
public readonly \Discord\Parts\Guild\AutoModeration\Rule $rule,
) {}
}
12 changes: 12 additions & 0 deletions src/Events/Discord/AutoModerationRuleUpdate.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

namespace Laracord\Events\Discord;

class AutoModerationRuleUpdate
{
public function __construct(
public readonly \Laracord\Laracord $laracord,
public readonly \Discord\Parts\Guild\AutoModeration\Rule $rule,
public readonly ?\Discord\Parts\Guild\AutoModeration\Rule $oldRule,
) {}
}
11 changes: 11 additions & 0 deletions src/Events/Discord/ChannelCreate.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

namespace Laracord\Events\Discord;

class ChannelCreate
{
public function __construct(
public readonly \Laracord\Laracord $laracord,
public readonly \Discord\Parts\Channel\Channel $channel,
) {}
}
11 changes: 11 additions & 0 deletions src/Events/Discord/ChannelDelete.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

namespace Laracord\Events\Discord;

class ChannelDelete
{
public function __construct(
public readonly \Laracord\Laracord $laracord,
public readonly \Discord\Parts\Channel\Channel $channel,
) {}
}
11 changes: 11 additions & 0 deletions src/Events/Discord/ChannelPinsUpdate.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

namespace Laracord\Events\Discord;

class ChannelPinsUpdate
{
public function __construct(
public readonly \Laracord\Laracord $laracord,
public readonly array $pins,
) {}
}
12 changes: 12 additions & 0 deletions src/Events/Discord/ChannelUpdate.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

namespace Laracord\Events\Discord;

class ChannelUpdate
{
public function __construct(
public readonly \Laracord\Laracord $laracord,
public readonly \Discord\Parts\Channel\Channel $channel,
public readonly ?\Discord\Parts\Channel\Channel $oldChannel,
) {}
}
10 changes: 10 additions & 0 deletions src/Events/Discord/ClientReady.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace Laracord\Events\Discord;

class ClientReady
{
public function __construct(
public readonly \Laracord\Laracord $laracord,
) {}
}
10 changes: 10 additions & 0 deletions src/Events/Discord/ClientReconnected.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace Laracord\Events\Discord;

class ClientReconnected
{
public function __construct(
public readonly \Laracord\Laracord $laracord,
) {}
}
11 changes: 11 additions & 0 deletions src/Events/Discord/ClientTrace.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

namespace Laracord\Events\Discord;

class ClientTrace
{
public function __construct(
public readonly \Laracord\Laracord $laracord,
public readonly mixed $servers,
) {}
}
11 changes: 11 additions & 0 deletions src/Events/Discord/GuildAuditLogEntryCreate.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

namespace Laracord\Events\Discord;

class GuildAuditLogEntryCreate
{
public function __construct(
public readonly \Laracord\Laracord $laracord,
public readonly \Discord\Parts\Guild\AuditLog\Entry $entry,
) {}
}
11 changes: 11 additions & 0 deletions src/Events/Discord/GuildBanAdd.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

namespace Laracord\Events\Discord;

class GuildBanAdd
{
public function __construct(
public readonly \Laracord\Laracord $laracord,
public readonly \Discord\Parts\Guild\Ban $ban,
) {}
}
11 changes: 11 additions & 0 deletions src/Events/Discord/GuildBanRemove.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

namespace Laracord\Events\Discord;

class GuildBanRemove
{
public function __construct(
public readonly \Laracord\Laracord $laracord,
public readonly \Discord\Parts\Guild\Ban $ban,
) {}
}
11 changes: 11 additions & 0 deletions src/Events/Discord/GuildCreate.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

namespace Laracord\Events\Discord;

class GuildCreate
{
public function __construct(
public readonly \Laracord\Laracord $laracord,
public readonly object $guild,
) {}
}
12 changes: 12 additions & 0 deletions src/Events/Discord/GuildDelete.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

namespace Laracord\Events\Discord;

class GuildDelete
{
public function __construct(
public readonly \Laracord\Laracord $laracord,
public readonly object $guild,
public readonly bool $unavailable,
) {}
}
12 changes: 12 additions & 0 deletions src/Events/Discord/GuildEmojisUpdate.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

namespace Laracord\Events\Discord;

class GuildEmojisUpdate
{
public function __construct(
public readonly \Laracord\Laracord $laracord,
public readonly \Discord\Helpers\Collection $emojis,
public readonly \Discord\Helpers\Collection $oldEmojis,
) {}
}
11 changes: 11 additions & 0 deletions src/Events/Discord/GuildIntegrationsUpdate.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

namespace Laracord\Events\Discord;

class GuildIntegrationsUpdate
{
public function __construct(
public readonly \Laracord\Laracord $laracord,
public readonly object $guild,
) {}
}
11 changes: 11 additions & 0 deletions src/Events/Discord/GuildMemberAdd.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

namespace Laracord\Events\Discord;

class GuildMemberAdd
{
public function __construct(
public readonly \Laracord\Laracord $laracord,
public readonly \Discord\Parts\User\Member $member,
) {}
}
11 changes: 11 additions & 0 deletions src/Events/Discord/GuildMemberRemove.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

namespace Laracord\Events\Discord;

class GuildMemberRemove
{
public function __construct(
public readonly \Laracord\Laracord $laracord,
public readonly \Discord\Parts\User\Member $member,
) {}
}
12 changes: 12 additions & 0 deletions src/Events/Discord/GuildMemberUpdate.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

namespace Laracord\Events\Discord;

class GuildMemberUpdate
{
public function __construct(
public readonly \Laracord\Laracord $laracord,
public readonly \Discord\Parts\User\Member $member,
public readonly ?\Discord\Parts\User\Member $oldMember,
) {}
}
11 changes: 11 additions & 0 deletions src/Events/Discord/GuildRoleCreate.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

namespace Laracord\Events\Discord;

class GuildRoleCreate
{
public function __construct(
public readonly \Laracord\Laracord $laracord,
public readonly \Discord\Parts\Guild\Role $role,
) {}
}
11 changes: 11 additions & 0 deletions src/Events/Discord/GuildRoleDelete.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

namespace Laracord\Events\Discord;

class GuildRoleDelete
{
public function __construct(
public readonly \Laracord\Laracord $laracord,
public readonly object $role,
) {}
}
12 changes: 12 additions & 0 deletions src/Events/Discord/GuildRoleUpdate.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

namespace Laracord\Events\Discord;

class GuildRoleUpdate
{
public function __construct(
public readonly \Laracord\Laracord $laracord,
public readonly \Discord\Parts\Guild\Role $role,
public readonly ?\Discord\Parts\Guild\Role $oldRole,
) {}
}
11 changes: 11 additions & 0 deletions src/Events/Discord/GuildScheduledEventCreate.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

namespace Laracord\Events\Discord;

class GuildScheduledEventCreate
{
public function __construct(
public readonly \Laracord\Laracord $laracord,
public readonly \Discord\Parts\Guild\ScheduledEvent $scheduledEvent,
) {}
}
11 changes: 11 additions & 0 deletions src/Events/Discord/GuildScheduledEventDelete.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

namespace Laracord\Events\Discord;

class GuildScheduledEventDelete
{
public function __construct(
public readonly \Laracord\Laracord $laracord,
public readonly \Discord\Parts\Guild\ScheduledEvent $scheduledEvent,
) {}
}
12 changes: 12 additions & 0 deletions src/Events/Discord/GuildScheduledEventUpdate.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

namespace Laracord\Events\Discord;

class GuildScheduledEventUpdate
{
public function __construct(
public readonly \Laracord\Laracord $laracord,
public readonly \Discord\Parts\Guild\ScheduledEvent $scheduledEvent,
public readonly ?\Discord\Parts\Guild\ScheduledEvent $oldScheduledEvent,
) {}
}
11 changes: 11 additions & 0 deletions src/Events/Discord/GuildScheduledEventUserAdd.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

namespace Laracord\Events\Discord;

class GuildScheduledEventUserAdd
{
public function __construct(
public readonly \Laracord\Laracord $laracord,
public readonly object $data,
) {}
}
11 changes: 11 additions & 0 deletions src/Events/Discord/GuildScheduledEventUserRemove.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

namespace Laracord\Events\Discord;

class GuildScheduledEventUserRemove
{
public function __construct(
public readonly \Laracord\Laracord $laracord,
public readonly object $data,
) {}
}
12 changes: 12 additions & 0 deletions src/Events/Discord/GuildStickersUpdate.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

namespace Laracord\Events\Discord;

class GuildStickersUpdate
{
public function __construct(
public readonly \Laracord\Laracord $laracord,
public readonly \Discord\Helpers\Collection $stickers,
public readonly \Discord\Helpers\Collection $oldStickers,
) {}
}
12 changes: 12 additions & 0 deletions src/Events/Discord/GuildUpdate.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

namespace Laracord\Events\Discord;

class GuildUpdate
{
public function __construct(
public readonly \Laracord\Laracord $laracord,
public readonly \Discord\Parts\Guild\Guild $guild,
public readonly ?\Discord\Parts\Guild\Guild $oldGuild,
) {}
}
Loading
Loading