-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ValidationProps
interaction does not have the .reply()
method
#46
Comments
Hi. Can you please share the exact error you're facing. Thanks |
When using ValidationProps type, and using .reply you are getting an type error. |
I was able to reproduce the issue: import type { ValidationProps } from 'commandkit';
export default function ({ interaction, commandObj, handler }: ValidationProps) {
interaction.reply('This does not work.'); // Property 'reply' does not exist on type 'ChatInputCommandInteraction<CacheType> | ContextMenuCommandInteraction<CacheType> | AutocompleteInteraction<...>'.
} ReasonWith version 1.10, validations also support autocomplete. This is a new feature in command files. With this new update, the FixSince you can't "reply" to the import type { ValidationProps } from 'commandkit';
export default function ({ interaction, commandObj, handler }: ValidationProps) {
if (interaction.isAutocomplete()) return;
interaction.reply('This now works!');
} |
Gonna leave this open for now for feedback |
ValidationProps
interaction does not have the .reply()
method
Arr alright thanks for the help :) keep up the good work! |
https://commandkit.js.org/guide/validation-file-setup then using the
ValidationProps
. Then if you useinteraction.reply(...)
it will throw an error. Version:0.1.10
The text was updated successfully, but these errors were encountered: