#Guild subscriptions/moentization question

1 messages · Page 1 of 1 (latest)

amber nimbus
#

Does nextcord have within its library any functions for guild subscriptions all I can find is entitlements for boosting a server/guild?

I am finding it hard to find any snippets or any examples on how to implement guild subscriptions and the discord developer documentation is a lot to be desired, basic information there at best.

Any help/idea's/advice would be gratefully received.

tropic plinth
#

What I do which might not be the best thing is just hit the entitlements api every few minutes and any new entries go into my database, then my commands that require the subscription have a check to see if the guild is in the database

floral igloo
#

u can get it from the raw eve ts

#

=docs on_raw

floral igloo
#

hold on

#

=docs on_socket_raw_receive

fierce haloBOT
floral igloo
#

@amber nimbus look through this too

floral igloo
amber nimbus
# floral igloo https://discord.com/developers/docs/events/gateway-events#entitlement-create

There is this:
https://discord.com/developers/docs/monetization/implementing-app-subscriptions

It does not give a lot of information and no code snippets to be found anywhere on google.

There does not seem to be a way of hiding the subscription button to see if it is working when developing the cog that handles guild subscriptions, its on or off basically and does not seem well thought out.

Discord Developer Portal

Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.

floral igloo
#

I mean, u don't really need a code snippet if u can find the endpoint in the docs

#

Since the docs gives u plenty of information about the endpoint

tropic plinth
floral igloo
#

But it's better imo if u cache it via the websocket

unborn steeple
quick gardenBOT
# unborn steeple There is also https://github.com/nextcord/nextcord/pull/1138 if your happy with ...

Summary

Discord recently added a feature where bots can implement their own premium versions to earn some money. This PR is adding functionality to fetch the entitlements of the users aswell as receiving the events of these. This PR also adds the interaction response type 10, which is the response to prompt the user to subscribe to the bot's premium subscription.

Testing code: https://paste.nextcord.dev/?id=1698181802920231

This is a Code Change

  • ✅ I have tested my changes.
  • ✅ I have updated the documentation to reflect the changes.
  • ✅ I have run task pyright and fixed the relevant issues.
Labels

p: low, s: awaiting review, t: api coverage

amber nimbus