better handle of options
This commit is contained in:
parent
decd0b65f3
commit
d3670de641
1 changed files with 2 additions and 4 deletions
|
@ -33,12 +33,10 @@ export default {
|
||||||
|
|
||||||
interaction: async (interaction: CommandInteraction, client: Client) => {
|
interaction: async (interaction: CommandInteraction, client: Client) => {
|
||||||
const loc = getLocale(client, interaction.locale);
|
const loc = getLocale(client, interaction.locale);
|
||||||
const desired_command = (
|
const desired_command = interaction.options.get(client
|
||||||
interaction.options as CommandInteractionOptionResolver
|
|
||||||
).getString(client
|
|
||||||
.locales
|
.locales
|
||||||
.get(client.config.default_lang)
|
.get(client.config.default_lang)
|
||||||
?.get(`c_${getFilename(__filename)}_opt1_name`) ?? '');
|
?.get(`c_${getFilename(__filename)}_opt1_name`) ?? '')?.value as string;
|
||||||
|
|
||||||
// If a command isn't specified
|
// If a command isn't specified
|
||||||
if (!desired_command) {
|
if (!desired_command) {
|
||||||
|
|
Loading…
Reference in a new issue