Boolean Arg
open class BooleanArg( val name: String = "Boolean", val truthValue: String = "true", val falseValue: String = "false", val description: String = internalLocale.booleanArgDescription.inject(truthValue, falseValue)) : BooleanArgument<Boolean>
Content copied to clipboard
Accepts either of two values. Defaults to true/false.
Parameters
truth Value
The string value that results in true.
false Value
The string value that results in false.
Constructors
Link copied to clipboard
fun BooleanArg( name: String = "Boolean", truthValue: String = "true", falseValue: String = "false", description: String = internalLocale.booleanArgDescription.inject(truthValue, falseValue))
Content copied to clipboard
Types
Functions
Link copied to clipboard
open fun autocomplete(choices: suspend AutocompleteData.() -> List<Boolean>): AutocompleteArg<Boolean, Boolean>
Content copied to clipboard
Offer autocomplete options for this argument.
Link copied to clipboard
open suspend override fun generateExamples(context: DiscordContext): List<String>
Content copied to clipboard
A function called whenever an example of this type is needed.
Link copied to clipboard
Utility function to check that this Argument is an OptionalArg.
Link copied to clipboard
Accept multiple inputs of this Argument.
Link copied to clipboard
open fun optional(default: Boolean): OptionalArg<Boolean, Boolean, Boolean>
Content copied to clipboard
Make this argument optional and fall back to the default value if the conversion fails.
open fun optional(default: suspend (DiscordContext) -> Boolean): OptionalArg<Boolean, Boolean, Boolean>
Content copied to clipboard
Make this argument optional and fall back to the default value if the conversion fails. Exposes a CommandEvent.
Link copied to clipboard
open fun optionalNullable(default: Boolean? = null): OptionalArg<Boolean, Boolean, Boolean?>
Content copied to clipboard
Make this argument optional and fall back to the default value if the conversion fails.
open fun optionalNullable(default: suspend (DiscordContext) -> Boolean?): OptionalArg<Boolean, Boolean, Boolean?>
Content copied to clipboard
Make this argument optional and fall back to the default value if the conversion fails. Exposes a CommandEvent.