Skip to content
This repository was archived by the owner on Jul 19, 2021. It is now read-only.

Commit 9d22bc8

Browse files
authored
fix(popular-topics/webhooks): update creating webhooks section (discordjs#477)
1 parent a30b862 commit 9d22bc8

File tree

4 files changed

+14
-6
lines changed

4 files changed

+14
-6
lines changed
30.1 KB
Loading
-25.9 KB
Loading
23.8 KB
Loading

guide/popular-topics/webhooks.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,17 @@ const webhookClient = new Discord.WebhookClient('id', 'token');
5353

5454
### Creating webhooks through server settings
5555

56-
You can create webhooks directly through the discord client, go to Server Settings, you will see a `Webhooks` tab.
56+
You can create webhooks directly through the discord client, go to Server Settings, you will see an `Integrations` tab.
5757

58-
![Webhook tab](~@/images/creating-webhooks-1.png)
58+
![Integrations tab](~@/images/creating-webhooks-1.png)
5959

60-
Once you are there, click on the `Create Webhook` button on the top right. This will create a webhook, from here you can edit the channel, the name, and the avatar. Copy the link, the first part is the id, and the second is the token.
60+
If you already have created a webhook the webhooks tab will look this, you will need to click the `View Webhooks` button.
6161

62-
![Creating a Webhook](~@/images/creating-webhooks-2.png)
62+
![Integrations tab](~@/images/creating-webhooks-2.png)
63+
64+
Once you are there, click on the `Create Webhook` / `New Webhook` button. This will create a webhook, from here you can edit the channel, the name, and the avatar. Copy the link, the first part is the id, and the second is the token.
65+
66+
![Creating a Webhook](~@/images/creating-webhooks-3.png)
6367

6468
### Creating webhooks with discord.js
6569

@@ -80,7 +84,9 @@ channel.createWebhook('Some-username', 'https://i.imgur.com/wSTFkRM.png')
8084
```js
8185
channel.createWebhook('Some-username', {
8286
avatar: 'https://i.imgur.com/wSTFkRM.png',
83-
}).then(webhook => console.log(`Created webhook ${webhook}`)).catch(console.error);
87+
})
88+
.then(webhook => console.log(`Created webhook ${webhook}`))
89+
.catch(console.error);
8490
```
8591

8692
</branch>
@@ -107,7 +113,9 @@ webhook.edit({
107113
name: 'Some-username',
108114
avatar: 'https://i.imgur.com/wSTFkRM.png',
109115
channel: '222197033908436994',
110-
}).then(webhook => console.log(`Edited webhook ${webhook}`)).catch(console.error);
116+
})
117+
.then(webhook => console.log(`Edited webhook ${webhook}`))
118+
.catch(console.error);
111119
```
112120

113121
</branch>

0 commit comments

Comments
 (0)