-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUser.py
32 lines (31 loc) · 1.11 KB
/
User.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
class User:
def __init__(self, message):
self.id = message.id
self.flag = 'start'
if message.first_name:
self.user_login = message.first_name
elif message.username:
self.user_login = message.username
elif message.last_name:
self.user_login = message.last_name
else:
self.user_login = message.id
self.first_name = message.first_name
self.first_name = message.username
self.last_name = message.last_name
self.user_login = message.username
self.type_user = ''
self.myQueue = {}
self.memory = ""
self.notification_shop = True
self.notification_client = True
print(f"\n\nДобавлен новый пользлователь id: {self.id} name:{self.user_login}\n\n")
def __repr__(self):
return "User id:% s name:% s type:% s flag:% s queue:% s" % (self.id, self.user_login, self.type_user, self.flag, self.myQueue)
def _asdict(self):
return self.__dict__
id = ""
flag = ""
user_login = ""
type_user =""
myQueue = {}