mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-09 06:33:03 -04:00
add color to "replying to {user}" (#228)
Some checks are pending
Test / Test (push) Waiting to run
Some checks are pending
Test / Test (push) Waiting to run
This commit is contained in:
parent
cf7dc5522d
commit
f858a745a6
1 changed files with 13 additions and 1 deletions
|
@ -125,6 +125,13 @@ export default definePlugin({
|
||||||
],
|
],
|
||||||
predicate: () => settings.store.dmList,
|
predicate: () => settings.store.dmList,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
find: '"Reply Chain Nudge")',
|
||||||
|
replacement: {
|
||||||
|
match: /(,color:)(\i),/,
|
||||||
|
replace: "$1$self.colorInReplyingTo(arguments[0]) ?? $2,",
|
||||||
|
},
|
||||||
|
},
|
||||||
],
|
],
|
||||||
|
|
||||||
colorDMList(a: any): string | undefined {
|
colorDMList(a: any): string | undefined {
|
||||||
|
@ -142,5 +149,10 @@ export default definePlugin({
|
||||||
|
|
||||||
const color = getCustomColorString(a.message.author.id, true);
|
const color = getCustomColorString(a.message.author.id, true);
|
||||||
return color ?? roleColor ?? undefined;
|
return color ?? roleColor ?? undefined;
|
||||||
}
|
},
|
||||||
|
|
||||||
|
colorInReplyingTo(a: any) {
|
||||||
|
const { id } = a.reply.message.author;
|
||||||
|
return getCustomColorString(id, true);
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue