EquicordHelper: add ability to force role icons in compact mode (#625)
* EquicordHelper: add ability to force role icons in compact mode * Add Hook --------- Co-authored-by: thororen1234 <78185467+thororen1234@users.noreply.github.com>
This commit is contained in:
parent
bb927f8de8
commit
0c2f5cf7d5
1 changed files with 16 additions and 1 deletions
|
|
@ -53,13 +53,19 @@ const settings = definePluginSettings({
|
|||
type: OptionType.BOOLEAN,
|
||||
description: "Refreshes Slash Commands to show newly added commands without restarting your client.",
|
||||
default: false,
|
||||
},
|
||||
forceRoleIcon: {
|
||||
type: OptionType.BOOLEAN,
|
||||
description: "Forces role icons to display next to messages in compact mode",
|
||||
restartNeeded: true,
|
||||
default: false
|
||||
}
|
||||
});
|
||||
|
||||
export default definePlugin({
|
||||
name: "EquicordHelper",
|
||||
description: "Used to provide support, fix discord caused crashes, and other misc features.",
|
||||
authors: [Devs.thororen, EquicordDevs.nyx, EquicordDevs.Naibuu, EquicordDevs.keyages, EquicordDevs.SerStars],
|
||||
authors: [Devs.thororen, EquicordDevs.nyx, EquicordDevs.Naibuu, EquicordDevs.keyages, EquicordDevs.SerStars, EquicordDevs.mart],
|
||||
required: true,
|
||||
settings,
|
||||
patches: [
|
||||
|
|
@ -154,6 +160,15 @@ export default definePlugin({
|
|||
},
|
||||
]
|
||||
})),
|
||||
// Force Role Icon
|
||||
{
|
||||
find: "Message Username",
|
||||
predicate: () => settings.store.forceRoleIcon,
|
||||
replacement: {
|
||||
match: /(?<=\.badgesContainer.{0,150}\?2:)0(?=\})/,
|
||||
replace: "1"
|
||||
}
|
||||
},
|
||||
],
|
||||
renderMessageAccessory(props) {
|
||||
return (
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue