Update 0BDFDB.plugin.js
This commit is contained in:
parent
f408996032
commit
b5d693eb4a
|
@ -7343,10 +7343,21 @@ module.exports = (_ => {
|
|||
};
|
||||
|
||||
let MessageHeaderExport = BDFDB.ModuleUtils.findByProperties("MessageTimestamp", false);
|
||||
if (MessageHeaderExport) InternalBDFDB.processMessage = function (e) {
|
||||
if (BDFDB.ObjectUtils.get(e, "instance.props.childrenHeader.type.type.name") && BDFDB.ObjectUtils.get(e, "instance.props.childrenHeader.props.message")) {
|
||||
InternalBDFDB.processMessage = function (e) {
|
||||
if (MessageHeaderExport && BDFDB.ObjectUtils.get(e, "instance.props.childrenHeader.type.type.name") && BDFDB.ObjectUtils.get(e, "instance.props.childrenHeader.props.message")) {
|
||||
e.instance.props.childrenHeader.type = MessageHeaderExport.exports.default;
|
||||
}
|
||||
if (e.returnvalue && e.returnvalue.props && e.returnvalue.props.children && e.returnvalue.props.children.props) {
|
||||
let message;
|
||||
for (let key in e.instance.props) {
|
||||
let data = BDFDB.ObjectUtils.get(e.instance.props[key], "props.message");
|
||||
if (data) {
|
||||
message = data;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (message) e.returnvalue.props.children.props["user_by_BDFDB"] = message.author.id;
|
||||
}
|
||||
};
|
||||
|
||||
const BDFDB_Patrons = Object.assign({}, InternalData.BDFDB_Patrons);
|
||||
|
|
Loading…
Reference in New Issue