Skip to content
This repository has been archived by the owner on Apr 23, 2023. It is now read-only.

Commit

Permalink
make the channel required
Browse files Browse the repository at this point in the history
  • Loading branch information
sebasptsch committed Apr 1, 2022
1 parent d6c5b4d commit a4918df
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/commands/info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export default new Command()
.setAutocomplete(true)
.setName('primarychannel')
.setDescription('Primary channel to get info about.')
.setRequired(true)
)
.setDescription('Get info about a primary channel.')
)
Expand All @@ -28,21 +29,24 @@ export default new Command()
option
.setAutocomplete(true)
.setName('secondarychannel')
.setDescription('Secondary channel to get info about.')
.setDescription('Secondary channel to get info about.').setRequired(true)
)
.setDescription('Get info about a secondary channel.')
)
.addSubcommand((subcommand) =>
subcommand
.setName('guild')
.setDescription("Get info about the guil's settings.")
.setDescription("Get info about the guild's settings.")
)
)
.setHelp(help)
.setResponse(async (interaction) => {
const subcommand = interaction.options.getSubcommand(true);
if (subcommand === 'primary') {
const chosenPrimary = interaction.options.getString('primarychannel');
const chosenPrimary = interaction.options.getString(
'primarychannel',
true
);
const primary = await new DynamicaPrimary(
interaction.client,
chosenPrimary
Expand All @@ -68,7 +72,10 @@ export default new Command()
],
});
} else if (subcommand === 'secondary') {
const chosenSecondary = interaction.options.getString('secondarychannel');
const chosenSecondary = interaction.options.getString(
'secondarychannel',
true
);
const secondary = await new DynamicaSecondary(
interaction.client,
chosenSecondary
Expand Down

0 comments on commit a4918df

Please sign in to comment.