Function: resolveCommandOptions()
resolveCommandOptions(options
): Record
<string
, ITransformer
>
Defined in: tagscript-plugin-discord/src/lib/Utils/CommandInteraction.ts:85
Resolves CommandInteractionOptionResolver options to transformers.
Parameters
options
Omit
<CommandInteractionOptionResolver
<CacheType
>, "getFocused"
| "getMessage"
>
Returns
Record
<string
, ITransformer
>
Example
client.on('interactionCreate', async interaction => {
if (!interaction.isCommand()) return;
if (interaction.commandName === 'ping') {
const result = await ts.run(str, resolveCommandOptions(interaction.options));
await interaction.reply(result.body);
}
});