Update CustomQuoter.plugin.js

This commit is contained in:
Mirco Wittrien 2022-04-03 16:37:22 +02:00 committed by GitHub
parent 0f6d1a4ca1
commit 160ccab343
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 11 deletions

View File

@ -19,14 +19,6 @@ module.exports = (_ => {
"author": "DevilBro",
"version": "1.2.8",
"description": "Brings back the Quote Feature and allows you to set your own Quote Formats"
},
"changeLog": {
"improved": {
"Date Insert": "Changed the manual Timestamp Placeholders to the new Date Component"
},
"added": {
"Auto new Lines": "Added Option to auto insert new line feeds for Quotes"
}
}
};
@ -378,9 +370,7 @@ module.exports = (_ => {
BDFDB.LibraryRequires.electron.clipboard.write({text: text});
BDFDB.NotificationUtils.toast(this.labels.toast_quotecopied, {type: "success"});
}
else {
BDFDB.LibraryModules.DispatchUtils.ComponentDispatch.dispatchToLastSubscribed(BDFDB.DiscordConstants.ComponentActions.INSERT_TEXT, {content: [this.settings.general.autoAddNewLine && ChannelTextAreaForm && ChannelTextAreaForm.state.textValue && !this.isNewLine(ChannelTextAreaForm.state.textValue, true) && !this.isNewLine(text, false) && "\n", text, this.settings.general.autoAddNewLine && !this.isNewLine(text, true) && "\n"].filter(n => n).join("")});
}
else BDFDB.LibraryModules.DispatchUtils.ComponentDispatch.dispatchToLastSubscribed(BDFDB.DiscordConstants.ComponentActions.INSERT_TEXT, {plainText: [this.settings.general.autoAddNewLine && ChannelTextAreaForm && ChannelTextAreaForm.state.textValue && !this.isNewLine(ChannelTextAreaForm.state.textValue, true) && !this.isNewLine(text, false) && "\n", text, this.settings.general.autoAddNewLine && !this.isNewLine(text, true) && "\n"].filter(n => n).join("")});
}
}