Sha256: e5c24fc1e2aefcb32ec8831b485609b2bf8d83b6369e22b2800fd443284b4ce8

Contents?: true

Size: 351 Bytes

Versions: 8

Compression:

Stored size: 351 Bytes

Contents

module Cinch
  module Plugins
    class Dice
      include Cinch::Plugin

      match "roll"

      set :plugin_name, 'dice'
      set :help, <<EOT
.roll Rolls a dice.
EOT

      def new(bot)
        @bot = bot
      end

      def execute(m)
        score = rand(100) + 1
        m.reply("#{m.user.nick} rolls #{score}")
      end

    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
cogbot-0.1.7 plugins/dice.rb
cogbot-0.1.6 plugins/dice.rb
cogbot-0.1.5 plugins/dice.rb
cogbot-0.1.4 plugins/dice.rb
cogbot-0.1.3 plugins/dice.rb
cogbot-0.1.2 plugins/dice.rb
cogbot-0.1.1 plugins/dice.rb
cogbot-0.1.0 plugins/dice.rb