mirror of
https://github.com/Vendicated/Vencord
synced 2024-09-13 04:29:24 -04:00
get settings directly from patches
thanks @scyye Co-authored-by: Scyye <97131358+Scyye@users.noreply.github.com>
This commit is contained in:
parent
0b68ec0cde
commit
70fefa78ce
1 changed files with 4 additions and 8 deletions
|
@ -54,21 +54,17 @@ export default definePlugin({
|
|||
replacement: [
|
||||
{
|
||||
match: /maxAge:null!==\(\i=null!=\i\?\i:\i\)&&void 0!==\i\?\i:\i.value/,
|
||||
replace: "maxAge:$self.getDuration()"
|
||||
replace: "maxAge:$self.settings.store.inviteDuration"
|
||||
},
|
||||
{
|
||||
match: /maxUses:null!=\i&&0!==\i\?\i:\i.value/,
|
||||
replace: "maxUses:$self.getMaxUses()"
|
||||
replace: "maxUses:$self.settings.store.maxUses"
|
||||
},
|
||||
{
|
||||
match: /temporary:null!=\i&&\i/,
|
||||
replace: "temporary:$self.getTemporary()"
|
||||
replace: "temporary:$self.settings.store.temporaryMembership"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
getDuration: () => settings.store.inviteDuration,
|
||||
getMaxUses: () => settings.store.maxUses,
|
||||
getTemporary: () => settings.store.temporaryMembership
|
||||
]
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue