forked from Galactic/galactic-bot
Fix issue with softbanning people outside of the guild, add missing locale entries.
This commit is contained in:
parent
133173fbb0
commit
e35a7f4356
@ -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);
|
||||
|
@ -59,6 +59,7 @@ class HistoryCommand extends Command {
|
||||
},
|
||||
{
|
||||
name: 'pagesize',
|
||||
usage: '<1-10>',
|
||||
type: 'INTEGER',
|
||||
types: ['FLAG'],
|
||||
required: true,
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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');
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user