mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2025-12-29 12:04:51 +00:00
pyrofork: Move some method and types to payments category
Signed-off-by: wulan17 <wulan17@nusantararom.org>
This commit is contained in:
parent
b152bd9c84
commit
e4968df4c9
31 changed files with 91 additions and 68 deletions
|
|
@ -183,7 +183,6 @@ def pyrogram_api():
|
||||||
send_contact
|
send_contact
|
||||||
send_cached_media
|
send_cached_media
|
||||||
send_reaction
|
send_reaction
|
||||||
send_paid_reaction
|
|
||||||
edit_message_text
|
edit_message_text
|
||||||
edit_message_caption
|
edit_message_caption
|
||||||
edit_message_media
|
edit_message_media
|
||||||
|
|
@ -349,7 +348,14 @@ def pyrogram_api():
|
||||||
Payments
|
Payments
|
||||||
apply_gift_code
|
apply_gift_code
|
||||||
check_gift_code
|
check_gift_code
|
||||||
|
create_invoice_link
|
||||||
get_payment_form
|
get_payment_form
|
||||||
|
get_stars_transactions
|
||||||
|
get_stars_transactions_by_id
|
||||||
|
refund_star_payment
|
||||||
|
send_invoice
|
||||||
|
send_paid_media
|
||||||
|
send_paid_reaction
|
||||||
send_payment_form
|
send_payment_form
|
||||||
""",
|
""",
|
||||||
password="""
|
password="""
|
||||||
|
|
@ -384,13 +390,7 @@ def pyrogram_api():
|
||||||
Telegram Business
|
Telegram Business
|
||||||
answer_pre_checkout_query
|
answer_pre_checkout_query
|
||||||
answer_shipping_query
|
answer_shipping_query
|
||||||
create_invoice_link
|
|
||||||
get_business_connection
|
get_business_connection
|
||||||
get_stars_transactions
|
|
||||||
get_stars_transactions_by_id
|
|
||||||
refund_star_payment
|
|
||||||
send_invoice
|
|
||||||
send_paid_media
|
|
||||||
""",
|
""",
|
||||||
authorization="""
|
authorization="""
|
||||||
Authorization
|
Authorization
|
||||||
|
|
@ -500,7 +500,6 @@ def pyrogram_api():
|
||||||
AvailableEffect
|
AvailableEffect
|
||||||
Document
|
Document
|
||||||
Animation
|
Animation
|
||||||
LabeledPrice
|
|
||||||
Video
|
Video
|
||||||
Voice
|
Voice
|
||||||
VideoNote
|
VideoNote
|
||||||
|
|
@ -510,7 +509,6 @@ def pyrogram_api():
|
||||||
Sticker
|
Sticker
|
||||||
StickerSet
|
StickerSet
|
||||||
Game
|
Game
|
||||||
GiftedPremium
|
|
||||||
Giveaway
|
Giveaway
|
||||||
GiveawayLaunched
|
GiveawayLaunched
|
||||||
GiveawayResult
|
GiveawayResult
|
||||||
|
|
@ -565,9 +563,21 @@ def pyrogram_api():
|
||||||
""",
|
""",
|
||||||
payment="""
|
payment="""
|
||||||
Payment
|
Payment
|
||||||
GiftCode
|
|
||||||
CheckedGiftCode
|
CheckedGiftCode
|
||||||
|
ExtendedMediaPreview
|
||||||
|
GiftCode
|
||||||
|
GiftedPremium
|
||||||
|
InputStarsTransaction
|
||||||
|
Invoice
|
||||||
|
LabeledPrice
|
||||||
|
PaidMedia
|
||||||
PaymentForm
|
PaymentForm
|
||||||
|
PaymentInfo
|
||||||
|
PaymentRefunded
|
||||||
|
PurchasedPaidMedia
|
||||||
|
StarsStatus
|
||||||
|
StarsTransaction
|
||||||
|
SuccessfulPayment
|
||||||
""",
|
""",
|
||||||
pyromod="""
|
pyromod="""
|
||||||
Pyromod
|
Pyromod
|
||||||
|
|
@ -605,8 +615,6 @@ def pyrogram_api():
|
||||||
MenuButtonWebApp
|
MenuButtonWebApp
|
||||||
MenuButtonDefault
|
MenuButtonDefault
|
||||||
SentWebAppMessage
|
SentWebAppMessage
|
||||||
PreCheckoutQuery
|
|
||||||
PurchasedPaidMedia
|
|
||||||
""",
|
""",
|
||||||
bot_commands="""
|
bot_commands="""
|
||||||
Bot commands
|
Bot commands
|
||||||
|
|
@ -622,18 +630,10 @@ def pyrogram_api():
|
||||||
""",
|
""",
|
||||||
business="""
|
business="""
|
||||||
Telegram Business
|
Telegram Business
|
||||||
ExtendedMediaPreview
|
PreCheckoutQuery
|
||||||
InputStarsTransaction
|
|
||||||
Invoice
|
|
||||||
PaidMedia
|
|
||||||
PaymentInfo
|
|
||||||
PaymentRefunded
|
|
||||||
ShippingAddress
|
ShippingAddress
|
||||||
ShippingOption
|
ShippingOption
|
||||||
ShippingQuery
|
ShippingQuery
|
||||||
StarsStatus
|
|
||||||
StarsTransaction
|
|
||||||
SuccessfulPayment
|
|
||||||
""",
|
""",
|
||||||
input_media="""
|
input_media="""
|
||||||
Input Media
|
Input Media
|
||||||
|
|
|
||||||
|
|
@ -17,23 +17,11 @@
|
||||||
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
|
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from .answer_pre_checkout_query import AnswerPreCheckoutQuery
|
from .answer_pre_checkout_query import AnswerPreCheckoutQuery
|
||||||
from .create_invoice_link import CreateInvoiceLink
|
|
||||||
from .get_business_connection import GetBusinessConnection
|
from .get_business_connection import GetBusinessConnection
|
||||||
from .get_stars_transactions import GetStarsTransactions
|
|
||||||
from .get_stars_transactions_by_id import GetStarsTransactionsById
|
|
||||||
from .refund_stars_payment import RefundStarPayment
|
|
||||||
from .send_invoice import SendInvoice
|
|
||||||
from .send_paid_media import SendPaidMedia
|
|
||||||
|
|
||||||
|
|
||||||
class TelegramBusiness(
|
class TelegramBusiness(
|
||||||
AnswerPreCheckoutQuery,
|
AnswerPreCheckoutQuery,
|
||||||
CreateInvoiceLink,
|
GetBusinessConnection
|
||||||
GetBusinessConnection,
|
|
||||||
GetStarsTransactions,
|
|
||||||
GetStarsTransactionsById,
|
|
||||||
RefundStarPayment,
|
|
||||||
SendInvoice,
|
|
||||||
SendPaidMedia
|
|
||||||
):
|
):
|
||||||
pass
|
pass
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,6 @@ from .send_document import SendDocument
|
||||||
from .send_location import SendLocation
|
from .send_location import SendLocation
|
||||||
from .send_media_group import SendMediaGroup
|
from .send_media_group import SendMediaGroup
|
||||||
from .send_message import SendMessage
|
from .send_message import SendMessage
|
||||||
from .send_paid_reaction import SendPaidReaction
|
|
||||||
from .send_photo import SendPhoto
|
from .send_photo import SendPhoto
|
||||||
from .send_poll import SendPoll
|
from .send_poll import SendPoll
|
||||||
from .send_reaction import SendReaction
|
from .send_reaction import SendReaction
|
||||||
|
|
@ -96,7 +95,6 @@ class Messages(
|
||||||
SendLocation,
|
SendLocation,
|
||||||
SendMediaGroup,
|
SendMediaGroup,
|
||||||
SendMessage,
|
SendMessage,
|
||||||
SendPaidReaction,
|
|
||||||
SendPhoto,
|
SendPhoto,
|
||||||
SendSticker,
|
SendSticker,
|
||||||
SendVenue,
|
SendVenue,
|
||||||
|
|
|
||||||
|
|
@ -19,13 +19,27 @@
|
||||||
|
|
||||||
from .apply_gift_code import ApplyGiftCode
|
from .apply_gift_code import ApplyGiftCode
|
||||||
from .check_giftcode import CheckGiftCode
|
from .check_giftcode import CheckGiftCode
|
||||||
|
from .create_invoice_link import CreateInvoiceLink
|
||||||
from .get_payment_form import GetPaymentForm
|
from .get_payment_form import GetPaymentForm
|
||||||
|
from .get_stars_transactions import GetStarsTransactions
|
||||||
|
from .get_stars_transactions_by_id import GetStarsTransactionsById
|
||||||
|
from .refund_stars_payment import RefundStarPayment
|
||||||
|
from .send_invoice import SendInvoice
|
||||||
|
from .send_paid_media import SendPaidMedia
|
||||||
|
from .send_paid_reaction import SendPaidReaction
|
||||||
from .send_payment_form import SendPaymentForm
|
from .send_payment_form import SendPaymentForm
|
||||||
|
|
||||||
class Payments(
|
class Payments(
|
||||||
ApplyGiftCode,
|
ApplyGiftCode,
|
||||||
CheckGiftCode,
|
CheckGiftCode,
|
||||||
|
CreateInvoiceLink,
|
||||||
GetPaymentForm,
|
GetPaymentForm,
|
||||||
|
GetStarsTransactions,
|
||||||
|
GetStarsTransactionsById,
|
||||||
|
RefundStarPayment,
|
||||||
|
SendPaidReaction,
|
||||||
|
SendPaidMedia,
|
||||||
|
SendInvoice,
|
||||||
SendPaymentForm
|
SendPaymentForm
|
||||||
):
|
):
|
||||||
pass
|
pass
|
||||||
|
|
|
||||||
|
|
@ -28,4 +28,5 @@ from .messages_and_media import *
|
||||||
from .object import Object
|
from .object import Object
|
||||||
from .update import *
|
from .update import *
|
||||||
from .user_and_chats import *
|
from .user_and_chats import *
|
||||||
|
from .payments import *
|
||||||
from .pyromod import *
|
from .pyromod import *
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,6 @@ from .requested_chats import RequestedChats
|
||||||
from .requested_user import RequestedUser
|
from .requested_user import RequestedUser
|
||||||
from .sent_web_app_message import SentWebAppMessage
|
from .sent_web_app_message import SentWebAppMessage
|
||||||
from .web_app_info import WebAppInfo
|
from .web_app_info import WebAppInfo
|
||||||
from .purchased_paid_media import PurchasedPaidMedia
|
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
"BotAllowed",
|
"BotAllowed",
|
||||||
|
|
@ -93,6 +92,5 @@ __all__ = [
|
||||||
"MenuButtonCommands",
|
"MenuButtonCommands",
|
||||||
"MenuButtonWebApp",
|
"MenuButtonWebApp",
|
||||||
"MenuButtonDefault",
|
"MenuButtonDefault",
|
||||||
"SentWebAppMessage",
|
"SentWebAppMessage"
|
||||||
"PurchasedPaidMedia"
|
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -16,32 +16,14 @@
|
||||||
# You should have received a copy of the GNU Lesser General Public License
|
# You should have received a copy of the GNU Lesser General Public License
|
||||||
# along with Pyrofork. If not, see <http://www.gnu.org/licenses/>.
|
# along with Pyrofork. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from .extended_media_preview import ExtendedMediaPreview
|
|
||||||
from .input_stars_transaction import InputStarsTransaction
|
|
||||||
from .invoice import Invoice
|
|
||||||
from .paid_media import PaidMedia
|
|
||||||
from .payment_info import PaymentInfo
|
|
||||||
from .payment_refunded import PaymentRefunded
|
|
||||||
from .pre_checkout_query import PreCheckoutQuery
|
from .pre_checkout_query import PreCheckoutQuery
|
||||||
from .shipping_address import ShippingAddress
|
from .shipping_address import ShippingAddress
|
||||||
from .shipping_option import ShippingOption
|
from .shipping_option import ShippingOption
|
||||||
from .shipping_query import ShippingQuery
|
from .shipping_query import ShippingQuery
|
||||||
from .stars_status import StarsStatus
|
|
||||||
from .stars_transaction import StarsTransaction
|
|
||||||
from .successful_payment import SuccessfulPayment
|
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
"ExtendedMediaPreview",
|
|
||||||
"Invoice",
|
|
||||||
"InputStarsTransaction",
|
|
||||||
"PaidMedia",
|
|
||||||
"PaymentInfo",
|
|
||||||
"PaymentRefunded",
|
|
||||||
"PreCheckoutQuery",
|
"PreCheckoutQuery",
|
||||||
"StarsStatus",
|
|
||||||
"StarsTransaction",
|
|
||||||
"ShippingAddress",
|
"ShippingAddress",
|
||||||
"ShippingOption",
|
"ShippingOption",
|
||||||
"ShippingQuery",
|
"ShippingQuery"
|
||||||
"SuccessfulPayment"
|
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -22,25 +22,20 @@ from .audio import Audio
|
||||||
from .available_effect import AvailableEffect
|
from .available_effect import AvailableEffect
|
||||||
from .chat_theme import ChatTheme
|
from .chat_theme import ChatTheme
|
||||||
from .chat_wallpaper import ChatWallpaper
|
from .chat_wallpaper import ChatWallpaper
|
||||||
from .checked_gift_code import CheckedGiftCode
|
|
||||||
from .contact import Contact
|
from .contact import Contact
|
||||||
from .contact_registered import ContactRegistered
|
from .contact_registered import ContactRegistered
|
||||||
from .dice import Dice
|
from .dice import Dice
|
||||||
from .document import Document
|
from .document import Document
|
||||||
from .game import Game
|
from .game import Game
|
||||||
from .gift_code import GiftCode
|
|
||||||
from .gifted_premium import GiftedPremium
|
|
||||||
from .giveaway import Giveaway
|
from .giveaway import Giveaway
|
||||||
from .giveaway_launched import GiveawayLaunched
|
from .giveaway_launched import GiveawayLaunched
|
||||||
from .giveaway_result import GiveawayResult
|
from .giveaway_result import GiveawayResult
|
||||||
from .labeled_price import LabeledPrice
|
|
||||||
from .location import Location
|
from .location import Location
|
||||||
from .media_area import MediaArea
|
from .media_area import MediaArea
|
||||||
from .media_area_channel_post import MediaAreaChannelPost
|
from .media_area_channel_post import MediaAreaChannelPost
|
||||||
from .media_area_coordinates import MediaAreaCoordinates
|
from .media_area_coordinates import MediaAreaCoordinates
|
||||||
from .message import Message
|
from .message import Message
|
||||||
from .message_entity import MessageEntity
|
from .message_entity import MessageEntity
|
||||||
from .payment_form import PaymentForm
|
|
||||||
from .photo import Photo
|
from .photo import Photo
|
||||||
from .poll import Poll
|
from .poll import Poll
|
||||||
from .poll_option import PollOption
|
from .poll_option import PollOption
|
||||||
|
|
@ -85,20 +80,15 @@ __all__ = [
|
||||||
"ContactRegistered",
|
"ContactRegistered",
|
||||||
"Document",
|
"Document",
|
||||||
"Game",
|
"Game",
|
||||||
"GiftCode",
|
|
||||||
"CheckedGiftCode",
|
|
||||||
"GiftedPremium",
|
|
||||||
"Giveaway",
|
"Giveaway",
|
||||||
"GiveawayLaunched",
|
"GiveawayLaunched",
|
||||||
"GiveawayResult",
|
"GiveawayResult",
|
||||||
"LabeledPrice",
|
|
||||||
"Location",
|
"Location",
|
||||||
"MediaArea",
|
"MediaArea",
|
||||||
"MediaAreaChannelPost",
|
"MediaAreaChannelPost",
|
||||||
"MediaAreaCoordinates",
|
"MediaAreaCoordinates",
|
||||||
"Message",
|
"Message",
|
||||||
"MessageEntity",
|
"MessageEntity",
|
||||||
"PaymentForm",
|
|
||||||
"Photo",
|
"Photo",
|
||||||
"Thumbnail",
|
"Thumbnail",
|
||||||
"StrippedThumbnail",
|
"StrippedThumbnail",
|
||||||
|
|
|
||||||
52
pyrogram/types/payments/__init__.py
Normal file
52
pyrogram/types/payments/__init__.py
Normal file
|
|
@ -0,0 +1,52 @@
|
||||||
|
# Pyrofork - Telegram MTProto API Client Library for Python
|
||||||
|
# Copyright (C) 2017-present Dan <https://github.com/delivrance>
|
||||||
|
# Copyright (C) 2022-present Mayuri-Chan <https://github.com/Mayuri-Chan>
|
||||||
|
#
|
||||||
|
# This file is part of Pyrofork.
|
||||||
|
#
|
||||||
|
# Pyrofork is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU Lesser General Public License as published
|
||||||
|
# by the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# Pyrofork is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU Lesser General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Lesser General Public License
|
||||||
|
# along with Pyrofork. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from .extended_media_preview import ExtendedMediaPreview
|
||||||
|
from .checked_gift_code import CheckedGiftCode
|
||||||
|
from .gift_code import GiftCode
|
||||||
|
from .gifted_premium import GiftedPremium
|
||||||
|
from .input_stars_transaction import InputStarsTransaction
|
||||||
|
from .invoice import Invoice
|
||||||
|
from .labeled_price import LabeledPrice
|
||||||
|
from .paid_media import PaidMedia
|
||||||
|
from .payment_form import PaymentForm
|
||||||
|
from .payment_info import PaymentInfo
|
||||||
|
from .payment_refunded import PaymentRefunded
|
||||||
|
from .purchased_paid_media import PurchasedPaidMedia
|
||||||
|
from .stars_status import StarsStatus
|
||||||
|
from .stars_transaction import StarsTransaction
|
||||||
|
from .successful_payment import SuccessfulPayment
|
||||||
|
|
||||||
|
__all__ = [
|
||||||
|
"ExtendedMediaPreview",
|
||||||
|
"CheckedGiftCode",
|
||||||
|
"GiftCode",
|
||||||
|
"GiftedPremium",
|
||||||
|
"InputStarsTransaction",
|
||||||
|
"Invoice",
|
||||||
|
"LabeledPrice",
|
||||||
|
"PaidMedia",
|
||||||
|
"PaymentForm",
|
||||||
|
"PaymentInfo",
|
||||||
|
"PaymentRefunded",
|
||||||
|
"PurchasedPaidMedia",
|
||||||
|
"StarsStatus",
|
||||||
|
"StarsTransaction",
|
||||||
|
"SuccessfulPayment"
|
||||||
|
]
|
||||||
Loading…
Reference in a new issue