Last active
May 17, 2018 00:48
-
-
Save dev4Fun/bf02070f3a0dd867c0cfe2166141a926 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TelegramBot: | |
class PrivateUserFiler(BaseFilter): | |
def __init__(self, user_id): | |
self.user_id = int(user_id) | |
def filter(self, message): | |
return message.from_user.id == self.user_id | |
def __init__(self, token: str, allowed_user_id, trade_executor: TradeExecutor): | |
self.updater = Updater(token=token) | |
self.dispatcher = self.updater.dispatcher | |
self.trade_executor = trade_executor | |
self.exchange = self.trade_executor.exchange | |
self.private_filter = self.PrivateUserFiler(allowed_user_id) | |
self._prepare() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment