Allows defining multiple commands within a Cinch Plugin.
- Argument types.
!help
command with detailed output:- Usages
- Summaries
- Descriptions
require 'cinch/commands'
class MyPlugin
include Cinch::Plugin
include Cinch::Commands
command :foo,
[{name: "arg1", format: :string, optional: false},
{name: "arg2", format: :integer, optional: false}],
summary: "Does foo",
description: "example"\
" more info as well"
command :bar, [{ name: "NAME", format: :string, optional: false}],
aliases: [:b]
def foo(m,arg1,arg2)
end
def bar(m,name)
end
end
- cinch ~> 2.0
$ gem install cinch-commands
Copyright (c) 2012-2013 Hal Brodigan
See {file:LICENSE.txt} for details.