Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. # Argument Usage in Komada
  2.  
  3. ## Usage Structure
  4. `<>` required argument, `[]` optional argument
  5. `<Name:Type{min,max}>`
  6.  
  7. - **Name** Mostly used for debugging message, unless the type is Litteral in which it compares the argument to the name.
  8. - **Type** The type of variable you are expecting
  9. - **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.
  10. - **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.
  11.  
  12. = Usage Types =
  13.  
  14. - `literal` : Literally equal to the Name. This is the default type if none is defined.
  15. - `str`, `string` : Strings
  16. - `int`, `integer` : Integers
  17. - `num`, `number`, `Float` : Floating point numbers
  18. - `url` : a url
  19. - `msg`, `message` : A message object returned from the message id (now using fetchMessage for bot accounts, and fetchMessages for selfbots as of 3f24cc99c5e15861f63a8c174fb6469c87475c23)
  20. - `channel` : A channel object returned from the channel id or channel tag
  21. - `guild` : A guild object returned from the guild id
  22. - `user`, `mention` : A user object returned from the user id or mention
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement