diff --git a/structure/client/components/commands/moderation/Case.js b/structure/client/components/commands/moderation/Case.js index 1c8378d..29b0951 100644 --- a/structure/client/components/commands/moderation/Case.js +++ b/structure/client/components/commands/moderation/Case.js @@ -21,7 +21,7 @@ class CaseCommand extends Command { types: ['FLAG'] }, { - name: 'raw', + name: 'export', type: 'BOOLEAN', types: ['FLAG'] }, @@ -55,7 +55,7 @@ class CaseCommand extends Command { }); if (!infraction) return message.formattedRespond('C_CASE_NOTFOUND', { params: { caseID } }); - if (args.raw) return message.respond(`\`\`\`js\n${inspect(infraction)}\n\`\`\``); + if (args.export) return message.respond(`\`\`\`js\n${inspect(infraction)}\n\`\`\``); if (args.changes) return message.embed(await this._listChanges(message, infraction)); const target = infraction.targetType === 'USER' ? await this.client.resolver.resolveUser(infraction.target) : await guild.resolveChannel(infraction.target); diff --git a/structure/client/components/commands/moderation/History.js b/structure/client/components/commands/moderation/History.js index 65ab7ab..119630e 100644 --- a/structure/client/components/commands/moderation/History.js +++ b/structure/client/components/commands/moderation/History.js @@ -59,6 +59,7 @@ class HistoryCommand extends Command { }, { name: 'pagesize', + usage: '<1-10>', type: 'INTEGER', types: ['FLAG'], required: true, diff --git a/structure/language/languages/en_us/en_us_arguments.lang b/structure/language/languages/en_us/en_us_arguments.lang index 900a23b..d4734c7 100644 --- a/structure/language/languages/en_us/en_us_arguments.lang +++ b/structure/language/languages/en_us/en_us_arguments.lang @@ -41,6 +41,20 @@ Hides the evaluation from public view. //Moderation Module +//Case Command +[A_VERBOSE_CASE_DESCRIPTION] +Displays more detailed information of the provided case. + +[A_EXPORT_CASE_DESCRIPTION] +Export a JSON file of the provided case. + +[A_CHANGES_CASE_DESCRIPTION] +Displays the changes made to the provided case. + +//Addrole Command +[A_SILENT_ADDROLE_DESCRIPTION] +Deletes the command message and the execution message. + //Note Command [A_SILENT_NOTE_DESCRIPTION] Deletes the command message and the execution message. @@ -202,7 +216,41 @@ Search history only containing certain infraction types. Sort history by oldest. [A_VERBOSE_HISTORY_DESCRIPTION] -Display user IDs. +Displays IDs. + +[A_PAGESIZE_HISTORY_DESCRIPTION] +Determines how many results will be shown on one page. + +[A_EXPORT_HISTORY_DESCRIPTION] +Export a JSON file of the results. + +[A_PRIVATE_HISTORY_DESCRIPTION] +Send the results to your direct messages. + +//Nickname Command + +[A_SILENT_NICKNAME_DESCRIPTION] +Deletes the command message and the execution message. + +[A_POINTS_NICKNAME_DESCRIPTION] +Assign moderation points to the user. + +[A_EXPIRATION_NICKNAME_DESCRIPTION] +Assign a duration for the moderation points to expire. + +[A_FORCE_NICKNAME_DESCRIPTION] +Bypasses the moderation point escalation. + +[A_PRUNE_NICKNAME_DESCRIPTION] +Removes messages from the user. + +//Removerole Command +[A_SILENT_REMOVEROLE_DESCRIPTION] +Deletes the command message and the execution message. + +//Slowmode Command +[A_SILENT_SLOWMODE_DESCRIPTION] +Deletes the command message and the execution message. //Settings Arguments diff --git a/structure/language/languages/en_us/en_us_commands.lang b/structure/language/languages/en_us/en_us_commands.lang index 49413db..7ef4a44 100644 --- a/structure/language/languages/en_us/en_us_commands.lang +++ b/structure/language/languages/en_us/en_us_commands.lang @@ -349,6 +349,9 @@ I had issues deleting those messages [C_VCKICK_DESCRIPTION] Kick provided members from their connected voice-channel. +[C_VCKICK_MISSINGMEMBERS] +You must provide members to voice kick. + [C_VCKICK_INSUFFICIENTPERMISSIONS] I don't have permission to move members diff --git a/structure/moderation/infractions/Ban.js b/structure/moderation/infractions/Ban.js index 4b9505a..88bff1a 100644 --- a/structure/moderation/infractions/Ban.js +++ b/structure/moderation/infractions/Ban.js @@ -58,7 +58,7 @@ class BanInfraction extends Infraction { async verify() { - if(this.member instanceof GuildMember) { + if(this.target instanceof GuildMember) { if(!this.member.bannable) return super._fail('C_BAN_CANNOTBEBANNED'); } diff --git a/structure/moderation/infractions/Softban.js b/structure/moderation/infractions/Softban.js index 4e89e84..0e56629 100644 --- a/structure/moderation/infractions/Softban.js +++ b/structure/moderation/infractions/Softban.js @@ -22,8 +22,6 @@ class SoftbanInfraction extends Infraction { }); this.client = client; - this.member = opts.target; - } async execute() { @@ -48,8 +46,8 @@ class SoftbanInfraction extends Infraction { verify() { - if(this.member instanceof GuildMember) { - if(!this.member.bannable) return this._fail('C_SOFTBAN_CANNOTBESOFTBANNED'); + if(this.target instanceof GuildMember) { + if(!this.target.bannable) return this._fail('C_SOFTBAN_CANNOTBESOFTBANNED'); } return super._verify(); diff --git a/structure/moderation/interfaces/Infraction.js b/structure/moderation/interfaces/Infraction.js index fa9bd14..1fd71a8 100644 --- a/structure/moderation/interfaces/Infraction.js +++ b/structure/moderation/interfaces/Infraction.js @@ -271,8 +271,8 @@ class Infraction { const { protection } = await this.guild.settings(); if (this.executor.id === this.guild.ownerID) return this._succeed(); if (this.guild && protection.enabled && this.targetType === 'USER') { - const executor = await this.guild.members.fetch(this.executor.id).catch(); - const target = await this.guild.members.fetch(this.target.id).catch(); + const executor = await this.guild.members.fetch(this.executor.id).catch(() => {}); //eslint-disable-line no-empty-function + const target = await this.guild.members.fetch(this.target.id).catch(() => {}); //eslint-disable-line no-empty-function if (!target) return this._succeed(); if(protection.type === 'position') { const executorHighest = executor.roles.highest;