mirror of
https://github.com/MarshalX/telegram-crawler.git
synced 2025-03-14 04:51:42 +01:00
Update content of files
This commit is contained in:
parent
12b81bc4ff
commit
2913725640
2 changed files with 35 additions and 0 deletions
|
@ -110,6 +110,37 @@ To get info about existing chat invites, optionally filtering only links created
|
|||
Use <a href="/method/messages.deleteExportedChatInvite">messages.deleteExportedChatInvite</a> to permanently remove an invite link, and <a href="/method/messages.deleteRevokedExportedChatInvites">messages.deleteRevokedExportedChatInvites</a> to permanently remove a revoked invite link. </p>
|
||||
<p><a href="/method/messages.getChatInviteImporters">messages.getChatInviteImporters</a> can be used to fetch info about users that joined using a specific invite link. </p>
|
||||
<p>Some basic stats about the number of invite links generated by a given admin can be fetched using <a href="/method/messages.getAdminsWithInvites">messages.getAdminsWithInvites</a>. </p>
|
||||
<h4><a class="anchor" href="#paid-invite-links" id="paid-invite-links" name="paid-invite-links"><i class="anchor-icon"></i></a>Paid invite links</h4>
|
||||
<pre><code><a href='/constructor/starsSubscriptionPricing'>starsSubscriptionPricing</a>#05416d58 period:<a href='/type/int'>int</a> amount:<a href='/type/long'>long</a> = <a href='/type/StarsSubscriptionPricing'>StarsSubscriptionPricing</a>;
|
||||
|
||||
<a href='/constructor/chatInvite'>chatInvite</a>#fe65389d flags:<a href='/type/%23'>#</a> channel:flags.0?<a href='/constructor/true'>true</a> broadcast:flags.1?<a href='/constructor/true'>true</a> public:flags.2?<a href='/constructor/true'>true</a> megagroup:flags.3?<a href='/constructor/true'>true</a> request_needed:flags.6?<a href='/constructor/true'>true</a> verified:flags.7?<a href='/constructor/true'>true</a> scam:flags.8?<a href='/constructor/true'>true</a> fake:flags.9?<a href='/constructor/true'>true</a> can_refulfill_subscription:flags.11?<a href='/constructor/true'>true</a> title:<a href='/type/string'>string</a> about:flags.5?<a href='/type/string'>string</a> photo:<a href='/type/Photo'>Photo</a> participants_count:<a href='/type/int'>int</a> participants:flags.4?<a href='/type/Vector%20t'>Vector</a><<a href='/type/User'>User</a>> color:<a href='/type/int'>int</a> subscription_pricing:flags.10?<a href='/type/StarsSubscriptionPricing'>StarsSubscriptionPricing</a> subscription_form_id:flags.12?<a href='/type/long'>long</a> = <a href='/type/ChatInvite'>ChatInvite</a>;
|
||||
|
||||
<a href='/constructor/inputInvoiceChatInviteSubscription'>inputInvoiceChatInviteSubscription</a>#34e793f1 hash:<a href='/type/string'>string</a> = <a href='/type/InputInvoice'>InputInvoice</a>;
|
||||
|
||||
<a href='/constructor/payments.starsStatus'>payments.starsStatus</a>#bbfa316c flags:<a href='/type/%23'>#</a> balance:<a href='/type/long'>long</a> subscriptions:flags.1?<a href='/type/Vector%20t'>Vector</a><<a href='/type/StarsSubscription'>StarsSubscription</a>> subscriptions_next_offset:flags.2?<a href='/type/string'>string</a> subscriptions_missing_balance:flags.4?<a href='/type/long'>long</a> history:flags.3?<a href='/type/Vector%20t'>Vector</a><<a href='/type/StarsTransaction'>StarsTransaction</a>> next_offset:flags.0?<a href='/type/string'>string</a> chats:<a href='/type/Vector%20t'>Vector</a><<a href='/type/Chat'>Chat</a>> users:<a href='/type/Vector%20t'>Vector</a><<a href='/type/User'>User</a>> = <a href='/type/payments.StarsStatus'>payments.StarsStatus</a>;
|
||||
<a href='/constructor/starsSubscription'>starsSubscription</a>#538ecf18 flags:<a href='/type/%23'>#</a> canceled:flags.0?<a href='/constructor/true'>true</a> can_refulfill:flags.1?<a href='/constructor/true'>true</a> missing_balance:flags.2?<a href='/constructor/true'>true</a> id:<a href='/type/string'>string</a> peer:<a href='/type/Peer'>Peer</a> until_date:<a href='/type/int'>int</a> pricing:<a href='/type/StarsSubscriptionPricing'>StarsSubscriptionPricing</a> chat_invite_hash:flags.3?<a href='/type/string'>string</a> = <a href='/type/StarsSubscription'>StarsSubscription</a>;
|
||||
|
||||
---functions---
|
||||
|
||||
<a href='/method/messages.exportChatInvite'>messages.exportChatInvite</a>#a455de90 flags:<a href='/type/%23'>#</a> legacy_revoke_permanent:flags.2?<a href='/constructor/true'>true</a> request_needed:flags.3?<a href='/constructor/true'>true</a> peer:<a href='/type/InputPeer'>InputPeer</a> expire_date:flags.0?<a href='/type/int'>int</a> usage_limit:flags.1?<a href='/type/int'>int</a> title:flags.4?<a href='/type/string'>string</a> subscription_pricing:flags.5?<a href='/type/StarsSubscriptionPricing'>StarsSubscriptionPricing</a> = <a href='/type/ExportedChatInvite'>ExportedChatInvite</a>;
|
||||
|
||||
<a href='/method/messages.checkChatInvite'>messages.checkChatInvite</a>#3eadb1bb hash:<a href='/type/string'>string</a> = <a href='/type/ChatInvite'>ChatInvite</a>;
|
||||
|
||||
<a href='/method/messages.importChatInvite'>messages.importChatInvite</a>#6c50051c hash:<a href='/type/string'>string</a> = <a href='/type/Updates'>Updates</a>;
|
||||
<a href='/method/payments.fulfillStarsSubscription'>payments.fulfillStarsSubscription</a>#cc5bebb3 peer:<a href='/type/InputPeer'>InputPeer</a> subscription_id:<a href='/type/string'>string</a> = <a href='/type/Bool'>Bool</a>;
|
||||
|
||||
<a href='/method/payments.getStarsSubscriptions'>payments.getStarsSubscriptions</a>#032512c5 flags:<a href='/type/%23'>#</a> missing_balance:flags.0?<a href='/constructor/true'>true</a> peer:<a href='/type/InputPeer'>InputPeer</a> offset:<a href='/type/string'>string</a> = <a href='/type/payments.StarsStatus'>payments.StarsStatus</a>;
|
||||
<a href='/method/payments.changeStarsSubscription'>payments.changeStarsSubscription</a>#c7770878 flags:<a href='/type/%23'>#</a> peer:<a href='/type/InputPeer'>InputPeer</a> subscription_id:<a href='/type/string'>string</a> canceled:flags.0?<a href='/type/Bool'>Bool</a> = <a href='/type/Bool'>Bool</a>;</code></pre>
|
||||
<p>Channel administrators can create special invite links that allow joining a channel in exchange for a monthly payment in Telegram Stars. </p>
|
||||
<p>To create such links, invoke <a href="/method/messages.exportChatInvite">messages.exportChatInvite</a> passing a <a href="/constructor/starsSubscriptionPricing">starsSubscriptionPricing</a> constructor to <code>subscription_pricing</code>, passing in <code>peer</code> the <strong>private channel</strong> we wish to sell access to, and in <code>amount</code> the amount of Telegram Stars users should pay every <code>period</code> seconds to gain and maintain access to the channel.<br>
|
||||
Currently the only allowed subscription period is <code>30*24*60*60</code>, i.e. the user will be debited <code>amount</code> stars every month. </p>
|
||||
<p>Users obtaining info about the invitation link using <a href="/method/messages.checkChatInvite">messages.checkChatInvite</a> will obtain a <a href="/constructor/chatInvite">chatInvite</a> constructor with the <code>subscription_pricing</code> and <code>subscription_form_id</code> flags set. </p>
|
||||
<p>To pay for the subscription, follow the <a href="/api/payments">usual payment flow »</a>, with the following variation: since subscriptions already have a pre-generated form contained in the <code>subscription_form_id</code> returned in <a href="/constructor/chatInvite">chatInvite</a>, the first two steps of the <a href="/api/payments">payment flow »</a> (those used to generate a payment form) must be skipped, starting directly at the <a href="/method/payments.sendStarsForm">payments.sendStarsForm</a> call in <a href="/api/payments#3-payment">step 3 »</a>, passing to <code>invoice</code> an <a href="/constructor/inputInvoiceChatInviteSubscription">inputInvoiceChatInviteSubscription</a> with the <code>hash</code> component of the <a href="/api/links#message-links">invite link</a>, and to <code>form_id</code> the <a href="/constructor/chatInvite">chatInvite</a>.<code>subscription_form_id</code>. </p>
|
||||
<p>Once the payment is successfully completed, the user will be automatically added to the channel, without having to invoke <a href="/method/messages.importChatInvite">messages.importChatInvite</a> to join the private channel. </p>
|
||||
<p>If the user decides to leave the channel without cancelling the subscription (or before the end of the current cancelled subscription period), subsequent calls to <a href="/method/messages.checkChatInvite">messages.checkChatInvite</a> will return a <a href="/constructor/chatInvite">chatInvite</a> with the <code>can_refulfill_subscription</code> flag set, indicating that they may re-join the channel using <a href="/method/payments.fulfillStarsSubscription">payments.fulfillStarsSubscription</a> (passing <a href="/constructor/inputPeerSelf">inputPeerSelf</a> to <code>peer</code> and the <a href="/constructor/starsSubscription">starsSubscription</a>.<code>id</code> to <code>subscription_id</code>) without repeating the payment; the <code>subscription_pricing</code> will also be returned, but no <code>subscription_form_id</code> will be returned. </p>
|
||||
<p>To obtain a list of all active and cancelled subscriptions invoke <a href="/method/payments.getStarsSubscriptions">payments.getStarsSubscriptions</a>, passing <a href="/constructor/inputPeerSelf">inputPeerSelf</a> to <code>peer</code>: this will return a vector of <a href="/constructor/starsSubscription">starsSubscription</a> constructors, containing info about each subscription. </p>
|
||||
<p>To cancel an active subscription, invoke <a href="/method/payments.changeStarsSubscription">payments.changeStarsSubscription</a> passing <a href="/constructor/inputPeerSelf">inputPeerSelf</a> to <code>peer</code>, the <a href="/constructor/starsSubscription">starsSubscription</a>.<code>id</code> to <code>subscription_id</code> and <a href="/constructor/boolTrue">boolTrue</a> to <code>canceled</code>; to resubscribe, invoke the same method passing <a href="/constructor/boolFalse">boolFalse</a> to <code>canceled</code>. </p>
|
||||
<p>When we get close to the end of the subscription period of an active subscription, the <a href="/api/config#suggestions">"STARS_SUBSCRIPTION_LOW_BALANCE" suggestion »</a> will be activated: when the user clicks on the suggestion, the client should fetch and display the list of expiring subscriptions by invoking <a href="/method/payments.getStarsSubscriptions">payments.getStarsSubscriptions</a>, passing <a href="/constructor/inputPeerSelf">inputPeerSelf</a> to <code>peer</code> and setting the <code>missing_balance</code> flag: they may be renewed by following the payment flow described above, using the <code>chat_invite_hash</code>es from the returned <a href="/constructor/starsSubscription">starsSubscription</a>s. </p>
|
||||
<h3><a class="anchor" href="#join-requests" id="join-requests" name="join-requests"><i class="anchor-icon"></i></a>Join requests</h3>
|
||||
<pre><code><a href='/constructor/channel'>channel</a>#fe4478bd flags:<a href='/type/%23'>#</a> creator:flags.0?<a href='/constructor/true'>true</a> left:flags.2?<a href='/constructor/true'>true</a> broadcast:flags.5?<a href='/constructor/true'>true</a> verified:flags.7?<a href='/constructor/true'>true</a> megagroup:flags.8?<a href='/constructor/true'>true</a> restricted:flags.9?<a href='/constructor/true'>true</a> signatures:flags.11?<a href='/constructor/true'>true</a> min:flags.12?<a href='/constructor/true'>true</a> scam:flags.19?<a href='/constructor/true'>true</a> has_link:flags.20?<a href='/constructor/true'>true</a> has_geo:flags.21?<a href='/constructor/true'>true</a> slowmode_enabled:flags.22?<a href='/constructor/true'>true</a> call_active:flags.23?<a href='/constructor/true'>true</a> call_not_empty:flags.24?<a href='/constructor/true'>true</a> fake:flags.25?<a href='/constructor/true'>true</a> gigagroup:flags.26?<a href='/constructor/true'>true</a> noforwards:flags.27?<a href='/constructor/true'>true</a> join_to_send:flags.28?<a href='/constructor/true'>true</a> join_request:flags.29?<a href='/constructor/true'>true</a> forum:flags.30?<a href='/constructor/true'>true</a> flags2:<a href='/type/%23'>#</a> stories_hidden:flags2.1?<a href='/constructor/true'>true</a> stories_hidden_min:flags2.2?<a href='/constructor/true'>true</a> stories_unavailable:flags2.3?<a href='/constructor/true'>true</a> signature_profiles:flags2.12?<a href='/constructor/true'>true</a> id:<a href='/type/long'>long</a> access_hash:flags.13?<a href='/type/long'>long</a> title:<a href='/type/string'>string</a> username:flags.6?<a href='/type/string'>string</a> photo:<a href='/type/ChatPhoto'>ChatPhoto</a> date:<a href='/type/int'>int</a> restriction_reason:flags.9?<a href='/type/Vector%20t'>Vector</a><<a href='/type/RestrictionReason'>RestrictionReason</a>> admin_rights:flags.14?<a href='/type/ChatAdminRights'>ChatAdminRights</a> banned_rights:flags.15?<a href='/type/ChatBannedRights'>ChatBannedRights</a> default_banned_rights:flags.18?<a href='/type/ChatBannedRights'>ChatBannedRights</a> participants_count:flags.17?<a href='/type/int'>int</a> usernames:flags2.0?<a href='/type/Vector%20t'>Vector</a><<a href='/type/Username'>Username</a>> stories_max_id:flags2.4?<a href='/type/int'>int</a> color:flags2.7?<a href='/type/PeerColor'>PeerColor</a> profile_color:flags2.8?<a href='/type/PeerColor'>PeerColor</a> emoji_status:flags2.9?<a href='/type/EmojiStatus'>EmojiStatus</a> level:flags2.10?<a href='/type/int'>int</a> subscription_until_date:flags2.11?<a href='/type/int'>int</a> = <a href='/type/Chat'>Chat</a>;
|
||||
|
||||
|
|
|
@ -143,6 +143,10 @@ Channel owners can then <a href="#withdrawing-revenue">withdraw Stars as Toncoin
|
|||
<p>Purchasing paid media will transfer Telegram Stars to the bot's balance.<br>
|
||||
Bot owners can then <a href="#withdrawing-revenue">withdraw Stars as Toncoin »</a>, or <a href="#paying-for-ads">use Stars to place ads for the channel »</a>. </p>
|
||||
<p><a href="#revenue-statistics">Star revenue statistics</a> and <a href="#balance-and-transaction-history">balance information</a> is also available to bot owners. </p>
|
||||
<h4><a class="anchor" href="#star-subscriptions" id="star-subscriptions" name="star-subscriptions"><i class="anchor-icon"></i></a>Star subscriptions</h4>
|
||||
<p>Channel administrators can now create special <a href="/api/invites#invite-links">invite links</a> that allow joining a channel in exchange for a monthly payment in Telegram Stars. </p>
|
||||
<p>Subscribing to a channel using a paid invite link will transfer Telegram Stars to the channel's balance. </p>
|
||||
<p>See <a href="/api/invites#paid-invite-links">here »</a> for the full flow. </p>
|
||||
<h3><a class="anchor" href="#withdrawing-revenue" id="withdrawing-revenue" name="withdrawing-revenue"><i class="anchor-icon"></i></a>Withdrawing revenue</h3>
|
||||
<pre><code><a href='/constructor/payments.starsRevenueWithdrawalUrl'>payments.starsRevenueWithdrawalUrl</a>#1dab80b7 url:<a href='/type/string'>string</a> = <a href='/type/payments.StarsRevenueWithdrawalUrl'>payments.StarsRevenueWithdrawalUrl</a>;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue