PythonistaGuild / TwitchIO

An Async Bot/API wrapper for Twitch made in Python.
https://twitchio.dev
MIT License
798 stars 162 forks source link

More EventSub Subscription Types #303

Closed DNEAVES closed 2 years ago

DNEAVES commented 2 years ago

Pull request summary

Added two additional EventSub subscription types, to match up with regular subscriptions:

Subscription Gifts

All needed to enable subscriptions for the gifting of subs. Distinctly different from ChannelSubscribeData with is_gift==True, which is receiving gifted subs.

Subscription Messages

Needed for enabling resubscription messages, and other associated resub data like duration, streak, etc.

Additional

Also created EventSubClient.delete_all_active_subscriptions(), a convenience method for deleting any active EventSubs, in case a user wants to start fresh each time (to avoid duplicate subscriptions).

Checklist

DNEAVES commented 2 years ago

Changed changelog to be under the "Master" heading. Haven't built the docs, but updated them to point to exactly where they are in the code.

Merged in Master, so should now be up-to-date

chillymosh commented 2 years ago

I just built the docs and they don't link to anything.

DNEAVES commented 2 years ago

Updated changelog again. event_eventsub_notification_.... will now point to their locations in the docs.

EventSubClient.subscribe_channel_subscription_.... will not, since "The above is broken, and does not show members" (referencing EventSubClient). EventSubClient.delete_all_active_subscriptions will not for the same reason.

Fun Fact: Don't add parenthesis in changelogs

DNEAVES commented 2 years ago

Found something (:undoc-members:) that will show EventSubClient members, fixing the "does not show members" thing above. Also fixed the lack of linking for the subscribe_channel_.... functions

IAmTomahawkx commented 2 years ago

In an effort to get this PR into the next release, I've made the requested changes. Thanks for the PR!