Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated missing Topics, updated interface #120

Merged

Conversation

Bukk94
Copy link

@Bukk94 Bukk94 commented Jul 8, 2023

Interface changes

Added missing events to ITwitchPubSub interface

    event EventHandler<OnAutomodCaughtUserMessage> OnAutomodCaughtUserMessage;
    event EventHandler<OnAutomodCaughtMessageArgs> OnAutomodCaughtMessage;
    event EventHandler<OnBitsReceivedV2Args> OnBitsReceivedV2;
    event EventHandler<OnRaidCancelArgs> OnRaidCancel; 

Those events were implemented but never exposed via interface
New events for new topics
event EventHandler<OnChannelBitsBadgeUnlockArgs> OnChannelBitsBadgeUnlock;
event EventHandler<OnLowTrustUsersArgs> OnLowTrustUsers;

Added new "Listen-To" topics methods:

Those two were implemented but never exposed via interface
void ListenToUserModerationNotifications(string myTwitchId, string channelTwitchId);
void ListenToAutomodQueue(string userTwitchId, string channelTwitchId);

These two are new, based on Twitch docs:
void ListenToChannelBitsBadgeUnlocks(string channelTwitchId); - Listens to channel-bits-badge-unlocks.{channelTwitchId
void ListenToLowTrustUsers(string channelTwitchId, string suspiciousUser); - Listens to low-trust-users.{channelTwitchId}.{suspiciousUser}

Removed obsolete bits event topic, including event and structures

void ListenToBitsEvents(string channelTwitchId);

Library changes

  • Updated Communications library to the newest version
  • Made Ping payload as string constant (no need to re-create JObjects every time)
  • Aligned communication events to Async Handlers

Notes

Structure for low-trust-users topic is currently mostly empty and it contains just a raw data. I couldn't find any example and Twitch doesn't provide any.

Copy link

@AoshiW AoshiW left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you forgot to remove public event EventHandler<OnBitsReceivedArgs> OnBitsReceived; in TwitchPubSub.cs

Copy link
Member

@swiftyspiffy swiftyspiffy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@swiftyspiffy swiftyspiffy merged commit f833b1a into TwitchLib:dev Sep 16, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants