Attachment Arg
open class AttachmentArg(val name: String = "Attachment", val description: String = internalLocale.attachmentArgDescription) : AttachmentArgument<Attachment>
Content copied to clipboard
Accepts a message attachment.
Constructors
Link copied to clipboard
fun AttachmentArg(name: String = "Attachment", description: String = internalLocale.attachmentArgDescription)
Content copied to clipboard
Types
Functions
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: Attachment): OptionalArg<Attachment, Attachment, Attachment>
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) -> Attachment): OptionalArg<Attachment, Attachment, Attachment>
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: Attachment? = null): OptionalArg<Attachment, Attachment, Attachment?>
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) -> Attachment?): OptionalArg<Attachment, Attachment, Attachment?>
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 suspend override fun parse(args: MutableList<String>, discord: Discord): Attachment?
Content copied to clipboard
Parse string input into the correct type handled by this argument.
Link copied to clipboard
open suspend fun transform(input: Attachment, context: DiscordContext): Result<Attachment>
Content copied to clipboard
Transforms a value produced by a slash command or by the parse function.