@ConvertedBy(value=Error.Converter.class) @DocMultiple(preface="**Possible Errors:**\n\n", prefixEach="+ ", separateBy="\n\n") @Documented @Repeatable(value=Errors.class) @Retention(value=RUNTIME) @Target(value={TYPE,METHOD}) public @interface Error
Annotation
that describes
a possible error or termination clause a Command might have during it's runtime.
These are formatted ways to describe errors and provide the response()
method for specifying the bot's response if the error occurs.
Multiples of these can be applied using the
@Errors
annotation, or simply
multiples of these can be attached to a class or method.
Below is a visual of what this should generally look like:
Possible Errors: • "I encountered an issue while processing this command!" - Houston had a problem! • "You used this command too fast" - b1nzy's fault! • "An unexpected error occurred!" - Let's just blame Onitor!
Errors
Modifier and Type | Required Element and Description |
---|---|
java.lang.String |
value
A brief description of what caused the error.
|
Modifier and Type | Optional Element and Description |
---|---|
java.lang.String |
prefix
A prefix appended to the front of the produced String during
conversion.
|
java.lang.String |
response
A response message that would normally be sent if this
error occurs, as a means of users identifying the error
without an idea of what exactly went wrong.
|
public abstract java.lang.String value
public abstract java.lang.String response
public abstract java.lang.String prefix
@Error
annotations, for the purpose of listing.