Have a way to grant a Discord role for app subscribers

Hey,

With the advent of subscriptions, I would really love to grant a special role to my subscribers on my Discord server. Today, I manually add it after they ping me, but it’s manual, error-prone, and doesn’t update automatically when the sub ends.

What I would need (it’s similar to what websites like Patreon do for instance):

  • Offer the user the possibility to link their Discord (from the subscription page, or from the OW settings)
  • Grant them a role (chosen by the server) if they are subscribed
  • Remove that role when the subscription ends

Impact: low (but I can imagine that everyone having subscribers would like a similar feature)

Thanks!

I think a more important first step would be webhooks for new subscriptions/removed subscriptions that give you their ow username.

This can be extended to give you their discord if they are signed in with discord on the overwolf discord feature (or can be implemented per app then easily).

On the other hand, there is already a subscriptionChanged event in the apps, so why don’t you just link that to the overwolf discord sign in calls and have it send the information to you?

That would require the app to be running during the subscription process or some additional data to check on app start to keep data integer but could look like this:

  1. on subscriptionChanged
    1.a) if user just subscribed, show discord login, after login send info to server and use discord API to assign role. Store subscribed overwolf name and discord uid
    1.b) if user unsubscribed, send info to server and remove discord role for respective overwolf name

  2. on app start, check if user has subscription
    2.a) if so, check if user already has discord role (an entry with overwolf name and discord id). If he doesn’t, go to 1.a
    2b) if user does not have subscription but still is in db for the discord assigned role, remove role and db entry.

This would be a fairly robust workaround.
I don’t think that this would change much once there are webhooks for subscription status.

Thanks for the suggestion Jonas :slight_smile:

Yeah that could work indeed. I was just thinking that this will be a pretty common need, so having something built-in would IMO be a good capitalization of a community feature, instead of having everyone re-implement it on their side.

I’ll keep that handy if / when I decide I can’t wait anymore :slight_smile:

Thanks!

Yeah, i would actually like to do that as well now :slight_smile:

If you ever decide to do it yourself as a reusable lib, let us know :stuck_out_tongue: