Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typo correction #224

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions backend/src/plugins/Automod/actions/mute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const MuteAction = automodAction({
notify: tNullable(t.string),
notifyChannel: tNullable(t.string),
remove_roles_on_mute: tNullable(t.union([t.boolean, t.array(t.string)])),
restore_roles_on_mute: tNullable(t.union([t.boolean, t.array(t.string)])),
restore_roles_on_unmute: tNullable(t.union([t.boolean, t.array(t.string)])),
postInCaseLog: tNullable(t.boolean),
hide_case: tNullable(t.boolean),
}),
Expand All @@ -39,7 +39,7 @@ export const MuteAction = automodAction({
const reason = actionConfig.reason || "Muted automatically";
const contactMethods = actionConfig.notify ? resolveActionContactMethods(pluginData, actionConfig) : undefined;
const rolesToRemove = actionConfig.remove_roles_on_mute;
const rolesToRestore = actionConfig.restore_roles_on_mute;
const rolesToRestore = actionConfig.restore_roles_on_unmute;

const caseArgs: Partial<CaseArgs> = {
modId: pluginData.client.user.id,
Expand Down
2 changes: 1 addition & 1 deletion backend/src/plugins/Mutes/MutesPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const defaultOptions = {
timed_mute_message: "You have been muted on the {guildName} server for {time}. Reason given: {reason}",
update_mute_message: "Your mute on the {guildName} server has been updated to {time}.",
remove_roles_on_mute: false,
restore_roles_on_mute: false,
restore_roles_on_unmute: false,

can_view_list: false,
can_cleanup: false,
Expand Down
2 changes: 1 addition & 1 deletion backend/src/plugins/Mutes/functions/muteUser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export async function muteUser(
const currentUserRoles = member.roles;
const memberOptions: MemberOptions = {};
const removeRoles = removeRolesOnMuteOverride ?? config.remove_roles_on_mute;
const restoreRoles = restoreRolesOnMuteOverride ?? config.restore_roles_on_mute;
const restoreRoles = restoreRolesOnMuteOverride ?? config.restore_roles_on_unmute;

// remove roles
if (!Array.isArray(removeRoles)) {
Expand Down
2 changes: 1 addition & 1 deletion backend/src/plugins/Mutes/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const ConfigSchema = t.type({
timed_mute_message: tNullable(t.string),
update_mute_message: tNullable(t.string),
remove_roles_on_mute: t.union([t.boolean, t.array(t.string)]),
restore_roles_on_mute: t.union([t.boolean, t.array(t.string)]),
restore_roles_on_unmute: t.union([t.boolean, t.array(t.string)]),

can_view_list: t.boolean,
can_cleanup: t.boolean,
Expand Down
2 changes: 1 addition & 1 deletion backend/src/plugins/Spam/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const BaseSingleSpamConfig = t.type({
mute: tNullable(t.boolean),
mute_time: tNullable(t.number),
remove_roles_on_mute: tNullable(t.union([t.boolean, t.array(t.string)])),
restore_roles_on_mute: tNullable(t.union([t.boolean, t.array(t.string)])),
restore_roles_on_unmute: tNullable(t.union([t.boolean, t.array(t.string)])),
clean: tNullable(t.boolean),
});
export type TBaseSingleSpamConfig = t.TypeOf<typeof BaseSingleSpamConfig>;
Expand Down
2 changes: 1 addition & 1 deletion backend/src/plugins/Spam/util/logAndDetectMessageSpam.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export async function logAndDetectMessageSpam(
},
},
spamConfig.remove_roles_on_mute,
spamConfig.restore_roles_on_mute,
spamConfig.restore_roles_on_unmute,
);
} catch (e) {
if (e instanceof RecoverablePluginError && e.code === ERRORS.NO_MUTE_ROLE_IN_CONFIG) {
Expand Down
2 changes: 1 addition & 1 deletion backend/src/plugins/Spam/util/logAndDetectOtherSpam.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export async function logAndDetectOtherSpam(
},
},
spamConfig.remove_roles_on_mute,
spamConfig.restore_roles_on_mute,
spamConfig.restore_roles_on_unmute,
);
} catch (e) {
if (e instanceof RecoverablePluginError && e.code === ERRORS.NO_MUTE_ROLE_IN_CONFIG) {
Expand Down
2 changes: 1 addition & 1 deletion dashboard/src/components/docs/Counters.vue
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
mute:
reason: "You have been muted for tripping too many automod filters"
remove_roles_on_mute: true
restore_roles_on_mute: true
restore_roles_on_unmute: true
</CodeBlock>
</template>
</Expandable>
Expand Down