Updated error message for empty webhook update body
This commit is contained in:
parent
859edb9a27
commit
d0948c0e49
@ -353,7 +353,7 @@ router.patch(
|
||||
});
|
||||
const channel_id = webhook.channel_id;
|
||||
if (!body.name && !body.avatar) {
|
||||
throw new HTTPError("Empty messages are not allowed", 50006);
|
||||
throw new HTTPError("Empty webhook updates are not allowed", 50006);
|
||||
}
|
||||
if (body.avatar)
|
||||
body.avatar = await handleFile(
|
||||
|
@ -158,7 +158,7 @@ router.patch(
|
||||
throw DiscordApiErrors.UNKNOWN_WEBHOOK;
|
||||
|
||||
if (!body.name && !body.avatar && !body.channel_id) {
|
||||
throw new HTTPError("Empty messages are not allowed", 50006);
|
||||
throw new HTTPError("Empty webhook updates are not allowed", 50006);
|
||||
}
|
||||
|
||||
if (body.avatar)
|
||||
|
Loading…
x
Reference in New Issue
Block a user