mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-04 01:40:08 +00:00
Revert "Revert "fix(handlers/webhook): return Message object instead of raw payload (#611)" (#634)" (#643)
This reverts commit a515765abf.
This commit is contained in:
@@ -255,9 +255,10 @@ export async function editWebhookMessage(
|
||||
const result = await RequestManager.patch(
|
||||
endpoints.WEBHOOK_MESSAGE(webhookID, webhookToken, messageID),
|
||||
{ ...options, allowed_mentions: options.allowed_mentions },
|
||||
);
|
||||
) as MessageCreateOptions;
|
||||
|
||||
return result;
|
||||
const message = await structures.createMessage(result);
|
||||
return message;
|
||||
}
|
||||
|
||||
export async function deleteWebhookMessage(
|
||||
@@ -599,5 +600,11 @@ export async function editSlashResponse(
|
||||
options,
|
||||
);
|
||||
|
||||
return result;
|
||||
// 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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user