fix: Updated sending in checks for validation runner

This commit is contained in:
Marius Begby committed 2023-09-06 20:40:25 +02:00
1 parent 8da6f44ebb
commit 56056cd73d
17 files changed
+76 -110

No files matched your search

+1 -3
View File
@@ -10,15 +10,13 @@ class GuildsCommand extends BaseSlashCommandInteraction {
.setDescription('Show the top 25 guilds by member count.');
const isSystemCommand: boolean = true;
super(data, isSystemCommand);
this.validators = [(args) => checkValidGuildId(args)];
}
async execute(params: BaseSlashCommandParams): BaseSlashCommandReturnType {
const { executionId, interaction, client } = params;
const logger = this.getLogger(this.name, executionId, interaction);
await this.runValidators({ interaction, executionId });
await this.runValidators({ interaction, executionId }, [checkValidGuildId]);
let shardGuilds: Guild[] = [];
let totalGuildCount: number = 0;
+1 -3
View File
@@ -11,15 +11,13 @@ class ReloadCommand extends BaseSlashCommandInteraction {
.setDescription('Reload slash command, autocomplete and component interactions across shards.');
const isSystemCommand: boolean = true;
super(data, isSystemCommand);
this.validators = [(args) => checkValidGuildId(args)];
}
async execute(params: BaseSlashCommandParams): BaseSlashCommandReturnType {
const { executionId, interaction, client } = params;
const logger = this.getLogger(this.name, executionId, interaction);
await this.runValidators({ interaction, executionId });
await this.runValidators({ interaction, executionId }, [checkValidGuildId]);
try {
logger.debug('Reloading interaction module across all shards.');
+1 -3
View File
@@ -29,15 +29,13 @@ class ShardsCommand extends BaseSlashCommandInteraction {
);
const isSystemCommand: boolean = true;
super(data, isSystemCommand);
this.validators = [(args) => checkValidGuildId(args)];
}
async execute(params: BaseSlashCommandParams): BaseSlashCommandReturnType {
const { executionId, interaction, client } = params;
const logger = this.getLogger(this.name, executionId, interaction);
await this.runValidators({ interaction, executionId });
await this.runValidators({ interaction, executionId }, [checkValidGuildId]);
let shardInfoList: ShardInfo[] = [];