mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2026-09-08 09:51:57 +00:00
Allow adding events with the client.on decorator
This commit is contained in:
@@ -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"""
|
||||
Reference in New Issue
Block a user