This is just a quick example of what adding a very simple shell script as a Cog command would look like. Everything is a work in progress at this stage of alpha and this command does not make use of many of the advanced features in Cog, but I thought folks might find it interesting.
This is a representation of what it would look like if I (@imbriaco) were talking to a bot named cog that was running this bundle.
imbriaco: @cog: simple foo bar baz
cog:
ARG[0]: foo
ARG[1]: bar
ARG[2]: baz
imbriaco: @cog: echo "Hello world" | simple $body
cog:
ARG[0]: Hello world
imbriaco: @cog: seed '{"foo": "foo value", "bar": "bar value"}' | simple $foo $bar
cog:
ARG[0]: foo value
ARG[1]: bar value
Files:
- simple.json - This is the configuration file that Cog uses to configure a "Bundle" of commands for use in the bot.
- simple.sh - The script that is referred to by the config file.