mirror of
https://github.com/spacebarchat/server.git
synced 2026-07-09 08:01:45 +00:00
Guard embedless messages when checking for poll results, add reply tests
This commit is contained in:
@@ -768,7 +768,7 @@ async function handleMessageMentionsAsync(message: Message) {
|
||||
);
|
||||
}
|
||||
|
||||
if (message.embeds[0].type === EmbedType.poll_result) {
|
||||
if (message.embeds[0]?.type === EmbedType.poll_result) {
|
||||
message.mentions.push(
|
||||
// @ts-expect-error it does not like the .toPublicUser() lol
|
||||
(await User.findOne({ where: { id: message.author_id } }))!.toPublicUser(),
|
||||
|
||||
Reference in New Issue
Block a user