class
This commit is contained in:
parent
aade48ee47
commit
f3602d5365
@ -13,8 +13,13 @@ def main_keyboard(telegram_id):
|
||||
kb.row("Ежедневные уведомления")
|
||||
alice_exp = platform.get_experiment('alice')
|
||||
try:
|
||||
user = object()
|
||||
user.__setattr__('platform_staff', lambda: platform.is_staff(telegram_id=telegram_id))
|
||||
class User:
|
||||
def __init__(self, telegram_id):
|
||||
self.telegram_id = telegram_id
|
||||
@property
|
||||
def platform_staff(self):
|
||||
return platform.is_staff(telegram_id=self.telegram_id)
|
||||
user = User(telegram_id)
|
||||
alice_exp_enabled = eval(alice_exp['condition'])
|
||||
except Exception as exc:
|
||||
logging.info(exc)
|
||||
|
Loading…
Reference in New Issue
Block a user