twitchdev / twitch-cli

The official Twitch CLI to make developing on Twitch easier.
Apache License 2.0
604 stars 71 forks source link

[EventSub] Missing "level" property on Hype Train Begin Event #190

Closed alexbcberio closed 1 year ago

alexbcberio commented 1 year ago

On the Twitch docs site describes that the channel.hype_train.begin event-sub event provides the level of the hype-train but twitch-cli does not provide any value during the request.

I've updated twitch-cli to the latest version, v1.1.11, and I'm using the following command to trigger the event:

twitch event trigger "channel.hype_train.begin" -s "a_random_generated_secret" -F "http://localhost:8000/event-sub"

and here is the generated payload of the event.

{
"subscription": {
  "id": "9c47252f-2535-7c56-ad04-3e432bda1d93",
  "status": "enabled",
  "type": "channel.hype_train.begin",
  "version": "1",
  "condition": {
    "broadcaster_user_id": "85278111"
  },
  "transport": {
    "method": "webhook",
    "callback": "null"
  },
  "created_at": "2022-10-31T16:37:20.8906748Z",
  "cost": 0
},
"event": {
  "id": "9c47252f-2535-7c56-ad04-3e432bda1d93",
  "broadcaster_user_id": "85278111",
  "broadcaster_user_login": "testBroadcaster",
  "broadcaster_user_name": "testBroadcaster",
  "total": 935,
  "progress": 935,
  "goal": 64657,
  "top_contributions": [
    {
      "total": 991,
      "type": "bits",
      "user_id": "2343177",
      "user_name": "cli_user1",
      "user_login": "cli_user1"
    },
    {
      "total": 788,
      "type": "bits",
      "user_id": "49267166",
      "user_name": "cli_user2",
      "user_login": "cli_user2"
    }
  ],
  "last_contribution": {
    "total": 788,
    "type": "bits",
    "user_id": "49267166",
    "user_name": "cli_user2",
    "user_login": "cli_user2"
  },
  "started_at": "2022-10-31T16:37:20.8906748Z",
  "expires_at": "2022-10-31T16:42:20.8906748Z"
}

The other hype-train event-sub events are correctly providing the level, it should not be a mayor problem.