Skip to main content

Topic - Poll Events

Description

This topic can be used to monitor poll events in a specified channel.

Sub-types include:

  • Poll creation
  • Poll update (e.g. new vote or bits usage or channel points towards a specific choice)
  • Poll completion
  • Poll termination
  • Poll archived

With all undocumented topics, use at your own risk.

Method Definition

NameTypeDescription
credentialOAuth2CredentialAuth Token (may not necessarily be required)
channelIdStringTarget Channel Id

Code-Snippets

Subscribe to all poll events in channel twitch4j and register a listener that prints all messages to console

twitchClient.getPubSub().listenForPollEvents(credential, "149223493");

twitchClient.getEventManager().onEvent(PollsEvent.class, System.out::println);