-
Notifications
You must be signed in to change notification settings - Fork 9
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
Add Channel Points Automatic Reward Redemption Add classes #28
Add Channel Points Automatic Reward Redemption Add classes #28
Conversation
[Release] Version 2.5.2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good but there are a few things that need to be changed for consistency between files
using TwitchLib.EventSub.Core.Models.Chat; | ||
namespace TwitchLib.EventSub.Core.SubscriptionTypes.Channel; | ||
/// <summary> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing new line
using TwitchLib.EventSub.Core.Models.Chat; | |
namespace TwitchLib.EventSub.Core.SubscriptionTypes.Channel; | |
/// <summary> | |
using TwitchLib.EventSub.Core.Models.Chat; | |
namespace TwitchLib.EventSub.Core.SubscriptionTypes.Channel; | |
/// <summary> |
using System; | ||
namespace TwitchLib.EventSub.Core.Models.Chat; | ||
/// <summary> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing new line
using System; | |
namespace TwitchLib.EventSub.Core.Models.Chat; | |
/// <summary> | |
using System; | |
namespace TwitchLib.EventSub.Core.Models.Chat; | |
/// <summary> |
/// <summary> | ||
/// An array that includes the emote ID and start and end positions for where the emote appears in the text. | ||
/// </summary> | ||
public ChatMessageEmoteFragment[] Emotes { get; set; } = Array.Empty<ChatMessageEmoteFragment>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public ChatMessageEmoteFragment[] Emotes { get; set; } = Array.Empty<ChatMessageEmoteFragment>(); | |
public ChatMessageEmoteFragment[] Emotes { get; set; } = []; |
namespace TwitchLib.EventSub.Core.Models.Chat; | ||
/// <summary> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing new line
namespace TwitchLib.EventSub.Core.Models.Chat; | |
/// <summary> | |
namespace TwitchLib.EventSub.Core.Models.Chat; | |
| |
/// <summary> |
namespace TwitchLib.EventSub.Core.Models.ChannelPoints; | ||
/// <summary> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing new line
namespace TwitchLib.EventSub.Core.Models.ChannelPoints; | |
/// <summary> | |
namespace TwitchLib.EventSub.Core.Models.ChannelPoints; | |
| |
/// <summary> |
namespace TwitchLib.EventSub.Core.Models.ChannelPoints; | ||
/// <summary> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing new line
namespace TwitchLib.EventSub.Core.Models.ChannelPoints; | |
/// <summary> | |
namespace TwitchLib.EventSub.Core.Models.ChannelPoints; | |
| |
/// <summary> |
/// <summary> | ||
/// Optional. Emote that was unlocked. | ||
/// </summary> | ||
public UnlockedEmote? UnlockedEmote { get; set; } = new(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if it can be null, the default value is not set
public UnlockedEmote? UnlockedEmote { get; set; } = new(); | |
public UnlockedEmote? UnlockedEmote { get; set; } |
/// The reward cost. | ||
/// </summary> | ||
public int Cost { get; set; } | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unnecessary new line
/// </summary> | ||
public sealed class AutomaticRedemptionReward | ||
{ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unnecessary new line
/// The text of the chat message. | ||
/// </summary> | ||
public string Text { get; set; } = string.Empty; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unnecessary new line
@AoshiW Let me know if it looks good? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm thanks!
Actually, can we target dev branch for this change instead of main? |
Sure @swiftyspiffy , but I dont know how I can swap the target to the dev branch in a pull request. But I can try to mess around and see if I can do something about it. |
Let me know if this was the correct way to swap the target. It should targeted the dev branch now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup looks good to me!
The names and scheme comes from this: https://dev.twitch.tv/docs/eventsub/eventsub-reference/#channel-points-automatic-reward-redemption-add-event
I noticed this subcription doesnt exist in the eventsub of TwitchLib, so I am doing an attempt to add the automatic reward redemption models to core, which then can be used in TwitchLib.EventSub.Websocket.
As it is my first pull request inside of here; let me know if there are any words that should be changed or anything that I forgot to add to the models.