Update WriteUpperCase.plugin.js

This commit is contained in:
Mirco Wittrien 2022-02-11 15:53:25 +01:00
parent d34adf54d7
commit 73fec74455
1 changed files with 4 additions and 3 deletions

View File

@ -2,7 +2,7 @@
* @name WriteUpperCase
* @author DevilBro
* @authorId 278543574059057154
* @version 1.3.2
* @version 1.3.3
* @description Changes the first Letter of each Sentence in Message Inputs to Uppercase
* @invite Jx3TjNS
* @donate https://www.paypal.me/MircoWittrien
@ -17,7 +17,7 @@ module.exports = (_ => {
"info": {
"name": "WriteUpperCase",
"author": "DevilBro",
"version": "1.3.2",
"version": "1.3.3",
"description": "Changes the first Letter of each Sentence in Message Inputs to Uppercase"
}
};
@ -166,7 +166,8 @@ module.exports = (_ => {
}
processChannelEditorContainer (e) {
let type = BDFDB.LibraryModules.StringUtils.upperCaseFirstChar(e.instance.props.type || "");
let type = e.instance.props.type.analyticsName || e.instance.props.type || "";
type = BDFDB.LibraryModules.StringUtils.upperCaseFirstChar(typeof type != "string" ? "" : type);
if (e.instance.props.textValue && e.instance.state.focused && (!type || this.settings.places[type] || !this.defaults.general[type]) && (!this.settings.general.addQuickToggle || channelBlacklist.indexOf(e.instance.props.channel.id) == -1)) {
let string = e.instance.props.textValue;
if (string.length && !/<[#@][!&]{0,1}\d+>|@here|@everyone|:[A-z0-9_-]+:|[\uD83C-\uDBFF\uDC00-\uDFFF]+/.test(string)) {