{"repo":"laravel-notification-channels/discord","free":true,"listed":false,"github":"https://github.com/laravel-notification-channels/discord","clone":"git clone https://github.com/laravel-notification-channels/discord.git","description":"Discord notification channel for Laravel","language":"PHP","stars":240,"topics":["laravel","discord"],"license":"MIT","category":"chat-messaging","readme_excerpt":"Discord notification channel for Laravel 6.0+ This package makes it easy to send notifications using the Discord bot API with Laravel. Contents - Discord notification channel for Laravel 6.0+ - Contents - Installation - Setting up your Discord bot - Usage - Available Message methods - Changelog - Testing - Security - Contributing - Credits - License Installation You can install the package via composer: Next, you must load the service provider: Setting up your Discord bot 1. Create a Discord application. 2. Click the Create a Bot User button on your Discord application. 3. Paste your bot's API token, found under App Bot User , in your services.php config file: 4. Add the bot to your server and identify it by running the artisan command: Usage In every model you wish to be notifiable via Discord, you must add a channel ID property to that model accessible through a routeNotificationForDiscord method: NOTE : Discord handles direct messages as though they are a regular channel. If you wish to allow users to receive direct messages from your bot, you will need to create a private channel with that user. An example workflow may look like the following: 1. Your users table has two discord columns: discord user id and discord private channel id 2. When a user updates their Discord user ID ( discord user id ), generate and save a private channel ID ( discord private channel id ) 3. Return the user's discord private channel id in the routeNotificationForDiscord method on the User mode","default_branch":null,"files":null,"tree":[],"storefront":"/r/laravel-notification-channels","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/laravel-notification-channels/discord/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}