cinch-commands

Allows defining multiple commands within a Cinch Plugin.

MIT License

Downloads
5.4K
Stars
3
Committers
1

cinch-commands

Description

Allows defining multiple commands within a Cinch Plugin.

Features

  • Argument types.
  • !help command with detailed output:
    • Usages
    • Summaries
    • Descriptions

Examples

require 'cinch/commands'

class MyPlugin

  include Cinch::Plugin
  include Cinch::Commands

  command :foo, {arg1: :string, arg2: :integer},
                summary:     "Does foo",
                description: %{
                  ...
                }

  command :bar, {name: :string},
          aliases: [:b]

  def foo(m,arg1,arg2)
  end

  def bar(m,name)
  end

end

Requirements

Install

$ gem install cinch-commands

Copyright

Copyright (c) 2012-2013 Hal Brodigan

See {file:LICENSE.txt} for details.

Package Rankings
Top 26.19% on Rubygems.org