mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-07 19:32:34 +01:00
🐛 fix empty message bug for attachments
This commit is contained in:
parent
9b59296af5
commit
624a4d5694
@ -41,7 +41,7 @@ export async function handleMessage(opts: Partial<Message>) {
|
|||||||
opts.type = MessageType.REPLY;
|
opts.type = MessageType.REPLY;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!opts.content && !opts.embeds?.length) {
|
if (!opts.content && !opts.embeds?.length && !opts.attachments?.length && !opts.stickers?.length && !opts.activity) {
|
||||||
throw new HTTPError("Empty messages are not allowed", 50006);
|
throw new HTTPError("Empty messages are not allowed", 50006);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user