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
This package makes it easy to send notifications using the [Discord bot API](https://discordapp.com/developers/docs/intro) with Laravel.
11
+
This package makes it easy to send notifications using the [Discord bot API](https://discord.com/developers/docs/intro) with Laravel.
12
12
13
13
## Contents
14
14
@@ -46,7 +46,7 @@ Next, you must load the service provider:
46
46
47
47
### Setting up your Discord bot
48
48
49
-
1.[Create a Discord application.](https://discordapp.com/developers/applications/me/create)
49
+
1.[Create a Discord application.](https://discord.com/developers/applications)
50
50
2. Click the `Create a Bot User` button on your Discord application.
51
51
3. Paste your bot's API token, found under `App Bot User`, in your `services.php` config file:
52
52
@@ -107,7 +107,7 @@ class Guild extends Eloquent
107
107
> }
108
108
> ```
109
109
>
110
-
> 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.
110
+
> Please take note that the `getPrivateChannel` method only accepts [Discord's snowflake IDs](https://discord.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.
111
111
112
112
You may now tell Laravel to send notifications to Discord channels in the `via` method:
113
113
@@ -142,8 +142,8 @@ class GameChallengeNotification extends Notification
142
142
143
143
### Available Message methods
144
144
145
-
*`body(string)`: Set the content of the message. ([Supports basic markdown](https://support.discordapp.com/hc/en-us/articles/210298617-Markdown-Text-101-Chat-Formatting-Bold-Italic-Underline-))
146
-
*`embed(array)`: Set the embedded content. ([View embed structure](https://discordapp.com/developers/docs/resources/channel#embed-object))
145
+
*`body(string)`: Set the content of the message. ([Supports basic markdown](https://support.discord.com/hc/en-us/articles/210298617-Markdown-Text-101-Chat-Formatting-Bold-Italic-Underline-))
146
+
*`embed(array)`: Set the embedded content. ([View embed structure](https://discord.com/developers/docs/resources/channel#embed-object))
Copy file name to clipboardExpand all lines: src/Commands/SetupCommand.php
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,7 @@ public function handle()
64
64
if (! $this->confirm('Is the bot already added to your server?')) {
65
65
$clientId = $this->ask('What is your Discord app client ID?');
66
66
67
-
$this->warn('Add the bot to your server by visiting this link: https://discordapp.com/oauth2/authorize?&client_id='.$clientId.'&scope=bot&permissions=0');
67
+
$this->warn('Add the bot to your server by visiting this link: https://discord.com/oauth2/authorize?&client_id='.$clientId.'&scope=bot&permissions=0');
68
68
69
69
if (! $this->confirm('Continue?', true)) {
70
70
return -1;
@@ -81,7 +81,7 @@ public function handle()
81
81
82
82
// Discord requires all bots to connect via a websocket connection and
83
83
// identify at least once before any API requests over HTTP are allowed.
Copy file name to clipboardExpand all lines: tests/SetupCommandTest.php
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ public function it_tells_the_user_to_connect_the_bot_to_their_discord_server()
35
35
36
36
$command->shouldReceive('confirm')->with('Is the bot already added to your server?')->once()->andReturn(false);
37
37
$command->shouldReceive('ask')->with('What is your Discord app client ID?')->once()->andReturn('my-client-id');
38
-
$command->shouldReceive('warn')->with('Add the bot to your server by visiting this link: https://discordapp.com/oauth2/authorize?&client_id=my-client-id&scope=bot&permissions=0');
38
+
$command->shouldReceive('warn')->with('Add the bot to your server by visiting this link: https://discord.com/oauth2/authorize?&client_id=my-client-id&scope=bot&permissions=0');
@@ -136,7 +136,7 @@ public function it_notifies_the_user_of_a_failed_identification_attempt()
136
136
137
137
$command->shouldReceive('confirm')->with('Is the bot already added to your server?')->once()->andReturn(false);
138
138
$command->shouldReceive('ask')->with('What is your Discord app client ID?')->once()->andReturn('my-client-id');
139
-
$command->shouldReceive('warn')->with('Add the bot to your server by visiting this link: https://discordapp.com/oauth2/authorize?&client_id=my-client-id&scope=bot&permissions=0');
139
+
$command->shouldReceive('warn')->with('Add the bot to your server by visiting this link: https://discord.com/oauth2/authorize?&client_id=my-client-id&scope=bot&permissions=0');
0 commit comments