Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the TwitchLib.EventSub libraries to current versions and refactors the codebase to use the new API structure where event data is accessed through Payload and Metadata properties directly rather than through a Notification wrapper.
Changes:
- Updated TwitchLib.EventSub.Websockets and TwitchLib.EventSub.Core submodule commits
- Migrated namespace imports from
TwitchLib.EventSub.Websockets.Core.EventArgstoTwitchLib.EventSub.Core.EventArgs - Refactored all event handlers to access event data via
args.Payload.Eventandargs.Metadatainstead ofargs.Notification.Payload.Eventandargs.Notification.Metadata
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| TwitchLib.EventSub.Websockets | Updated submodule to newer commit |
| TwitchLib.EventSub.Core | Updated submodule to newer commit |
| TwitchWebsocketHostedService.cs | Updated event handlers to use new API structure and added type safety checks |
| IChatHistory.cs | Updated namespace import |
| ChatHistory.cs | Updated namespace import and event data access pattern |
| DeletedChatMessage.cs | Updated namespace import |
| DeleteChatMessage.cs | Added blank line |
| DotNetTwitchBot.sln | Added TwitchLib.EventSub.Core project and removed extraneous text from version string |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
DotNetTwitchBot/Bot/TwitchServices/TwitchWebsocketHostedService.cs
Outdated
Show resolved
Hide resolved
| return false; | ||
| } | ||
| var metadata = eventSubMetaData as WebsocketEventSubMetadata; | ||
| if(metadata == null) |
There was a problem hiding this comment.
Missing space after if keyword. C# style guidelines recommend a space between control flow keywords and their opening parenthesis.
| if(metadata == null) | |
| if (metadata == null) |
| { | ||
| public Task Handle(DeletedChatMessage notification, CancellationToken cancellationToken) | ||
| { | ||
|
|
There was a problem hiding this comment.
Unnecessary blank line added. This adds no value and should be removed to maintain consistency with the rest of the codebase.
…e.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
No description provided.