Fix grammar and SHC patches matching wrong var (#636)
This commit is contained in:
parent
586b26d2d4
commit
6f200e9218
|
@ -68,7 +68,7 @@ interface FindData {
|
||||||
|
|
||||||
const settings = definePluginSettings({
|
const settings = definePluginSettings({
|
||||||
notifyOnAutoConnect: {
|
notifyOnAutoConnect: {
|
||||||
description: "Wheter to notify when Dev Companion has automatically connected.",
|
description: "Whether to notify when Dev Companion has automatically connected.",
|
||||||
type: OptionType.BOOLEAN,
|
type: OptionType.BOOLEAN,
|
||||||
default: true
|
default: true
|
||||||
}
|
}
|
||||||
|
|
|
@ -246,18 +246,18 @@ export default definePlugin({
|
||||||
find: ".Messages.ROLE_REQUIRED_SINGLE_USER_MESSAGE",
|
find: ".Messages.ROLE_REQUIRED_SINGLE_USER_MESSAGE",
|
||||||
replacement: [
|
replacement: [
|
||||||
{
|
{
|
||||||
// Export the channel beggining header
|
// Export the channel beginning header
|
||||||
match: /computePermissionsForRoles.+?}\)}(?<=function (\i)\(.+?)(?=var)/,
|
match: /computePermissionsForRoles.+?}\)}(?<=function (\i)\(.+?)(?=var)/,
|
||||||
replace: (m, component) => `${m}$self.setChannelBeginHeaderComponent(${component});`
|
replace: (m, component) => `${m}$self.setChannelBeginHeaderComponent(${component});`
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// Change the role permission check to CONNECT if the channel is locked
|
// Change the role permission check to CONNECT if the channel is locked
|
||||||
match: /ADMINISTRATOR\)\|\|(?=(.+?\((\i),\i\.\i\.)VIEW_CHANNEL)/,
|
match: /ADMINISTRATOR\)\|\|(?<=context:(\i)}.+?)(?=(.+?)VIEW_CHANNEL)/,
|
||||||
replace: (m, permCheck, channel) => `${m}!Vencord.Webpack.Common.PermissionStore.can(${CONNECT}n,${channel})?${permCheck}CONNECT):`
|
replace: (m, channel, permCheck) => `${m}!Vencord.Webpack.Common.PermissionStore.can(${CONNECT}n,${channel})?${permCheck}CONNECT):`
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// Change the permissionOverwrite check to CONNECT if the channel is locked
|
// Change the permissionOverwrite check to CONNECT if the channel is locked
|
||||||
match: /permissionOverwrites\[.+?\?(\i):.+?\i=(?=(.+?)VIEW_CHANNEL)/,
|
match: /permissionOverwrites\[.+?\i=(?<=context:(\i)}.+?)(?=(.+?)VIEW_CHANNEL)/,
|
||||||
replace: (m, channel, permCheck) => `${m}!Vencord.Webpack.Common.PermissionStore.can(${CONNECT}n,${channel})?${permCheck}CONNECT):`
|
replace: (m, channel, permCheck) => `${m}!Vencord.Webpack.Common.PermissionStore.can(${CONNECT}n,${channel})?${permCheck}CONNECT):`
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue