mirror of
https://github.com/nichkara/InfinitumBotty.git
synced 2026-06-10 22:26:23 +02:00
28 lines
738 B
Python
28 lines
738 B
Python
from FaustBot.Communication.Connection import Connection
|
|
from FaustBot.Modules.ModulePrototype import ModulePrototype
|
|
from FaustBot.Modules.ModuleType import ModuleType
|
|
|
|
|
|
class PingObserverPrototype(ModulePrototype):
|
|
"""
|
|
The Prototype of a Class who can react to every action
|
|
"""
|
|
|
|
@staticmethod
|
|
def cmd():
|
|
raise NotImplementedError()
|
|
|
|
@staticmethod
|
|
def help():
|
|
raise NotImplementedError("Need sto be implemented by subclasses!")
|
|
|
|
@staticmethod
|
|
def get_module_types():
|
|
return [ModuleType.ON_PING]
|
|
|
|
def __init__(self):
|
|
super().__init__()
|
|
|
|
def update_on_ping(self, data, connection: Connection):
|
|
raise NotImplementedError("Some module doesn't do anything")
|