Remove types
This commit is contained in:
parent
f3cf08d351
commit
8d4242f08e
@ -1,22 +0,0 @@
|
||||
from .animation import Animation
|
||||
from .audio import Audio
|
||||
from .chat import Chat
|
||||
from .chat_member import ChatMember
|
||||
from .chat_photo import ChatPhoto
|
||||
from .contact import Contact
|
||||
from .document import Document
|
||||
from .game import Game
|
||||
from .location import Location
|
||||
from .mask_position import MaskPosition
|
||||
from .message import Message
|
||||
from .message_entity import MessageEntity
|
||||
from .photo_size import PhotoSize
|
||||
from .sticker import Sticker
|
||||
from .sticker_set import StickerSet
|
||||
from .update import Update
|
||||
from .user import User
|
||||
from .user_profile_photos import UserProfilePhotos
|
||||
from .venue import Venue
|
||||
from .video import Video
|
||||
from .video_note import VideoNote
|
||||
from .voice import Voice
|
@ -1,12 +0,0 @@
|
||||
class Animation:
|
||||
def __init__(self,
|
||||
file_id: str,
|
||||
thumb: "PhotoSize" = None,
|
||||
file_name: str = None,
|
||||
mime_type: str = None,
|
||||
file_size: int = None):
|
||||
self.file_id = file_id
|
||||
self.thumb = thumb
|
||||
self.file_name = file_name
|
||||
self.mime_type = mime_type
|
||||
self.file_size = file_size
|
@ -1,14 +0,0 @@
|
||||
class Audio:
|
||||
def __init__(self,
|
||||
file_id: str,
|
||||
duration: int = None,
|
||||
performer: str = None,
|
||||
title: str = None,
|
||||
mime_type: str = None,
|
||||
file_size: int = None):
|
||||
self.file_id = file_id
|
||||
self.duration = duration
|
||||
self.performer = performer
|
||||
self.title = title
|
||||
self.mime_type = mime_type
|
||||
self.file_size = file_size
|
@ -1,28 +0,0 @@
|
||||
class Chat:
|
||||
def __init__(self,
|
||||
id: int,
|
||||
type: str,
|
||||
title: str = None,
|
||||
username: str = None,
|
||||
first_name: str = None,
|
||||
last_name: str = None,
|
||||
all_members_are_administrators: bool = None,
|
||||
photo: "ChatPhoto" = None,
|
||||
description: str = None,
|
||||
invite_link: str = None,
|
||||
pinned_message: "Message" = None,
|
||||
sticker_set_name: str = None,
|
||||
can_set_sticker_set: bool = None):
|
||||
self.id = id
|
||||
self.type = type
|
||||
self.title = title
|
||||
self.username = username
|
||||
self.first_name = first_name
|
||||
self.last_name = last_name
|
||||
self.all_members_are_administrators = all_members_are_administrators
|
||||
self.photo = photo
|
||||
self.description = description
|
||||
self.invite_link = invite_link
|
||||
self.pinned_message = pinned_message
|
||||
self.sticker_set_name = sticker_set_name
|
||||
self.can_set_sticker_set = can_set_sticker_set
|
@ -1,34 +0,0 @@
|
||||
class ChatMember:
|
||||
def __init__(self,
|
||||
user: "User",
|
||||
status: str,
|
||||
until_date: int = None,
|
||||
can_be_edited: bool = None,
|
||||
can_change_info: bool = None,
|
||||
can_post_messages: bool = None,
|
||||
can_edit_messages: bool = None,
|
||||
can_delete_messages: bool = None,
|
||||
can_invite_users: bool = None,
|
||||
can_restrict_members: bool = None,
|
||||
can_pin_messages: bool = None,
|
||||
can_promote_members: bool = None,
|
||||
can_send_messages: bool = None,
|
||||
can_send_media_messages: bool = None,
|
||||
can_send_other_messages: bool = None,
|
||||
can_add_web_page_pewviews: bool = None):
|
||||
self.user = user
|
||||
self.status = status
|
||||
self.until_date = until_date
|
||||
self.can_be_edited = can_be_edited
|
||||
self.can_change_info = can_change_info
|
||||
self.can_post_messages = can_post_messages
|
||||
self.can_edit_messages = can_edit_messages
|
||||
self.can_delete_messages = can_delete_messages
|
||||
self.can_invite_users = can_invite_users
|
||||
self.can_restrict_members = can_restrict_members
|
||||
self.can_pin_messages = can_pin_messages
|
||||
self.can_promote_members = can_promote_members
|
||||
self.can_send_messages = can_send_messages
|
||||
self.can_send_media_messages = can_send_media_messages
|
||||
self.can_send_other_messages = can_send_other_messages
|
||||
self.can_add_web_page_pewviews = can_add_web_page_pewviews
|
@ -1,6 +0,0 @@
|
||||
class ChatPhoto:
|
||||
def __init__(self,
|
||||
small_file_id: str,
|
||||
big_file_id: str):
|
||||
self.small_file_id = small_file_id
|
||||
self.big_file_id = big_file_id
|
@ -1,10 +0,0 @@
|
||||
class Contact:
|
||||
def __init__(self,
|
||||
phone_number: str,
|
||||
first_name: str,
|
||||
last_name: str = None,
|
||||
user_id: int = None):
|
||||
self.phone_number = phone_number
|
||||
self.first_name = first_name
|
||||
self.last_name = last_name
|
||||
self.user_id = user_id
|
@ -1,12 +0,0 @@
|
||||
class Document:
|
||||
def __init__(self,
|
||||
file_id: str,
|
||||
thumb: "PhotoSize" = None,
|
||||
file_name: str = None,
|
||||
mime_type: str = None,
|
||||
file_size: int = None):
|
||||
self.file_id = file_id
|
||||
self.thumb = thumb
|
||||
self.file_name = file_name
|
||||
self.mime_type = mime_type
|
||||
self.file_size = file_size
|
@ -1,14 +0,0 @@
|
||||
class Game:
|
||||
def __init__(self,
|
||||
title: str,
|
||||
description: str,
|
||||
photo: list,
|
||||
text: str = None,
|
||||
text_entities: list = None,
|
||||
animation: "Animation" = None):
|
||||
self.title = title
|
||||
self.description = description
|
||||
self.photo = photo
|
||||
self.text = text
|
||||
self.text_entities = text_entities
|
||||
self.animation = animation
|
@ -1,6 +0,0 @@
|
||||
class Location:
|
||||
def __init__(self,
|
||||
longitude: float,
|
||||
latitude: float):
|
||||
self.longitude = longitude
|
||||
self.latitude = latitude
|
@ -1,10 +0,0 @@
|
||||
class MaskPosition:
|
||||
def __init__(self,
|
||||
point: str,
|
||||
x_shift: float,
|
||||
y_shift: float,
|
||||
scale: float):
|
||||
self.point = point
|
||||
self.x_shift = x_shift
|
||||
self.y_shift = y_shift
|
||||
self.scale = scale
|
@ -1,86 +0,0 @@
|
||||
class Message:
|
||||
def __init__(self,
|
||||
message_id: int,
|
||||
date: int,
|
||||
chat: "Chat",
|
||||
from_user: "User" = None,
|
||||
forward_from: "User" = None,
|
||||
forward_from_chat: "Chat" = None,
|
||||
forward_from_message_id: int = None,
|
||||
forward_signature: str = None,
|
||||
forward_date: int = None,
|
||||
reply_to_message: "Message" = None,
|
||||
edit_date: int = None,
|
||||
media_group_id: str = None,
|
||||
author_signature: str = None,
|
||||
text: str = None,
|
||||
entities: list = None,
|
||||
caption_entities: list = None,
|
||||
audio: "Audio" = None,
|
||||
document: "Document" = None,
|
||||
game: "Game" = None,
|
||||
photo: list = None,
|
||||
sticker: "Sticker" = None,
|
||||
video: "Video" = None,
|
||||
voice: "Voice" = None,
|
||||
video_note: "VideoNote" = None,
|
||||
caption: str = None,
|
||||
contact: "Contact" = None,
|
||||
location: "Location" = None,
|
||||
venue: "Venue" = None,
|
||||
new_chat_members: list = None,
|
||||
left_chat_member: "User" = None,
|
||||
new_chat_title: str = None,
|
||||
new_chat_photo: list = None,
|
||||
delete_chat_photo: bool = None,
|
||||
group_chat_created: bool = None,
|
||||
supergroup_chat_created: bool = None,
|
||||
channel_chat_created: bool = None,
|
||||
migrate_to_chat_id: int = None,
|
||||
migrate_from_chat_id: int = None,
|
||||
pinned_message: "Message" = None,
|
||||
invoice: "Invoice" = None,
|
||||
successful_payment: "SuccessfulPayment" = None,
|
||||
connected_website: str = None):
|
||||
self.message_id = message_id
|
||||
self.date = date
|
||||
self.chat = chat
|
||||
self.from_user = from_user
|
||||
self.forward_from = forward_from
|
||||
self.forward_from_chat = forward_from_chat
|
||||
self.forward_from_message_id = forward_from_message_id
|
||||
self.forward_signature = forward_signature
|
||||
self.forward_date = forward_date
|
||||
self.reply_to_message = reply_to_message
|
||||
self.edit_date = edit_date
|
||||
self.media_group_id = media_group_id
|
||||
self.author_signature = author_signature
|
||||
self.text = text
|
||||
self.entities = entities
|
||||
self.caption_entities = caption_entities
|
||||
self.audio = audio
|
||||
self.document = document
|
||||
self.game = game
|
||||
self.photo = photo
|
||||
self.sticker = sticker
|
||||
self.video = video
|
||||
self.voice = voice
|
||||
self.video_note = video_note
|
||||
self.caption = caption
|
||||
self.contact = contact
|
||||
self.location = location
|
||||
self.venue = venue
|
||||
self.new_chat_members = new_chat_members
|
||||
self.left_chat_member = left_chat_member
|
||||
self.new_chat_title = new_chat_title
|
||||
self.new_chat_photo = new_chat_photo
|
||||
self.delete_chat_photo = delete_chat_photo
|
||||
self.group_chat_created = group_chat_created
|
||||
self.supergroup_chat_created = supergroup_chat_created
|
||||
self.channel_chat_created = channel_chat_created
|
||||
self.migrate_to_chat_id = migrate_to_chat_id
|
||||
self.migrate_from_chat_id = migrate_from_chat_id
|
||||
self.pinned_message = pinned_message
|
||||
self.invoice = invoice
|
||||
self.successful_payment = successful_payment
|
||||
self.connected_website = connected_website
|
@ -1,12 +0,0 @@
|
||||
class MessageEntity:
|
||||
def __init__(self,
|
||||
type: str,
|
||||
offset: int,
|
||||
length: int,
|
||||
url: str = None,
|
||||
user: "User" = None):
|
||||
self.type = type
|
||||
self.offset = offset
|
||||
self.length = length
|
||||
self.url = url
|
||||
self.user = user
|
@ -1,10 +0,0 @@
|
||||
class PhotoSize:
|
||||
def __init__(self,
|
||||
file_id: str,
|
||||
width: int,
|
||||
height: int,
|
||||
file_size: int):
|
||||
self.file_id = file_id
|
||||
self.width = width
|
||||
self.height = height
|
||||
self.file_size = file_size
|
@ -1,18 +0,0 @@
|
||||
class Sticker:
|
||||
def __init__(self,
|
||||
file_id: str,
|
||||
width: int,
|
||||
height: int,
|
||||
thumb: "PhotoSize" = None,
|
||||
emoji: str = None,
|
||||
set_name: str = None,
|
||||
mask_position: "MaskPosition" = None,
|
||||
file_size: int = None):
|
||||
self.file_id = file_id
|
||||
self.width = width
|
||||
self.height = height
|
||||
self.thumb = thumb
|
||||
self.emoji = emoji
|
||||
self.set_name = set_name
|
||||
self.mask_position = mask_position
|
||||
self.file_size = file_size
|
@ -1,10 +0,0 @@
|
||||
class StickerSet:
|
||||
def __init__(self,
|
||||
name: str,
|
||||
title: str,
|
||||
contain_masks: bool,
|
||||
stickers: list):
|
||||
self.name = name
|
||||
self.title = title
|
||||
self.contain_masks = contain_masks
|
||||
self.stickers = stickers
|
@ -1,25 +0,0 @@
|
||||
class Update:
|
||||
"""This object represents an incoming update.
|
||||
At most one of the optional parameters can be present in any given update.
|
||||
|
||||
|
||||
Args:
|
||||
message (:obj:`Message <pyrogram.Message>`):
|
||||
|
||||
edited_message ():
|
||||
|
||||
channel_post ():
|
||||
|
||||
edited_channel_post ():
|
||||
|
||||
"""
|
||||
|
||||
def __init__(self,
|
||||
message: "Message" = None,
|
||||
edited_message: "Message" = None,
|
||||
channel_post: "Message" = None,
|
||||
edited_channel_post: "Message" = None):
|
||||
self.message = message
|
||||
self.edited_message = edited_message
|
||||
self.channel_post = channel_post
|
||||
self.edited_channel_post = edited_channel_post
|
@ -1,36 +0,0 @@
|
||||
class User:
|
||||
"""This object represents a Telegram user or bot.
|
||||
|
||||
Args:
|
||||
id (:obj:`int`):
|
||||
Unique identifier for this user or bot.
|
||||
|
||||
is_bot (:obj:`bool`):
|
||||
True, if this user is a bot.
|
||||
|
||||
first_name (:obj:`str`):
|
||||
User's or bot’s first name.
|
||||
|
||||
last_name (:obj:`str`, optional):
|
||||
User's or bot’s last name.
|
||||
|
||||
username (:obj:`str`, optional):
|
||||
User's or bot’s username.
|
||||
|
||||
language_code (:obj:`str`, optional):
|
||||
IETF language tag of the user's language.
|
||||
"""
|
||||
|
||||
def __init__(self,
|
||||
id: int,
|
||||
is_bot: bool,
|
||||
first_name: str,
|
||||
last_name: str = None,
|
||||
username: str = None,
|
||||
language_code: str = None):
|
||||
self.id = id
|
||||
self.is_bot = is_bot
|
||||
self.first_name = first_name
|
||||
self.last_name = last_name
|
||||
self.username = username
|
||||
self.language_code = language_code
|
@ -1,6 +0,0 @@
|
||||
class UserProfilePhotos:
|
||||
def __init__(self,
|
||||
total_count: int,
|
||||
photos: list):
|
||||
self.total_count = total_count
|
||||
self.photos = photos
|
@ -1,10 +0,0 @@
|
||||
class Venue:
|
||||
def __init__(self,
|
||||
location: "Location",
|
||||
title: str,
|
||||
address: str,
|
||||
foursquare_id: str = None):
|
||||
self.location = location
|
||||
self.title = title
|
||||
self.address = address
|
||||
self.foursquare_id = foursquare_id
|
@ -1,16 +0,0 @@
|
||||
class Video:
|
||||
def __init__(self,
|
||||
file_id: str,
|
||||
width: int,
|
||||
height: int,
|
||||
duration: int,
|
||||
thumb: "PhotoSize" = None,
|
||||
mime_type: str = None,
|
||||
file_size: int = None):
|
||||
self.file_id = file_id
|
||||
self.width = width
|
||||
self.height = height
|
||||
self.duration = duration
|
||||
self.thumb = thumb
|
||||
self.mime_type = mime_type
|
||||
self.file_size = file_size
|
@ -1,12 +0,0 @@
|
||||
class VideoNote:
|
||||
def __init__(self,
|
||||
file_id: str,
|
||||
length: int,
|
||||
duration: int,
|
||||
thumb: "PhotoSize" = None,
|
||||
file_size: int = None):
|
||||
self.file_id = file_id
|
||||
self.length = length
|
||||
self.duration = duration
|
||||
self.thumb = thumb
|
||||
self.file_size = file_size
|
@ -1,10 +0,0 @@
|
||||
class Voice:
|
||||
def __init__(self,
|
||||
file_id: str,
|
||||
duration: int,
|
||||
mime_type: str = None,
|
||||
file_size: int = None):
|
||||
self.file_id = file_id
|
||||
self.duration = duration
|
||||
self.mime_type = mime_type
|
||||
self.file_size = file_size
|
Loading…
Reference in New Issue
Block a user