diff --git a/src/structures/Webhook.js b/src/structures/Webhook.js index 2dc1a0282..2ed6137b4 100644 --- a/src/structures/Webhook.js +++ b/src/structures/Webhook.js @@ -155,7 +155,7 @@ class Webhook { /** * Sends a raw slack message with this webhook. * @param {Object} body The raw body to send - * @returns {Promise} + * @returns {Promise} * @example * // Send a slack message * webhook.sendSlackMessage({ @@ -174,11 +174,7 @@ class Webhook { query: { wait: true }, auth: false, data: body, - }).then(d => { - const channel = this.client.channels ? this.client.channels.get(d.channel_id) : undefined; - if (!channel) return d; - return channel.messages.add(d, false); - }); + }).then(data => data.toString() === 'ok'); } /** diff --git a/typings/index.d.ts b/typings/index.d.ts index 0bc65d4e5..72ee1e893 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -1861,7 +1861,7 @@ declare module 'discord.js' { send(content?: StringResolvable, options?: WebhookMessageOptions & { split: true | SplitOptions } | MessageAdditions): Promise; send(options?: WebhookMessageOptions & { split?: false } | MessageAdditions | APIMessage): Promise; send(options?: WebhookMessageOptions & { split: true | SplitOptions } | MessageAdditions | APIMessage): Promise; - sendSlackMessage(body: object): Promise; + sendSlackMessage(body: object): Promise; } //#endregion