From 36a3cbc94090669cd5254f73f95599194a356d60 Mon Sep 17 00:00:00 2001 From: Simon Date: Fri, 7 Oct 2022 21:17:54 +0200 Subject: [PATCH 1/5] feat(moderation): support channel mutes --- locales/en.json | 4 ++ modules/moderation/commands/moderate.js | 78 +++++++++++++++++++++++-- modules/moderation/configs/config.json | 8 +-- modules/moderation/configs/strings.json | 44 +++++++++++++- modules/moderation/moderationActions.js | 36 +++++++++++- 5 files changed, 157 insertions(+), 13 deletions(-) diff --git a/locales/en.json b/locales/en.json index 48b54b61..4ba0e037 100644 --- a/locales/en.json +++ b/locales/en.json @@ -531,6 +531,8 @@ "moderate-mute-command-description": "Mute a user on your server", "moderate-unmute-command-description": "Unmutes a user on your server", "moderate-warn-command-description": "Warn a user", + "moderate-channel-mute-description": "Mutes a user from the current channel", + "moderate-unchannel-mute-description": "Removes a channel-mute from this channel", "moderate-lock-command-description": "Lock the current channel", "moderate-unlock-command-description": "Unlock the current channel", "moderate-user-description": "User on who the action should get performed", @@ -552,6 +554,8 @@ "quarantine-audit-log-reason": "Got quarantined by %u because of \"%r\"", "kicked-audit-log-reason": "Got kicked by %u because of \"%r\"", "banned-audit-log-reason": "Got banned by %u because of \"%r\"", + "channelmute-audit-log-reason": "Got channel-mutet by %u of \"%r\"", + "unchannelmute-audit-log-reason": "The Channel-Mute got removed by %u of \"%r\"", "unbanned-audit-log-reason": "Got unbanned by %u because of \"%r\"", "unquarantine-audit-log-reason": "Got unquarantined by %u because of \"%r\"", "action-expired": "Action expired", diff --git a/modules/moderation/commands/moderate.js b/modules/moderation/commands/moderate.js index 3d6e4e84..c7627838 100644 --- a/modules/moderation/commands/moderate.js +++ b/modules/moderation/commands/moderate.js @@ -331,6 +331,32 @@ module.exports.subcommands = { interaction.reply({ephemeral: true, content: '⚠ ' + r}); }); }, + 'channel-mute': async function (interaction) { + if (interaction.replied) return; + if (!checkRoles(interaction, 2)) return; + moderationAction(interaction.client, 'channel-mute', interaction.member, interaction.memberToExecuteUpon, interaction.options.getString('reason'), {channel: interaction.channel}).then(r => { + if (r) interaction.reply({ + ephemeral: true, + content: localize('moderation', 'action-done', {i: r.actionID}) + }); + else interaction.reply({ephemeral: true, content: '⚠ ' + r}); + }).catch((r) => { + interaction.reply({ephemeral: true, content: '⚠ ' + r}); + }); + }, + 'remove-channel-mute': async function (interaction) { + if (interaction.replied) return; + if (!checkRoles(interaction, 2)) return; + moderationAction(interaction.client, 'unchannel-mute', interaction.member, interaction.memberToExecuteUpon, interaction.options.getString('reason'), {channel: interaction.channel}).then(r => { + if (r) interaction.reply({ + ephemeral: true, + content: localize('moderation', 'action-done', {i: r.actionID}) + }); + else interaction.reply({ephemeral: true, content: '⚠ ' + r}); + }).catch((r) => { + interaction.reply({ephemeral: true, content: '⚠ ' + r}); + }); + }, 'lock': async function (interaction) { if (interaction.replied) return; if (!checkRoles(interaction, 2)) return; @@ -783,12 +809,52 @@ module.exports.config = { required: true, description: localize('moderation', 'moderate-user-description') }, - { - type: 'STRING', - name: 'reason', - required: client.configurations['moderation']['config']['require_reason'], - description: localize('moderation', 'moderate-reason-description') - } + { + type: 'STRING', + name: 'reason', + required: client.configurations['moderation']['config']['require_reason'], + description: localize('moderation', 'moderate-reason-description') + } + ]; + } + }, + { + type: 'SUB_COMMAND', + name: 'channel-mute', + description: localize('moderation', 'moderate-channel-mute-description'), + options: function (client) { + return [{ + type: 'USER', + name: 'user', + required: true, + description: localize('moderation', 'moderate-user-description') + }, + { + type: 'STRING', + name: 'reason', + required: client.configurations['moderation']['config']['require_reason'], + description: localize('moderation', 'moderate-reason-description') + } + ]; + } + }, + { + type: 'SUB_COMMAND', + name: 'remove-channel-mute', + description: localize('moderation', 'moderate-unchannel-mute-description'), + options: function (client) { + return [{ + type: 'USER', + name: 'user', + required: true, + description: localize('moderation', 'moderate-user-description') + }, + { + type: 'STRING', + name: 'reason', + required: client.configurations['moderation']['config']['require_reason'], + description: localize('moderation', 'moderate-reason-description') + } ]; } }, diff --git a/modules/moderation/configs/config.json b/modules/moderation/configs/config.json index 80c07157..bf129bb7 100644 --- a/modules/moderation/configs/config.json +++ b/modules/moderation/configs/config.json @@ -56,7 +56,7 @@ "content": "roleID", "description": "ID of moderator roles that can perform the following actions: Warn", "humanname-de": "Moderator-Level 1", - "description-de": "ID der Rollen, die folgende Aktionen ausfhren können: Warn", + "description-de": "ID der Rollen, die folgende Aktionen ausführen können: Warn", "params-de": {}, "default-de": [] }, @@ -67,7 +67,7 @@ "content": "roleID", "description": "ID of moderator roles that can perform the following actions: Warn, Mute, Unmute", "humanname-de": "Moderator-Level 2", - "description-de": "ID der Rollen, die folgende Aktionen ausfhren können: Warn, Mute, Unmute", + "description-de": "ID der Rollen, die folgende Aktionen ausführen können: Warn, Mute, Unmute", "params-de": {}, "default-de": [] }, @@ -78,7 +78,7 @@ "content": "roleID", "description": "ID of moderator roles that can perform the following actions: Warn, Mute, Unmute, Kick, Clear", "humanname-de": "Moderator-Level 3", - "description-de": "ID der Rollen, die folgende Aktionen ausfhren können: Warn, Mute, Unmute, Kick, Clear", + "description-de": "ID der Rollen, die folgende Aktionen ausführen können: Warn, Mute, Unmute, Kick, Clear", "params-de": {}, "default-de": [] }, @@ -89,7 +89,7 @@ "content": "roleID", "description": "ID of moderator roles that can perform the following actions: Warn, Mute, Unmute, Kick, Clear, Ban, Unban", "humanname-de": "Moderator-Level 4", - "description-de": "ID der Rollen, die folgende Aktionen ausfhren können: Warn, Mute, Unmute, Kick, Clear, Ban, Unban", + "description-de": "ID der Rollen, die folgende Aktionen ausführen können: Warn, Mute, Unmute, Kick, Clear, Ban, Unban", "params-de": {}, "default-de": [] }, diff --git a/modules/moderation/configs/strings.json b/modules/moderation/configs/strings.json index c56f7c33..2350d6b5 100644 --- a/modules/moderation/configs/strings.json +++ b/modules/moderation/configs/strings.json @@ -93,6 +93,48 @@ "params-de": {}, "default-de": "You got muted for **%reason%** by %user%!" }, + { + "field_name": "channel_mute", + "default": "You got channel-muted from %channel% for **%reason%** by %user%!", + "type": "string", + "allowEmbed": true, + "description": "Message that gets send to a user when they got muted", + "params": [ + { + "name": "%user%", + "description": "Tag of the moderator" + }, + { + "name": "%reason%", + "description": "Reason of the mute" + }, + { + "name": "%channel%", + "description": "Channel from which the user got muted" + } + ] + }, + { + "field_name": "remove-channel_mute", + "default": "Your channel-mute from %channel% got removed because of **%reason%** by %user%!", + "type": "string", + "allowEmbed": true, + "description": "Message that gets send to a user when they got muted", + "params": [ + { + "name": "%user%", + "description": "Tag of the moderator" + }, + { + "name": "%reason%", + "description": "Reason of the mute" + }, + { + "name": "%channel%", + "description": "Channel from which the user got unmuted" + } + ] + }, { "field_name": "tmpmute_message", "default": "You got temporarily muted for **%reason%** by %user%! This action is going to expire on %date%.", @@ -333,4 +375,4 @@ "default-de": "This channel got unlocked by %user%" } ] -} +} \ No newline at end of file diff --git a/modules/moderation/moderationActions.js b/modules/moderation/moderationActions.js index 86cf5666..37ed7615 100644 --- a/modules/moderation/moderationActions.js +++ b/modules/moderation/moderationActions.js @@ -140,7 +140,8 @@ async function moderationAction(client, type, user, victim, reason, additionalDa '%reason%': reason, '%user%': user.user.tag, '%date%': expiringAt ? formatDate(expiringAt) : null - })).catch(() => {}); + })).catch(() => { + }); if (victim.bannable) await victim.ban({ days: additionalData.days || 0, reason: '[moderation] ' + localize('moderation', 'banned-audit-log-reason', { @@ -154,7 +155,10 @@ async function moderationAction(client, type, user, victim, reason, additionalDa victim.user.id = victim.id; await guild.members.ban(victim.id, { days: additionalData.days || 0, - reason: `[moderation] Got banned by ${user.user.tag} because of "${reason}"` + reason: '[moderation] ' + localize('moderation', 'banned-audit-log-reason', { + u: user.user.tag, + r: reason + }) }); } break; @@ -176,6 +180,34 @@ async function moderationAction(client, type, user, victim, reason, additionalDa await moderationAction(client, moduleConfig['automod'][warns.length + 1].split(':')[0], {user: client.user}, victim, `[${localize('moderation', 'auto-mod')}]: ${localize('moderation', 'reached-warns', {w: warns.length + 1})}`, {roles: roles}, moduleConfig['automod'][warns.length + 1].includes(':') ? new Date(new Date().getTime() + durationParser(moduleConfig['automod'][warns.length + 1].split(':')[1])) : null); } break; + case 'channel-mute': + await additionalData.channel.permissionOverwrites.edit(victim, {SEND_MESSAGES: false}, { + reason: '[moderation] ' + localize('moderation', 'channelmute-audit-log-reason', { + u: user.user.tag, + r: reason + }) + }); + await victim.send(embedType(moduleStrings['channel_mute'], { + '%reason%': reason, + '%user%': user.user.tag, + '%channel%': additionalData.channel.toString() + })).catch(() => { + }); + break; + case 'unchannel-mute': + await additionalData.channel.permissionOverwrites.delete(victim, { + reason: '[moderation] ' + localize('moderation', 'unchannelmute-audit-log-reason', { + u: user.user.tag, + r: reason + }) + }); + await victim.send(embedType(moduleStrings['remove-channel_mute'], { + '%reason%': reason, + '%user%': user.user.tag, + '%channel%': additionalData.channel.toString() + })).catch(() => { + }); + break; case 'unwarn': break; case 'unban': From 1b386d519907dae6f726801fcbe2db5f1f6107d4 Mon Sep 17 00:00:00 2001 From: Simon Date: Fri, 7 Oct 2022 21:21:15 +0200 Subject: [PATCH 2/5] fix(moderation): fixed style --- modules/moderation/commands/moderate.js | 36 ++++++++++++------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/modules/moderation/commands/moderate.js b/modules/moderation/commands/moderate.js index c7627838..4ef3070b 100644 --- a/modules/moderation/commands/moderate.js +++ b/modules/moderation/commands/moderate.js @@ -809,12 +809,12 @@ module.exports.config = { required: true, description: localize('moderation', 'moderate-user-description') }, - { - type: 'STRING', - name: 'reason', - required: client.configurations['moderation']['config']['require_reason'], - description: localize('moderation', 'moderate-reason-description') - } + { + type: 'STRING', + name: 'reason', + required: client.configurations['moderation']['config']['require_reason'], + description: localize('moderation', 'moderate-reason-description') + } ]; } }, @@ -829,12 +829,12 @@ module.exports.config = { required: true, description: localize('moderation', 'moderate-user-description') }, - { - type: 'STRING', - name: 'reason', - required: client.configurations['moderation']['config']['require_reason'], - description: localize('moderation', 'moderate-reason-description') - } + { + type: 'STRING', + name: 'reason', + required: client.configurations['moderation']['config']['require_reason'], + description: localize('moderation', 'moderate-reason-description') + } ]; } }, @@ -849,12 +849,12 @@ module.exports.config = { required: true, description: localize('moderation', 'moderate-user-description') }, - { - type: 'STRING', - name: 'reason', - required: client.configurations['moderation']['config']['require_reason'], - description: localize('moderation', 'moderate-reason-description') - } + { + type: 'STRING', + name: 'reason', + required: client.configurations['moderation']['config']['require_reason'], + description: localize('moderation', 'moderate-reason-description') + } ]; } }, From 15f2a771f84cb9e645ffd4a14872192d11549ff7 Mon Sep 17 00:00:00 2001 From: Simon Date: Fri, 7 Oct 2022 21:17:54 +0200 Subject: [PATCH 3/5] feat(moderation): support channel mutes --- locales/en.json | 4 ++ modules/moderation/commands/moderate.js | 78 +++++++++++++++++++++++-- modules/moderation/configs/config.json | 8 +-- modules/moderation/configs/strings.json | 44 +++++++++++++- modules/moderation/moderationActions.js | 36 +++++++++++- 5 files changed, 157 insertions(+), 13 deletions(-) diff --git a/locales/en.json b/locales/en.json index 48b54b61..4ba0e037 100644 --- a/locales/en.json +++ b/locales/en.json @@ -531,6 +531,8 @@ "moderate-mute-command-description": "Mute a user on your server", "moderate-unmute-command-description": "Unmutes a user on your server", "moderate-warn-command-description": "Warn a user", + "moderate-channel-mute-description": "Mutes a user from the current channel", + "moderate-unchannel-mute-description": "Removes a channel-mute from this channel", "moderate-lock-command-description": "Lock the current channel", "moderate-unlock-command-description": "Unlock the current channel", "moderate-user-description": "User on who the action should get performed", @@ -552,6 +554,8 @@ "quarantine-audit-log-reason": "Got quarantined by %u because of \"%r\"", "kicked-audit-log-reason": "Got kicked by %u because of \"%r\"", "banned-audit-log-reason": "Got banned by %u because of \"%r\"", + "channelmute-audit-log-reason": "Got channel-mutet by %u of \"%r\"", + "unchannelmute-audit-log-reason": "The Channel-Mute got removed by %u of \"%r\"", "unbanned-audit-log-reason": "Got unbanned by %u because of \"%r\"", "unquarantine-audit-log-reason": "Got unquarantined by %u because of \"%r\"", "action-expired": "Action expired", diff --git a/modules/moderation/commands/moderate.js b/modules/moderation/commands/moderate.js index 3d6e4e84..c7627838 100644 --- a/modules/moderation/commands/moderate.js +++ b/modules/moderation/commands/moderate.js @@ -331,6 +331,32 @@ module.exports.subcommands = { interaction.reply({ephemeral: true, content: '⚠ ' + r}); }); }, + 'channel-mute': async function (interaction) { + if (interaction.replied) return; + if (!checkRoles(interaction, 2)) return; + moderationAction(interaction.client, 'channel-mute', interaction.member, interaction.memberToExecuteUpon, interaction.options.getString('reason'), {channel: interaction.channel}).then(r => { + if (r) interaction.reply({ + ephemeral: true, + content: localize('moderation', 'action-done', {i: r.actionID}) + }); + else interaction.reply({ephemeral: true, content: '⚠ ' + r}); + }).catch((r) => { + interaction.reply({ephemeral: true, content: '⚠ ' + r}); + }); + }, + 'remove-channel-mute': async function (interaction) { + if (interaction.replied) return; + if (!checkRoles(interaction, 2)) return; + moderationAction(interaction.client, 'unchannel-mute', interaction.member, interaction.memberToExecuteUpon, interaction.options.getString('reason'), {channel: interaction.channel}).then(r => { + if (r) interaction.reply({ + ephemeral: true, + content: localize('moderation', 'action-done', {i: r.actionID}) + }); + else interaction.reply({ephemeral: true, content: '⚠ ' + r}); + }).catch((r) => { + interaction.reply({ephemeral: true, content: '⚠ ' + r}); + }); + }, 'lock': async function (interaction) { if (interaction.replied) return; if (!checkRoles(interaction, 2)) return; @@ -783,12 +809,52 @@ module.exports.config = { required: true, description: localize('moderation', 'moderate-user-description') }, - { - type: 'STRING', - name: 'reason', - required: client.configurations['moderation']['config']['require_reason'], - description: localize('moderation', 'moderate-reason-description') - } + { + type: 'STRING', + name: 'reason', + required: client.configurations['moderation']['config']['require_reason'], + description: localize('moderation', 'moderate-reason-description') + } + ]; + } + }, + { + type: 'SUB_COMMAND', + name: 'channel-mute', + description: localize('moderation', 'moderate-channel-mute-description'), + options: function (client) { + return [{ + type: 'USER', + name: 'user', + required: true, + description: localize('moderation', 'moderate-user-description') + }, + { + type: 'STRING', + name: 'reason', + required: client.configurations['moderation']['config']['require_reason'], + description: localize('moderation', 'moderate-reason-description') + } + ]; + } + }, + { + type: 'SUB_COMMAND', + name: 'remove-channel-mute', + description: localize('moderation', 'moderate-unchannel-mute-description'), + options: function (client) { + return [{ + type: 'USER', + name: 'user', + required: true, + description: localize('moderation', 'moderate-user-description') + }, + { + type: 'STRING', + name: 'reason', + required: client.configurations['moderation']['config']['require_reason'], + description: localize('moderation', 'moderate-reason-description') + } ]; } }, diff --git a/modules/moderation/configs/config.json b/modules/moderation/configs/config.json index 80c07157..bf129bb7 100644 --- a/modules/moderation/configs/config.json +++ b/modules/moderation/configs/config.json @@ -56,7 +56,7 @@ "content": "roleID", "description": "ID of moderator roles that can perform the following actions: Warn", "humanname-de": "Moderator-Level 1", - "description-de": "ID der Rollen, die folgende Aktionen ausfhren können: Warn", + "description-de": "ID der Rollen, die folgende Aktionen ausführen können: Warn", "params-de": {}, "default-de": [] }, @@ -67,7 +67,7 @@ "content": "roleID", "description": "ID of moderator roles that can perform the following actions: Warn, Mute, Unmute", "humanname-de": "Moderator-Level 2", - "description-de": "ID der Rollen, die folgende Aktionen ausfhren können: Warn, Mute, Unmute", + "description-de": "ID der Rollen, die folgende Aktionen ausführen können: Warn, Mute, Unmute", "params-de": {}, "default-de": [] }, @@ -78,7 +78,7 @@ "content": "roleID", "description": "ID of moderator roles that can perform the following actions: Warn, Mute, Unmute, Kick, Clear", "humanname-de": "Moderator-Level 3", - "description-de": "ID der Rollen, die folgende Aktionen ausfhren können: Warn, Mute, Unmute, Kick, Clear", + "description-de": "ID der Rollen, die folgende Aktionen ausführen können: Warn, Mute, Unmute, Kick, Clear", "params-de": {}, "default-de": [] }, @@ -89,7 +89,7 @@ "content": "roleID", "description": "ID of moderator roles that can perform the following actions: Warn, Mute, Unmute, Kick, Clear, Ban, Unban", "humanname-de": "Moderator-Level 4", - "description-de": "ID der Rollen, die folgende Aktionen ausfhren können: Warn, Mute, Unmute, Kick, Clear, Ban, Unban", + "description-de": "ID der Rollen, die folgende Aktionen ausführen können: Warn, Mute, Unmute, Kick, Clear, Ban, Unban", "params-de": {}, "default-de": [] }, diff --git a/modules/moderation/configs/strings.json b/modules/moderation/configs/strings.json index c56f7c33..2350d6b5 100644 --- a/modules/moderation/configs/strings.json +++ b/modules/moderation/configs/strings.json @@ -93,6 +93,48 @@ "params-de": {}, "default-de": "You got muted for **%reason%** by %user%!" }, + { + "field_name": "channel_mute", + "default": "You got channel-muted from %channel% for **%reason%** by %user%!", + "type": "string", + "allowEmbed": true, + "description": "Message that gets send to a user when they got muted", + "params": [ + { + "name": "%user%", + "description": "Tag of the moderator" + }, + { + "name": "%reason%", + "description": "Reason of the mute" + }, + { + "name": "%channel%", + "description": "Channel from which the user got muted" + } + ] + }, + { + "field_name": "remove-channel_mute", + "default": "Your channel-mute from %channel% got removed because of **%reason%** by %user%!", + "type": "string", + "allowEmbed": true, + "description": "Message that gets send to a user when they got muted", + "params": [ + { + "name": "%user%", + "description": "Tag of the moderator" + }, + { + "name": "%reason%", + "description": "Reason of the mute" + }, + { + "name": "%channel%", + "description": "Channel from which the user got unmuted" + } + ] + }, { "field_name": "tmpmute_message", "default": "You got temporarily muted for **%reason%** by %user%! This action is going to expire on %date%.", @@ -333,4 +375,4 @@ "default-de": "This channel got unlocked by %user%" } ] -} +} \ No newline at end of file diff --git a/modules/moderation/moderationActions.js b/modules/moderation/moderationActions.js index 86cf5666..37ed7615 100644 --- a/modules/moderation/moderationActions.js +++ b/modules/moderation/moderationActions.js @@ -140,7 +140,8 @@ async function moderationAction(client, type, user, victim, reason, additionalDa '%reason%': reason, '%user%': user.user.tag, '%date%': expiringAt ? formatDate(expiringAt) : null - })).catch(() => {}); + })).catch(() => { + }); if (victim.bannable) await victim.ban({ days: additionalData.days || 0, reason: '[moderation] ' + localize('moderation', 'banned-audit-log-reason', { @@ -154,7 +155,10 @@ async function moderationAction(client, type, user, victim, reason, additionalDa victim.user.id = victim.id; await guild.members.ban(victim.id, { days: additionalData.days || 0, - reason: `[moderation] Got banned by ${user.user.tag} because of "${reason}"` + reason: '[moderation] ' + localize('moderation', 'banned-audit-log-reason', { + u: user.user.tag, + r: reason + }) }); } break; @@ -176,6 +180,34 @@ async function moderationAction(client, type, user, victim, reason, additionalDa await moderationAction(client, moduleConfig['automod'][warns.length + 1].split(':')[0], {user: client.user}, victim, `[${localize('moderation', 'auto-mod')}]: ${localize('moderation', 'reached-warns', {w: warns.length + 1})}`, {roles: roles}, moduleConfig['automod'][warns.length + 1].includes(':') ? new Date(new Date().getTime() + durationParser(moduleConfig['automod'][warns.length + 1].split(':')[1])) : null); } break; + case 'channel-mute': + await additionalData.channel.permissionOverwrites.edit(victim, {SEND_MESSAGES: false}, { + reason: '[moderation] ' + localize('moderation', 'channelmute-audit-log-reason', { + u: user.user.tag, + r: reason + }) + }); + await victim.send(embedType(moduleStrings['channel_mute'], { + '%reason%': reason, + '%user%': user.user.tag, + '%channel%': additionalData.channel.toString() + })).catch(() => { + }); + break; + case 'unchannel-mute': + await additionalData.channel.permissionOverwrites.delete(victim, { + reason: '[moderation] ' + localize('moderation', 'unchannelmute-audit-log-reason', { + u: user.user.tag, + r: reason + }) + }); + await victim.send(embedType(moduleStrings['remove-channel_mute'], { + '%reason%': reason, + '%user%': user.user.tag, + '%channel%': additionalData.channel.toString() + })).catch(() => { + }); + break; case 'unwarn': break; case 'unban': From 2de3dc0e25752cd6e316ed0bcf99fd396f11aa58 Mon Sep 17 00:00:00 2001 From: Simon Date: Fri, 7 Oct 2022 21:21:15 +0200 Subject: [PATCH 4/5] fix(moderation): fixed style --- modules/moderation/commands/moderate.js | 36 ++++++++++++------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/modules/moderation/commands/moderate.js b/modules/moderation/commands/moderate.js index c7627838..4ef3070b 100644 --- a/modules/moderation/commands/moderate.js +++ b/modules/moderation/commands/moderate.js @@ -809,12 +809,12 @@ module.exports.config = { required: true, description: localize('moderation', 'moderate-user-description') }, - { - type: 'STRING', - name: 'reason', - required: client.configurations['moderation']['config']['require_reason'], - description: localize('moderation', 'moderate-reason-description') - } + { + type: 'STRING', + name: 'reason', + required: client.configurations['moderation']['config']['require_reason'], + description: localize('moderation', 'moderate-reason-description') + } ]; } }, @@ -829,12 +829,12 @@ module.exports.config = { required: true, description: localize('moderation', 'moderate-user-description') }, - { - type: 'STRING', - name: 'reason', - required: client.configurations['moderation']['config']['require_reason'], - description: localize('moderation', 'moderate-reason-description') - } + { + type: 'STRING', + name: 'reason', + required: client.configurations['moderation']['config']['require_reason'], + description: localize('moderation', 'moderate-reason-description') + } ]; } }, @@ -849,12 +849,12 @@ module.exports.config = { required: true, description: localize('moderation', 'moderate-user-description') }, - { - type: 'STRING', - name: 'reason', - required: client.configurations['moderation']['config']['require_reason'], - description: localize('moderation', 'moderate-reason-description') - } + { + type: 'STRING', + name: 'reason', + required: client.configurations['moderation']['config']['require_reason'], + description: localize('moderation', 'moderate-reason-description') + } ]; } }, From 2b3b654772a32d20c05103385505dd133f19d0ec Mon Sep 17 00:00:00 2001 From: Simon Date: Fri, 7 Oct 2022 21:26:30 +0200 Subject: [PATCH 5/5] fix(workflow): only check on pr (no more direct pushing) --- .github/workflows/eslint.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/eslint.yml b/.github/workflows/eslint.yml index 4dcf8256..4103fcce 100644 --- a/.github/workflows/eslint.yml +++ b/.github/workflows/eslint.yml @@ -1,7 +1,6 @@ name: Check style on: - push: pull_request: workflow_dispatch: