Skip to content
This repository has been archived by the owner on Sep 30, 2022. It is now read-only.

Commit

Permalink
Merge pull request #7 from FifiTheBulldog/patch-1
Browse files Browse the repository at this point in the history
Fix chat injection
  • Loading branch information
BenSegal855 authored Feb 17, 2022
2 parents 557613f + 8c46b86 commit 7f573b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module.exports = class WebTag extends Plugin {
const msg = args[0].message;

if (msg.webhookId !== null && msg.messageReference === null && msg.author.discriminator === '0000') {
const header = findInReactTree(res, e => Array.isArray(e?.props?.children) && e.props.children.find(c => c?.props?.message));
const header = findInReactTree(res.props.username, e => Array.isArray(e?.props?.children) && e.props.children.find(c => c?.props?.message));
header.props.children[0].props.message.author.bot = false;
header.props.children.push(React.createElement(
'span',
Expand Down

0 comments on commit 7f573b8

Please sign in to comment.