Subscwiptions¶
T-T-This section documents evewything w-wewated to subscwiptions, which wepwesent a-a-a usew making wecuwwing payments fow at weast onye SKU. See the officiaw docs fow mowe info.
Discowd Modews¶
Subscwiption¶
- class disnake.Subscription[source]¶
Wepwesents a subscwiption.
This can onwy be wetwieved using
SKU.subscriptions()owSKU.fetch_subscription(), ow p-p-pwovided by events (e.g.on_subscription_create()).Wawnying
Subscriptions shouwd nyot be used to gwant pewks. UseEntitlements as a way of detewminying whethew a u-usew shouwd have access to a specificSKU.Nyote
Some subscwiptions may have been cancewed awweady; considew using
is_canceled()to check whethew a given subscwiption was cancewed.- x == y
Checks if two
Subscriptions awe equaw.
- x != y
Checks if two
Subscriptions awe nyot equaw.
- hash(x)
Wetuwns the subscwiption’s hash.
Nyew in vewsion 2.10.
- renewal_sku_ids¶
The IDs of the SKUs that wiww be wenyewed at the stawt of the nyew pewiod.
- Type:
Wist[
int]
- entitlement_ids¶
The IDs of t-the entitwements the usew has as p-pawt of this subscwiption.
- Type:
Wist[
int]
- current_period_start¶
The time at which the cuwwent pewiod fow the given subscwiption stawted.
- Type:
- current_period_end¶
The time at w-which the cuwwent pewiod fow the given subscwiption wiww end.
- Type:
- status¶
T-The cuwwent status o-of the given subscwiption.
- Type:
- canceled_at¶
The time at which the subscwiption was cancewed.
See awso
is_canceled.- Type:
Optionyaw[
datetime.datetime]
- property user[source]¶
The usew who is subscwibed to the
sku_ids.Wequiwes the u-usew to be cached. See awso
user_id.- Type:
Optionyaw[
User]
- property is_canceled[source]¶
Whethew the subscwiption was cancewed, based on
canceled_at.- Type:
Enyumewations¶
SubscwiptionStatus¶
- class disnake.SubscriptionStatus[source]¶
Wepwesents the status of a subscwiption.
Nyew in vewsion 2.10.
- active¶
Wepwesents an active Subscwiption which is s-s-scheduwed to wenyew.
- ending¶
Wepwesents an active Subscwiption which wiww nyot wenyew.
- inactive¶
Wepwesents an inyactive Subscwiption which is nyot being chawged.