- How do I install awssat/discord-notification-channel in a Laravel app?
- Install it with Composer using composer require awssat/discord-notification-channel. Laravel package auto-discovery handles service provider registration, so there is no manual provider setup. Add the Discord webhook URL to your config, then add the Discord channel to a notification's via() method and define toDiscord() to build the payload. Pin the package version in composer.json rather than floating it.
- Which Laravel and PHP versions does this Discord notification channel support?
- The practical stack fit is Laravel 8 and later on PHP 7.4 through 8.3, but the exact support matrix depends on the tagged release. Check the latest release's composer.json for laravel/framework and php constraints before upgrading a Laravel major version. Reconcile the stated release date against Packagist history. Pin a version you have tested.
- Do I need a Discord bot token to use awssat/discord-notification-channel?
- No. The package sends through Discord webhooks, so you do not need a bot token, privileged intents, or a Discord application lifecycle. That keeps secret custody limited to the webhook URL. It is intended for outbound notification fan-out, not for receiving Discord events or running a bot.
- How do I send a Laravel notification to Discord?
- Create a notification class and return the Discord channel from its via() method. Implement toDiscord() to return the message or embed payload the channel sends. The channel's send() method is invoked by Laravel's notification system, so the flow matches any other Laravel notification channel. Trigger it with Notification::send() or the notifiable's notify() method.
- How do I configure the Discord webhook URL for different environments?
- Put the webhook URL in an environment variable and reference it from config/services.php or config/discord.php, depending on the package version. Use separate webhooks for development, staging, and production so staging does not spam production channels. Source the URL from your secret manager rather than committing it. Keep configuration cached in production as usual.
- Does awssat/discord-notification-channel support Discord embeds and mentions?
- The payload builder covers messages and Discord embeds, which is the common use case for notification fan-out. Confirm the exact embed and component coverage against the version you install, because advanced interactive components may be a reduced subset. Test payload shapes in a private Discord channel before relying on them in production.
- Can Discord notifications be queued with ShouldQueue?
- Yes. Because the package plugs into Laravel's native notification channel contract, it inherits queueing and ShouldQueue behavior. Implement ShouldQueue on the notification, assign a dedicated queue, and set tries and backoff. Retry and backoff semantics are only what Laravel's queue provides; the package does not add its own guaranteed retry layer.
- How does the package handle Discord rate limits and failed webhook requests?
- The package does not document a guaranteed retry or backoff policy beyond Laravel's queue behavior. Discord 429 rate-limit responses and 5xx errors should be verified against your installed version, and the maintainer should be asked whether they are surfaced as exceptions, logged, or retried. In practice, queue the notification and configure tries and backoff so transient failures are retried. Monitor failed jobs for webhook delivery problems.
- How can I test Discord notifications in CI without sending real messages?
- Use Laravel's Notification::fake() to prevent real HTTP calls and assert that the notification was sent with the Discord channel. Confirm whether the package ships its own fake channel or test double, and whether it is stable across Laravel majors. For payload-level tests, unit test your toDiscord() method directly. Keep a separate manual spike against a private Discord channel to validate real webhook delivery.
- Is awssat/discord-notification-channel actively maintained, and what alternatives exist?
- It is a single-maintainer package with roughly 94 stars, so the bus factor is low and you should pin the version and review release history before adopting it. Check Packagist and the repository commit history to verify cadence and the stated release date. Alternatives include writing a small custom channel using Laravel's Http client to post to a Discord webhook, or using a community Discord notification channel with broader component support. For many apps, the low integration cost makes this package reasonable if you accept the maintenance risk.