No error when message not found
This commit is contained in:
parent
46ad97d409
commit
54b8351e7c
@ -244,7 +244,7 @@ router.get(
|
||||
if (msg.message_reference!.guild_id) whereOptions.guild_id = msg.message_reference!.guild_id;
|
||||
if (msg.message_reference!.channel_id) whereOptions.channel_id = msg.message_reference!.channel_id;
|
||||
|
||||
msg.referenced_message = await Message.findOneOrFail({ where: whereOptions, relations: ["author", "mentions", "mention_roles", "mention_channels"] });
|
||||
msg.referenced_message = await Message.findOne({ where: whereOptions, relations: ["author", "mentions", "mention_roles", "mention_channels"] });
|
||||
});
|
||||
|
||||
return res.json(ret);
|
||||
|
||||
@ -46,7 +46,7 @@ router.get(
|
||||
await Invite.delete({ code: i.code });
|
||||
});
|
||||
|
||||
return res.json(invites.filter(i => !i.isExpired()));
|
||||
return res.json(invites.filter((i) => !i.isExpired()));
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user