File: parent1.py

package info (click to toggle)
errbot 6.2.0%2Bds-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,856 kB
  • sloc: python: 11,572; makefile: 163; sh: 97
file content (14 lines) | stat: -rw-r--r-- 364 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from errbot import BotPlugin, botcmd


class Parent1(BotPlugin):
    @botcmd
    def parent1_to_child1(self, msg, args):
        return self.get_plugin("Child1").shared_function()

    @botcmd
    def parent1_to_child2(self, msg, args):
        return self.get_plugin("Child2").shared_function()

    def shared_function(self):
        return "Hello from Parent1"