botpop/RIGHTS_MANAGEMENT.md

313 B

How to use rights ?

In your plugin, add the method cmd_allowed? and use it like in the following example:

class Plugin < Botpop::Plugin
  ...
  def cmd_allowed? m
    return if not Base.cmd_allowed? m, ["groupname"]
  end

  def exec_some_match m
    return Base.cmd_allowed? m, ["iaa"]
  end