3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-28 14:59:56 +01:00
pbot/lib/PBot/Core/Factoids
Pragmatic Software 001f2024c4
Factoids: add default value modifier
Uses POSIX shell parameter expansion syntax.

    <pragma-> !factadd cookie /me gives a cookie to ${args:-nobody. What a shame}!
       <PBot> cookie added to the global channel.

    <pragma-> !cookie Bob
            * PBot gives a cookie to Bob!

    <pragma-> !cookie
            * PBot gives a cookie to nobody. What a shame!

    <pragma-> !factadd sum /call calc $arg[0]:-1 + $arg[1]:-2
       <PBot> sum added to the global channel.

    <pragma-> !sum
       <PBot> 1 + 2 = 3

    <pragma-> !sum 3
       <PBot> 3 + 2 = 5

    <pragma-> !sum 4 6
       <PBot> 4 + 6 = 10
2024-11-27 12:17:45 -08:00
..
Code.pm Factoids: add default value modifier 2024-11-27 12:17:45 -08:00
Data.pm Replace preserve_whitespace metadata with condense-whitespace 2024-11-04 00:25:36 -08:00
Exporter.pm Update core to use subroutine signatures 2023-04-13 21:04:12 -07:00
Interpreter.pm Factoids: add default value modifier 2024-11-27 12:17:45 -08:00
Modifiers.pm Factoids: add default value modifier 2024-11-27 12:17:45 -08:00
Selectors.pm Update core to use subroutine signatures 2023-04-13 21:04:12 -07:00
Variables.pm Factoids: add default value modifier 2024-11-27 12:17:45 -08:00