Revert "fix(handlers/webhook): return Message object instead of raw payload (#611)" (#634)

This reverts commit 9c7340f624.
This commit is contained in:
ayntee
2021-03-08 15:42:51 +04:00
committed by GitHub
parent 1b29c92aac
commit a515765abf
+3 -10
View File
@@ -255,10 +255,9 @@ export async function editWebhookMessage(
const result = await RequestManager.patch(
endpoints.WEBHOOK_MESSAGE(webhookID, webhookToken, messageID),
{ ...options, allowed_mentions: options.allowed_mentions },
) as MessageCreateOptions;
);
const message = await structures.createMessage(result);
return message;
return result;
}
export async function deleteWebhookMessage(
@@ -600,11 +599,5 @@ export async function editSlashResponse(
options,
);
// If the original message was edited, this will not return a message
if (!options.messageID) return result;
const message = await structures.createMessage(
result as MessageCreateOptions,
);
return message;
return result;
}