fix whoreacted (#1051)

* fix whoreacted

* make it a bit smaller

* make it better lol
This commit is contained in:
creations 2026-05-05 13:13:11 -04:00 • committed by GitHub
parent c5b8d2ee65
commit 0709012d78
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -96,8 +96,8 @@ export default definePlugin({
{
find: ",reactionRef:",
replacement: {
match: /(\i)\?null:\(0,\i\.jsx\)\(\i\.\i,{className:\i\.reactionCount,.*?}\),/,
replace: "$&$1?null:$self.renderUsers(this.props),"
match: /\(0,\i\.jsx\)\(\i\.\i,\{className:\i\.reactionCount,.{0,60}\}\),/,
replace: "$&$self.renderUsers(arguments[0]),"
}
},
{
@ -122,6 +122,7 @@ export default definePlugin({
},
renderUsers(props: RootObject) {
if (!props?.message || props.hideCount) return null;
return props.message.reactions.length > 10 ? null : (
<ErrorBoundary noop>
<this.UsersComponent {...props} />
@ -197,6 +198,7 @@ interface RootObject {
burst_me: boolean;
me: boolean;
type: number;
hideCount: boolean;
hideEmoji: boolean;
remainingBurstCurrency: number;
}