All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.freya022.botcommands.api.commands.text.annotations.TextOption.kt Maven / Gradle / Ivy

Go to download

A Kotlin-first (and Java) framework that makes creating Discord bots a piece of cake, using the JDA library.

There is a newer version: 3.0.0-alpha.18
Show newest version
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 = ""
)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy