Update Translator.plugin.js

This commit is contained in:
Mirco Wittrien 2022-11-02 15:43:09 +01:00
parent b50681947e
commit ae75abc495
1 changed files with 1 additions and 1 deletions

View File

@ -706,7 +706,7 @@ module.exports = (_ => {
}
processMessageReply (e) {
if (!e.instance.props.referencedMessage || !translatedMessages[e.instance.props.referencedMessage.message.id]) return;
if (!e.instance.props.referencedMessage || !e.instance.props.referencedMessage.message || !translatedMessages[e.instance.props.referencedMessage.message.id]) return;
e.instance.props.referencedMessage = Object.assign({}, e.instance.props.referencedMessage);
e.instance.props.referencedMessage.message = new BDFDB.DiscordObjects.Message(e.instance.props.referencedMessage.message);
e.instance.props.referencedMessage.message.content = translatedMessages[e.instance.props.referencedMessage.message.id].content;