Skip to content

Commit

Permalink
Merge pull request #208 from Mirasaki/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
Mirasaki authored Jan 11, 2024
2 parents ba41bbe + 229199e commit 2990366
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
14 changes: 12 additions & 2 deletions src/commands/admin/priority-queue.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,16 @@ module.exports = new ChatInputCommand({
name: 'view',
description: 'Display the current configuration',
type: ApplicationCommandOptionType.Subcommand,
options: [ requiredServerConfigCommandOption, steam64Option ]
options: [
requiredServerConfigCommandOption,
steam64Option,
{
name: 'public',
description: 'Whether to display the priority queue embed publicly',
type: ApplicationCommandOptionType.Boolean,
required: false
}
]
},
{
name: 'add',
Expand All @@ -74,12 +83,13 @@ module.exports = new ChatInputCommand({
const { guild, options } = interaction;
const { emojis } = client.container;
const subcommand = options.getSubcommand();
const showPublic = options.getBoolean('public') ?? false;

// Check if a proper server option is provided
const serverCfg = getServerConfigCommandOptionValue(interaction);

// Deferring our reply
await interaction.deferReply({ ephemeral: true });
await interaction.deferReply({ ephemeral: !showPublic });

const entryEmbed = ({
steam64, cftoolsId, entry
Expand Down
5 changes: 0 additions & 5 deletions src/listeners/interaction/interactionCreate.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,6 @@ const runCommand = (client, interaction, activeId, cmdRunTimeStart) => {

// Check for late API changes
if (!clientCmd) {
if (clientCanReply) interaction.reply({
content: `${ emojis.error } ${ member }, this command currently isn't available.`,
ephemeral: true
});
logger.syserr(`Missing interaction listener for "${ activeId }" (name for commands, customId for components - ignored if starts with "@")`);
return;
}

Expand Down

0 comments on commit 2990366

Please sign in to comment.