pyrofork: Move some method and types to payments category

Signed-off-by: wulan17 <wulan17@nusantararom.org>
This commit is contained in:
wulan17 2024-10-07 19:21:33 +07:00
parent b152bd9c84
commit e4968df4c9
No known key found for this signature in database
GPG key ID: 318CD6CD3A6AC0A5
31 changed files with 91 additions and 68 deletions

View file

@ -183,7 +183,6 @@ def pyrogram_api():
send_contact
send_cached_media
send_reaction
send_paid_reaction
edit_message_text
edit_message_caption
edit_message_media
@ -349,7 +348,14 @@ def pyrogram_api():
Payments
apply_gift_code
check_gift_code
create_invoice_link
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
""",
password="""
@ -384,13 +390,7 @@ def pyrogram_api():
Telegram Business
answer_pre_checkout_query
answer_shipping_query
create_invoice_link
get_business_connection
get_stars_transactions
get_stars_transactions_by_id
refund_star_payment
send_invoice
send_paid_media
""",
authorization="""
Authorization
@ -500,7 +500,6 @@ def pyrogram_api():
AvailableEffect
Document
Animation
LabeledPrice
Video
Voice
VideoNote
@ -510,7 +509,6 @@ def pyrogram_api():
Sticker
StickerSet
Game
GiftedPremium
Giveaway
GiveawayLaunched
GiveawayResult
@ -565,9 +563,21 @@ def pyrogram_api():
""",
payment="""
Payment
GiftCode
CheckedGiftCode
ExtendedMediaPreview
GiftCode
GiftedPremium
InputStarsTransaction
Invoice
LabeledPrice
PaidMedia
PaymentForm
PaymentInfo
PaymentRefunded
PurchasedPaidMedia
StarsStatus
StarsTransaction
SuccessfulPayment
""",
pyromod="""
Pyromod
@ -605,8 +615,6 @@ def pyrogram_api():
MenuButtonWebApp
MenuButtonDefault
SentWebAppMessage
PreCheckoutQuery
PurchasedPaidMedia
""",
bot_commands="""
Bot commands
@ -622,18 +630,10 @@ def pyrogram_api():
""",
business="""
Telegram Business
ExtendedMediaPreview
InputStarsTransaction
Invoice
PaidMedia
PaymentInfo
PaymentRefunded
PreCheckoutQuery
ShippingAddress
ShippingOption
ShippingQuery
StarsStatus
StarsTransaction
SuccessfulPayment
""",
input_media="""
Input Media

View file

@ -17,23 +17,11 @@
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
from .answer_pre_checkout_query import AnswerPreCheckoutQuery
from .create_invoice_link import CreateInvoiceLink
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(
AnswerPreCheckoutQuery,
CreateInvoiceLink,
GetBusinessConnection,
GetStarsTransactions,
GetStarsTransactionsById,
RefundStarPayment,
SendInvoice,
SendPaidMedia
GetBusinessConnection
):
pass

View file

@ -60,7 +60,6 @@ from .send_document import SendDocument
from .send_location import SendLocation
from .send_media_group import SendMediaGroup
from .send_message import SendMessage
from .send_paid_reaction import SendPaidReaction
from .send_photo import SendPhoto
from .send_poll import SendPoll
from .send_reaction import SendReaction
@ -96,7 +95,6 @@ class Messages(
SendLocation,
SendMediaGroup,
SendMessage,
SendPaidReaction,
SendPhoto,
SendSticker,
SendVenue,

View file

@ -19,13 +19,27 @@
from .apply_gift_code import ApplyGiftCode
from .check_giftcode import CheckGiftCode
from .create_invoice_link import CreateInvoiceLink
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
class Payments(
ApplyGiftCode,
CheckGiftCode,
CreateInvoiceLink,
GetPaymentForm,
GetStarsTransactions,
GetStarsTransactionsById,
RefundStarPayment,
SendPaidReaction,
SendPaidMedia,
SendInvoice,
SendPaymentForm
):
pass

View file

@ -28,4 +28,5 @@ from .messages_and_media import *
from .object import Object
from .update import *
from .user_and_chats import *
from .payments import *
from .pyromod import *

View file

@ -54,7 +54,6 @@ from .requested_chats import RequestedChats
from .requested_user import RequestedUser
from .sent_web_app_message import SentWebAppMessage
from .web_app_info import WebAppInfo
from .purchased_paid_media import PurchasedPaidMedia
__all__ = [
"BotAllowed",
@ -93,6 +92,5 @@ __all__ = [
"MenuButtonCommands",
"MenuButtonWebApp",
"MenuButtonDefault",
"SentWebAppMessage",
"PurchasedPaidMedia"
"SentWebAppMessage"
]

View file

@ -16,32 +16,14 @@
# 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 .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 .shipping_address import ShippingAddress
from .shipping_option import ShippingOption
from .shipping_query import ShippingQuery
from .stars_status import StarsStatus
from .stars_transaction import StarsTransaction
from .successful_payment import SuccessfulPayment
__all__ = [
"ExtendedMediaPreview",
"Invoice",
"InputStarsTransaction",
"PaidMedia",
"PaymentInfo",
"PaymentRefunded",
"PreCheckoutQuery",
"StarsStatus",
"StarsTransaction",
"ShippingAddress",
"ShippingOption",
"ShippingQuery",
"SuccessfulPayment"
"ShippingQuery"
]

View file

@ -22,25 +22,20 @@ from .audio import Audio
from .available_effect import AvailableEffect
from .chat_theme import ChatTheme
from .chat_wallpaper import ChatWallpaper
from .checked_gift_code import CheckedGiftCode
from .contact import Contact
from .contact_registered import ContactRegistered
from .dice import Dice
from .document import Document
from .game import Game
from .gift_code import GiftCode
from .gifted_premium import GiftedPremium
from .giveaway import Giveaway
from .giveaway_launched import GiveawayLaunched
from .giveaway_result import GiveawayResult
from .labeled_price import LabeledPrice
from .location import Location
from .media_area import MediaArea
from .media_area_channel_post import MediaAreaChannelPost
from .media_area_coordinates import MediaAreaCoordinates
from .message import Message
from .message_entity import MessageEntity
from .payment_form import PaymentForm
from .photo import Photo
from .poll import Poll
from .poll_option import PollOption
@ -85,20 +80,15 @@ __all__ = [
"ContactRegistered",
"Document",
"Game",
"GiftCode",
"CheckedGiftCode",
"GiftedPremium",
"Giveaway",
"GiveawayLaunched",
"GiveawayResult",
"LabeledPrice",
"Location",
"MediaArea",
"MediaAreaChannelPost",
"MediaAreaCoordinates",
"Message",
"MessageEntity",
"PaymentForm",
"Photo",
"Thumbnail",
"StrippedThumbnail",

View 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"
]