Skip to content

Commit

Permalink
update arguments for variables
Browse files Browse the repository at this point in the history
  • Loading branch information
otothea committed Feb 11, 2020
1 parent cdd63cd commit c01ea7d
Show file tree
Hide file tree
Showing 20 changed files with 79 additions and 15 deletions.
16 changes: 10 additions & 6 deletions docs/variables/arguments.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,18 @@ Resolves the argument from the command input.
Usage:
$(``<argument>`` ``[fallback]``)

Arguments:
``argument`` **<required>** - The number of the argument to get from the command starting with 1
``fallback`` **[optional]** - The text to display if the argument does not exist

Example Command:
**name**: !example
**name**: !hello

**response**: $(2 default text)
**response**: Hello $(1 World)!

**output**::

user: !example this is a test
botisimo: is
user: !example this
botisimo: default text
user: !hello @username
botisimo: Hello @username!
user: !hello
botisimo: Hello World!
3 changes: 3 additions & 0 deletions docs/variables/cache.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ Resolve a value from the cache. Values can be save to the cache using the :doc:`
Usage:
$(cache ``<key>``)

Arguments:
``key`` **<required>** - The key of the value to fetch from the cache

Example Command:
**name**: !cache

Expand Down
8 changes: 6 additions & 2 deletions docs/variables/countdown.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@ Resolves the time between now and the given date.
Usage:
$(countdown ``<date>`` ``[time]``)

Arguments:
* ``date`` **<required>** - The date to compare (ex: 12/25/2020)
* ``time`` **[optional]** - The time of day (ex: 12:30pm)

Example Command:
**name**: !countdown

**response**: The new year begins in $(countdown 1/1/2018 00:00:00)
**response**: The new year begins in $(countdown 1/1/2021 00:00:00)

**output**::

user: !countdown
botisimo: The new year begins in 30 days 12 hours 37 minutes
botisimo: The new year begins in 360 days 12 hours 37 minutes
3 changes: 3 additions & 0 deletions docs/variables/discord.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ Show text in Discord chat only.
Usage:
$(discord ``<message>``)

Arguments:
* ``message`` **<required>** - The message to display in chat

Example Command:
**name**: !example

Expand Down
3 changes: 3 additions & 0 deletions docs/variables/fetch.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ Resolves the response from the url using a GET request.
Usage:
$(fetch ``<url>``)

Arguments:
* ``url`` **<required>** - The url to send the request to

Example Command:
**name**: !foaas

Expand Down
4 changes: 4 additions & 0 deletions docs/variables/fetchp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ Resolves the response from the url using a POST request. Similar to :doc:`$(fetc
Usage:
$(fetchp ``<url>`` ``[data]``)

Arguments:
* ``url`` **<required>** - The url to send the request to
* ``data`` **[optional]** - The data string to send to the url

Example Command:
**name**: !foaas

Expand Down
3 changes: 3 additions & 0 deletions docs/variables/js.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ Resolves the value of a javascript expression
Usage:
$(js ``<javascript>``)

Arguments:
* ``javascript`` **<required>** - The javascript expression to evaluate

Example Command:
**name**: !js

Expand Down
3 changes: 3 additions & 0 deletions docs/variables/lastfm.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ Resolves the last scrobbled song from lastfm for the given username (must be las
Usage:
$(lastfm ``<username>``)

Arguments:
* ``username`` **<required>** - The name of the lastfm user

Example Command:
**name**: !lastfm

Expand Down
3 changes: 3 additions & 0 deletions docs/variables/mixer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ Show text in Mixer chat only.
Usage:
$(mixer ``<message>``)

Arguments:
* ``message`` **<required>** - The message to display in chat

Example Command:
**name**: !example

Expand Down
3 changes: 3 additions & 0 deletions docs/variables/pick.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ Resolves a random response from the given options.
Usage:
$(pick ``<option>`` | ``[option]`` | ``[option]`` | ...)

Arguments:
* ``option`` **<required>** - The message to display in chat (to add multiple options separate with a ``|`` character)

Example Command:
**name**: !pick

Expand Down
9 changes: 6 additions & 3 deletions docs/variables/query.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,17 @@ $(query)
Resolves the query string from the command.

Usage:
$(query ``[offset]``)
$(query ``[start]``)

Arguments:
* ``start`` **[optional]** - The word to start on from the beginning of the query

Example Command:
**name**: !query

**response**: $(query) $(query 2)
**response**: $(query) -> $(query 3)

**output**::

user: !query this is the query
botisimo: this is is the query is the query
botisimo: this is the query -> the query
8 changes: 6 additions & 2 deletions docs/variables/repeat.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
$(repeat)
=========

Resolves a repeated string.
Resolves some text repeatedly.

Usage:
$(repeat ``<count>`` ``<string>``)
$(repeat ``<count>`` ``<text>``)

Arguments:
* ``count`` **<required>** - The number of times to repeat the text
* ``text`` **<required>** - The text to repeat

Example Command:
**name**: !repeat
Expand Down
4 changes: 4 additions & 0 deletions docs/variables/rng.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ Resolve a random number between given numbers.
Usage:
$(rng ``<min>`` ``<max>``)

Arguments:
* ``min`` **<required>** - The minimum number that can be chosen
* ``max`` **<required>** - The maximum number that can be chosen

Example Command:
**name**: !roll

Expand Down
3 changes: 3 additions & 0 deletions docs/variables/rotate.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ Resolves a response from the given options in sequence.
Usage:
$(rotate ``<option>`` | ``[option]`` | ``[option]`` | ...)

Arguments:
* ``option`` **<required>** - The message to display in chat (to add multiple options separate with a ``|`` character)

Example Command:
**name**: !rotate

Expand Down
4 changes: 4 additions & 0 deletions docs/variables/stripchar.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ Strip a character from text.
Usage:
$(stripchar ``<character>`` ``<text>``)

Arguments:
* ``character`` **<required>** - The character to remove from the text
* ``text`` **<required>** - The text to remove the character from

Example Command:
**name**: !shoutout

Expand Down
2 changes: 1 addition & 1 deletion docs/variables/total.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ $(total)
Resolves the total numbers of ranked users.

Usage:
$(rank)
$(total)

Example Command:
**name**: !total
Expand Down
3 changes: 3 additions & 0 deletions docs/variables/twitch.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ Show text in Twitch chat only.
Usage:
$(twitch ``<message>``)

Arguments:
* ``message`` **<required>** - The message to display in chat

Example Command:
**name**: !example

Expand Down
5 changes: 4 additions & 1 deletion docs/variables/urlencode.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ $(urlencode)
Resolves a url encoded string.

Usage:
$(urlencode ``<string>``)
$(urlencode ``<text>``)

Arguments:
* ``text`` **<required>** - The text to url encode

Example Command:
**name**: !encode
Expand Down
4 changes: 4 additions & 0 deletions docs/variables/winner.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ Resolve the username as a mention of a random user currently online in the chann
Usage:
$(winner ``[minutes=10]`` ``[keyword=]``)

Arguments:
* ``minutes`` **[optional]** - The number of minutes to look back in chat for the keyword
* ``keyword`` **[optional]** - The keyword to qualify to be selected as a winner (if no keyword then any text will qualify)

Example Command:
**name**: !winner

Expand Down
3 changes: 3 additions & 0 deletions docs/variables/youtube.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ Show text in YouTube chat only.
Usage:
$(youtube ``<message>``)

Arguments:
* ``message`` **<required>** - The message to display in chat

Example Command:
**name**: !example

Expand Down

0 comments on commit c01ea7d

Please sign in to comment.