Skip to content

Commit 3dc3df2

Browse files
committed
reference: document .Message.RoleSubscriptionData field
See botlabs-gg/yagpdb#1865. Signed-off-by: Luca Zeuch <[email protected]>
1 parent 7bef280 commit 3dc3df2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

content/docs/reference/templates/syntax-and-data.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@ Interaction functions are covered [here](/docs/reference/templates/functions#int
274274
| .Message.TTS | Whether the message is text-to-speech. \* |
275275
| .Message.Type | The [type](https://discord.com/developers/docs/resources/message#message-object-message-types) of the message. |
276276
| .Message.WebhookID | If the message is generated by a webhook, this is the webhook's id |
277+
| .Message.RoleSubscriptionData | Data of the role subscription purchase or renewal that prompted this message. Only set on messages of type 25 (`ROLE_SUBSCRIPTION_PURCHASE`). |
277278

278279
[sticker items]: https://discord.com/developers/docs/resources/sticker#sticker-item-object-sticker-item-structure
279280

@@ -290,6 +291,15 @@ Interaction functions are covered [here](/docs/reference/templates/functions#int
290291

291292
[Message functions documentation](functions#message).
292293

294+
#### RoleSubscriptionData
295+
296+
| **Field** | **Description** |
297+
|--------------------------------|------------------------------------------------------------------------|
298+
| .RoleSubscriptionListingID | The ID of the SKU and listing that the user is subscribed to. |
299+
| .TierName | The name of the tier that the user is subscribed to. |
300+
| .TotalMonthsSubscribed | The cumulative number of months that the user has been subscribed for. |
301+
| .IsRenewal | Whether this notification is for a renewal rather than a new purchase. |
302+
293303
### Reaction
294304

295305
This is available and part of the dot when reaction trigger type is used.

0 commit comments

Comments
 (0)