-
Notifications
You must be signed in to change notification settings - Fork 9
RequiredArg
Felix44 edited this page Aug 23, 2021
·
4 revisions
This class is used for creating the Command class, it has 2 main uses:
throw an error if the defined argument is not given and show the argument when using &help
Constructor:
-
argnum(number): this is the argument number this class needs to check,0would be the first argument,1the second and so on -
errormsg(string): this string that the bot will send if the required argument -
name(string): this string that rappresents the name of the argument, will appear when using&helpwith the command -
notrequired(boolean): if true, the check will be skipped when called, and this class will only be used to display the class name when using&help
Methods:
-
check(arrayargs): will check ifargshas a value in the positionthis.argnum