Allow adding events with the client.on decorator

This commit is contained in:
Lonami Exo
2018-02-07 10:41:58 +01:00
parent 06bc761a5b
commit 5ec984dd82
2 changed files with 51 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
import abc
from ..tl import types, functions
from ..extensions import markdown
from .. import utils
class _EventBuilder(abc.ABC):
@abc.abstractmethod
def build(self, update):
"""Builds an event for the given update if possible, or returns None"""
@abc.abstractmethod
def resolve(self, client):
"""Helper method to allow event builders to be resolved before usage"""