Class: Daneel::Script
Instance Attribute Summary
Attributes inherited from Plugin
#robot
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Plugin
#initialize, #logger, requires_env
Constructor Details
This class inherits a constructor from Daneel::Plugin
Class Method Details
.files ⇒ Object
30
31
32
|
# File 'lib/daneel/script.rb', line 30
def files
Dir[File.expand_path("../scripts/*.rb", __FILE__)]
end
|
.inherited(subclass) ⇒ Object
26
27
28
|
# File 'lib/daneel/script.rb', line 26
def inherited(subclass)
list << subclass
end
|
.list ⇒ Object
22
23
24
|
# File 'lib/daneel/script.rb', line 22
def list
@list ||= []
end
|
Instance Method Details
#accepts?(room, message, user) ⇒ Boolean
6
7
8
|
# File 'lib/daneel/script.rb', line 6
def accepts?(room, message, user)
true unless user.id == robot.user.id
end
|
#help ⇒ Object
14
15
16
17
|
# File 'lib/daneel/script.rb', line 14
def help
{}
end
|
#receive(room, message, user) ⇒ Object
10
11
12
|
# File 'lib/daneel/script.rb', line 10
def receive(room, message, user)
end
|