{"repo":"spatie/laravel-discord-alerts","free":true,"listed":false,"github":"https://github.com/spatie/laravel-discord-alerts","clone":"git clone https://github.com/spatie/laravel-discord-alerts.git","description":"Quickly send a message to Discord","language":"PHP","stars":158,"topics":["laravel","php","discord","notification"],"license":"MIT","category":"chat-messaging","readme_excerpt":"Quickly send a message to Discord This package can quickly send alerts to Discord. You can use this to notify yourself of any noteworthy events happening in your app. Want to quickly send alerts to Slack? Then check out laravel-slack-alerts. Under the hood, a job is used to communicate with Discord. This prevents your app from failing in case Discord is down. Support us We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products. We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall. Installation You can install the package via composer: You can set a DISCORD ALERT WEBHOOK env variable containing a valid Discord webhook URL. You can learn how to get a webhook URL in the Discord API docs. Alternatively, you can publish the config file with: This is the contents of the published config file: Usage To send a message to Discord, simply call DiscordAlert::message() and pass it any message you want. Sending an embed To send an embed you can call the same function as above. Just add the embed as a second array as following: You can also send multiple embeds as one message. Just be careful that you don't hit the limit of Discord. Sending attachments You can attach one or more files to a message. attach() takes a path or an SplFileInfo instance,","default_branch":null,"files":null,"tree":[],"storefront":"/r/spatie","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/spatie/laravel-discord-alerts/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."}