io.github.freya022.botcommands.api.commands.text.annotations.TextOption.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of BotCommands Show documentation
Show all versions of BotCommands Show documentation
A Kotlin-first (and Java) framework that makes creating Discord bots a piece of cake, using the JDA library.
package io.github.freya022.botcommands.api.commands.text.annotations
import io.github.freya022.botcommands.api.commands.annotations.Optional
import org.jetbrains.annotations.Nullable
/**
* Sets a parameter as a text command option from the Discord message.
*
* This also can set name and example of [text commands][JDATextCommandVariation] parameters.
*
* @see Optional @Optional
* @see Nullable @Nullable
* @see ID @ID
*/
@Target(AnnotationTarget.VALUE_PARAMETER)
@Retention(AnnotationRetention.RUNTIME)
annotation class TextOption(
/**
* The name of this option displayed on the help content.
*
* This is optional if the parameter name is available,
* see [the wiki](https://freya022.github.io/BotCommands/using-commands/Inferred-option-names/) for more details.
*/
//TODO keep an eye out for this wiki link
val name: String = "",
/**
* The example input of this option displayed on the help content.
*/
val example: String = ""
)