mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-13 18:13:29 +01:00
adds new WebhookClient and allows you to fetch channel webhooks and such without being "over the top" (#768)
* start blocking out client * proto webhookclient * wee working webhooks * it's all working * run docs * fix jsdoc issues * add example for webhookClient * add example in the examples place * fix docs
This commit is contained in:
@@ -103,6 +103,10 @@ const Endpoints = exports.Endpoints = {
|
||||
channelTyping: (channelID) => `${Endpoints.channel(channelID)}/typing`,
|
||||
channelPermissions: (channelID) => `${Endpoints.channel(channelID)}/permissions`,
|
||||
channelMessage: (channelID, messageID) => `${Endpoints.channelMessages(channelID)}/${messageID}`,
|
||||
channelWebhooks: (channelID) => `${Endpoints.channel(channelID)}/webhooks`,
|
||||
|
||||
// webhooks
|
||||
webhook: (webhookID, token) => `${API}/webhooks/${webhookID}${token ? `/${token}` : ''}`,
|
||||
};
|
||||
|
||||
exports.Status = {
|
||||
@@ -242,7 +246,7 @@ const PermissionFlags = exports.PermissionFlags = {
|
||||
CHANGE_NICKNAME: 1 << 26,
|
||||
MANAGE_NICKNAMES: 1 << 27,
|
||||
MANAGE_ROLES_OR_PERMISSIONS: 1 << 28,
|
||||
|
||||
MANAGE_WEBHOOKS: 1 << 29,
|
||||
MANAGE_EMOJIS: 1 << 30,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user