Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Argument Usage in Komada
- ## Usage Structure
- `<>` required argument, `[]` optional argument
- `<Name:Type{min,max}>`
- - **Name** Mostly used for debugging message, unless the type is Litteral in which it compares the argument to the name.
- - **Type** The type of variable you are expecting
- - **Min, Max** Minimum or Maximum for a giving variable (works on strings in terms of length, and on all types of numbers in terms of value) You are allowed to define any combination of min and max. Omit for none, `{min}` for min, `{,max}` for max.
- - **Special Repeat Tag** `[...]` will repeat the last usage optionally until you run out of arguments. Useful for doing something like `<SearchTerm:str> [...]` which will allow you to take as many search terms as you want, per your Usage Deliminator.
- = Usage Types =
- - `literal` : Literally equal to the Name. This is the default type if none is defined.
- - `str`, `string` : Strings
- - `int`, `integer` : Integers
- - `num`, `number`, `Float` : Floating point numbers
- - `url` : a url
- - `msg`, `message` : A message object returned from the message id (now using fetchMessage for bot accounts, and fetchMessages for selfbots as of 3f24cc99c5e15861f63a8c174fb6469c87475c23)
- - `channel` : A channel object returned from the channel id or channel tag
- - `guild` : A guild object returned from the guild id
- - `user`, `mention` : A user object returned from the user id or mention
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement