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:
-
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
-
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.