Compare commits

...

1 Commits

Author SHA1 Message Date
Lewis Crichton
64c7581286
feat(permissionfreewill): onboarding deletion 2023-10-03 17:46:17 +01:00
2 changed files with 16 additions and 0 deletions

@ -7,3 +7,8 @@ you don't want to do this") and onboarding requirements ("Making this change wil
This plugin will let you create permissions in servers that **WILL** lock you out of channels until an administrator This plugin will let you create permissions in servers that **WILL** lock you out of channels until an administrator
can resolve it for you. Please be careful with the overwrites you are making and check carefully. can resolve it for you. Please be careful with the overwrites you are making and check carefully.
## Community Server Channels
Community Server channels (i.e., `#rules` and `#moderator-only`) are actually mandatory and their existence is enforced
by the API, therefore this plugin cannot remove the restrictions behind them.

@ -50,6 +50,17 @@ export default definePlugin({
} }
], ],
predicate: () => settings.store.onboarding predicate: () => settings.store.onboarding
},
// Onboarding deletion
{
find: "Messages.DELETE_DEFAULT_CHANNEL_BODY",
replacement: [
{
match: /if\((?=null!=\i.{5,20}Messages.DELETE_DEFAULT_CHANNEL_BODY)/,
replace: "$&false&&"
}
],
predicate: () => settings.store.onboarding
} }
], ],
settings settings