twitchlib / twitchlib.eventsub.webhooks Goto Github PK
View Code? Open in Web Editor NEWProvides an easy way to setup a Twitch EventSub Webhooks Server
Provides an easy way to setup a Twitch EventSub Webhooks Server
It seems the Twitchlib.EventSub module doesn't work with the channel.hype_train.begin event
It crashes on the LastContribution object which expects an array of HypeTrainContribution
But it's only a single element
[Error] WebApp.Services.EventSubService: Reason: Application_Error - Message: The JSON value could not be converted to TwitchLib.EventSub.Webhooks.Core.Models.HypeTrain.HypeTrainContribution[]. Path: $.event.last_contribution | LineNumber: 0 | BytePositionInLine: 738.
Problem: Twitch guarantees at least one webhook. If OK
responses are sent too late, or in certain situations where Twitch believes you did not get the webhook event, it will resend the webhook. This could lead to duplicate events being processed.
Solution: Create logic for de-duplication of matching msg_id
values by reviewing retries
in the payload POST from Twitch and/or create a deduplication cache which keeps track of msg_id
values.
Additional Scope Enhancements: Custom TTL value for deduplication cache.
I started to work on an application that will use Twitch EventSub, and Twitch provides a handy tool called the twitch-cli to simulate EventSub triggers. However, when twitch-cli creates the necessary headers for EventSub event, it creates them in all lowercase:
This causes failures even within the example application in this repository, notably always triggering a Missing_Header error.
Following the Twitch EventSub docs, they recommend always converting any check to lower case prior to checking the headers.
The UseTwitchLibEventSubWebhooks
extension method is currently defined on IApplicationBuilder
, which is being phased out in favor of IHostApplicationBuilder
.
HostApplicationBuilder
is returned by Host.CreateApplicationBuilder()
and implements IHostApplicationBuilder
.
WebApplicationBuilder
is returned by WebApplication.CreateBuilder()
and also implements IHostApplicationBuilder
.
Can we get support for this new interface?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.