Skip to content

no value for chat input command option #264

Description

Please describe the problem you are having in as much detail as possible:
hello, so, i have command, that needs to access option value, but ts yells that there is no .value for this.
Include a reproducible code sample here, if possible:

import { SlashCommandContext } from '../context'

export default (ctx: SlashCommandContext): Response => {
  return ctx.reply({
    content: ctx.data.options![0].value,
  })
}

Further details:
context is type which is union of APIChatInputApplicationCommandInteraction and two methods, reply and edit

  • Runtime:
    • Node.js version: not node
    • deno version: not deno
  • Priority this issue should have:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions