mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-03 14:38:49 +00:00
fix: Updated sending in checks for validation runner
This commit is contained in:
1 parent
8da6f44ebb
commit
56056cd73d
17 files changed
+76
-110
No files matched your search
@@ -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;
|
||||
|
||||
@@ -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.');
|
||||
|
||||
@@ -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[] = [];
|
||||
|
||||
|
||||
Reference in new issue
Block a user