Skip to content

Commit 0789ff2

Browse files
committed
Update README
1 parent 91b4c55 commit 0789ff2

File tree

1 file changed

+18
-16
lines changed

1 file changed

+18
-16
lines changed

README.md

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Discord notification channel for Laravel 5.6
1+
# Discord notification channel for Laravel 5.6+
22

33
[![Latest Version on Packagist](https://img.shields.io/packagist/v/laravel-notification-channels/discord.svg?style=flat-square)](https://packagist.org/packages/laravel-notification-channels/discord)
44
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)
@@ -12,16 +12,18 @@ This package makes it easy to send notifications using the [Discord bot API](htt
1212

1313
## Contents
1414

15-
- [Installation](#installation)
16-
- [Setting up your Discord bot](#setting-up-your-discord-bot)
17-
- [Usage](#usage)
18-
- [Available Message methods](#available-message-methods)
19-
- [Changelog](#changelog)
20-
- [Testing](#testing)
21-
- [Security](#security)
22-
- [Contributing](#contributing)
23-
- [Credits](#credits)
24-
- [License](#license)
15+
- [Discord notification channel for Laravel 5.6+](#discord-notification-channel-for-laravel-56)
16+
- [Contents](#contents)
17+
- [Installation](#installation)
18+
- [Setting up your Discord bot](#setting-up-your-discord-bot)
19+
- [Usage](#usage)
20+
- [Available Message methods](#available-message-methods)
21+
- [Changelog](#changelog)
22+
- [Testing](#testing)
23+
- [Security](#security)
24+
- [Contributing](#contributing)
25+
- [Credits](#credits)
26+
- [License](#license)
2527

2628

2729
## Installation
@@ -79,24 +81,24 @@ class Guild extends Eloquent
7981

8082
> **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.
8183
> An example workflow may look like the following:
82-
>
84+
>
8385
> 1. Your `users` table has two discord columns: `discord_user` and `discord_channel`
8486
> 2. When a user updates their Discord user ID (`discord_user`), generate and save a channel ID (`discord_channel`)
8587
> 3. Return the user's `discord_channel` in the `routeNotificationForDiscord` method on the User model
86-
>
88+
>
8789
> You can generate direct message channels by using the `getPrivateChannel` method in `NotificationChannels\Discord\Discord`:
88-
>
90+
>
8991
> ```php
9092
> use NotificationChannels\Discord\Discord;
9193
> // ...
92-
>
94+
>
9395
> class UserDiscordSettingsController
9496
> {
9597
> public function store(Request $request)
9698
> {
9799
> $user = $request->input('discord_user');
98100
> $channel = app(Discord::class)->getPrivateChannel($user);
99-
>
101+
>
100102
> Auth::user()->update([
101103
> 'discord_user' => $user,
102104
> 'discord_channel' => $channel,

0 commit comments

Comments
 (0)