You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-9Lines changed: 11 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -80,32 +80,34 @@ class Guild extends Eloquent
80
80
```
81
81
82
82
> **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.
83
+
>
83
84
> An example workflow may look like the following:
84
85
>
85
-
> 1. Your `users` table has two discord columns: `discord_user` and `discord_channel`
86
-
> 2. When a user updates their Discord user ID (`discord_user`), generate and save a channel ID (`discord_channel`)
87
-
> 3. Return the user's `discord_channel` in the `routeNotificationForDiscord` method on the User model
86
+
> 1. Your `users` table has two discord columns: `discord_user_id` and `discord_private_channel_id`
87
+
> 2. When a user updates their Discord user ID (`discord_user_id`), generate and save a private channel ID (`discord_private_channel_id`)
88
+
> 3. Return the user's `discord_private_channel_id` in the `routeNotificationForDiscord` method on the `User` model
88
89
>
89
-
> You can generate direct message channels by using the `getPrivateChannel` method in `NotificationChannels\Discord\Discord`:
90
+
> You can generate direct message channels by using the `getPrivateChannel` method in the `NotificationChannels\Discord\Discord` class
> Please take note that the `getPrivateChannel` method only accepts [Discord's snowflake IDs](https://discordapp.com/developers/docs/reference#snowflakes). There is no API route provided by Discord to lookup a user's ID by their name and tag, and the process for copying and pasting a user ID can be confusing to some users. Because of this, it is recommended to add the option for users to connect their Discord account to their account within your application either by logging in with Discord or linking it to their pre-existing account.
109
111
110
112
You may now tell Laravel to send notifications to Discord channels in the `via` method:
0 commit comments