mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-28 00:56:19 +00:00
Rename LastSeen to UserStatus
It will make more sense later on when I add UserStatus updates handler.
This commit is contained in:
parent
7b369a73bb
commit
69c1532eae
@ -506,7 +506,7 @@ def start():
|
|||||||
f.write("\n 0xb0700028: \"pyrogram.client.types.Dialog\",")
|
f.write("\n 0xb0700028: \"pyrogram.client.types.Dialog\",")
|
||||||
f.write("\n 0xb0700029: \"pyrogram.client.types.Dialogs\",")
|
f.write("\n 0xb0700029: \"pyrogram.client.types.Dialogs\",")
|
||||||
f.write("\n 0xb0700030: \"pyrogram.client.types.ChatMembers\",")
|
f.write("\n 0xb0700030: \"pyrogram.client.types.ChatMembers\",")
|
||||||
f.write("\n 0xb0700031: \"pyrogram.client.types.LastSeen\"")
|
f.write("\n 0xb0700031: \"pyrogram.client.types.UserStatus\"")
|
||||||
|
|
||||||
f.write("\n}\n")
|
f.write("\n}\n")
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ from .api.errors import Error
|
|||||||
from .client.types import (
|
from .client.types import (
|
||||||
Audio, Chat, ChatMember, ChatMembers, ChatPhoto, Contact, Document, InputMediaPhoto,
|
Audio, Chat, ChatMember, ChatMembers, ChatPhoto, Contact, Document, InputMediaPhoto,
|
||||||
InputMediaVideo, InputMediaDocument, InputMediaAudio, InputMediaAnimation, InputPhoneContact,
|
InputMediaVideo, InputMediaDocument, InputMediaAudio, InputMediaAnimation, InputPhoneContact,
|
||||||
Location, Message, MessageEntity, Dialog, Dialogs, Photo, PhotoSize, Sticker, Update, User, LastSeen,
|
Location, Message, MessageEntity, Dialog, Dialogs, Photo, PhotoSize, Sticker, Update, User, UserStatus,
|
||||||
UserProfilePhotos, Venue, Animation, Video, VideoNote, Voice, CallbackQuery, Messages, ForceReply,
|
UserProfilePhotos, Venue, Animation, Video, VideoNote, Voice, CallbackQuery, Messages, ForceReply,
|
||||||
InlineKeyboardButton, InlineKeyboardMarkup, KeyboardButton, ReplyKeyboardMarkup, ReplyKeyboardRemove
|
InlineKeyboardButton, InlineKeyboardMarkup, KeyboardButton, ReplyKeyboardMarkup, ReplyKeyboardRemove
|
||||||
)
|
)
|
||||||
|
@ -129,9 +129,9 @@ def parse_chat_photo(photo):
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def parse_last_seen(user: types.User) -> pyrogram_types.LastSeen:
|
def parse_last_seen(user: types.User) -> pyrogram_types.UserStatus:
|
||||||
status = user.status
|
status = user.status
|
||||||
last_seen = pyrogram_types.LastSeen()
|
last_seen = pyrogram_types.UserStatus()
|
||||||
|
|
||||||
if isinstance(status, types.UserStatusOnline):
|
if isinstance(status, types.UserStatusOnline):
|
||||||
last_seen.online = True
|
last_seen.online = True
|
||||||
|
@ -36,5 +36,5 @@ from .messages_and_media import (
|
|||||||
from .update import Update
|
from .update import Update
|
||||||
from .user_and_chats import (
|
from .user_and_chats import (
|
||||||
Chat, ChatMember, ChatMembers, ChatPhoto,
|
Chat, ChatMember, ChatMembers, ChatPhoto,
|
||||||
Dialog, Dialogs, User, LastSeen
|
Dialog, Dialogs, User, UserStatus
|
||||||
)
|
)
|
||||||
|
@ -22,5 +22,5 @@ from .chat_members import ChatMembers
|
|||||||
from .chat_photo import ChatPhoto
|
from .chat_photo import ChatPhoto
|
||||||
from .dialog import Dialog
|
from .dialog import Dialog
|
||||||
from .dialogs import Dialogs
|
from .dialogs import Dialogs
|
||||||
from .last_seen import LastSeen
|
from .user_status import UserStatus
|
||||||
from .user import User
|
from .user import User
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
from pyrogram.api.core import Object
|
from pyrogram.api.core import Object
|
||||||
|
|
||||||
|
|
||||||
class LastSeen(Object):
|
class UserStatus(Object):
|
||||||
"""This object represents a User last seen status
|
"""This object represents a User last seen status
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user