now sendWebhook

This commit is contained in:
ITOH
2021-05-03 22:58:06 +02:00
parent 6c80e1c47e
commit 6d0b0cb974
2 changed files with 5 additions and 6 deletions

View File

@@ -118,7 +118,7 @@ import { deleteWebhookWithToken } from "./webhooks/delete_webhook_with_token.ts"
import { editWebhook } from "./webhooks/edit_webhook.ts";
import { editWebhookMessage } from "./webhooks/edit_webhook_message.ts";
import { editWebhookWithToken } from "./webhooks/edit_webhook_with_token.ts";
import { executeWebhook } from "./webhooks/execute_webhook.ts";
import { sendWebhook } from "./webhooks/send_webhook.ts";
import { getWebhook } from "./webhooks/get_webhook.ts";
import { getWebhooks } from "./webhooks/get_webhooks.ts";
import { getWebhookWithToken } from "./webhooks/get_webhook_with_token.ts";
@@ -181,7 +181,7 @@ export {
editWelcomeScreen,
editWidget,
emojiURL,
executeWebhook,
sendWebhook,
fetchMembers,
followChannel,
getAuditLogs,
@@ -392,7 +392,7 @@ export let helpers = {
editWebhookMessage,
editWebhookWithToken,
editWebhook,
executeWebhook,
sendWebhook,
getWebhookWithToken,
getWebhook,
getWebhooks,

View File

@@ -6,8 +6,8 @@ import { Errors } from "../../types/misc/errors.ts";
import { ExecuteWebhook } from "../../types/webhooks/execute_webhook.ts";
import { endpoints } from "../../util/constants.ts";
/** Execute a webhook with webhook Id and webhook token */
export async function executeWebhook(
/** Send a webhook with webhook Id and webhook token */
export async function sendWebhook(
webhookId: bigint,
webhookToken: string,
options: ExecuteWebhook,
@@ -75,7 +75,6 @@ export async function executeWebhook(
avatar_url: options.avatarUrl,
},
);
// TODO: not sure
if (!options.wait) return;
return structures.createDiscordenoMessage(result);