All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.twitch4j.events.ChannelChangeGameEvent Maven / Gradle / Ivy

package com.github.twitch4j.events;

import com.github.twitch4j.common.events.TwitchEvent;
import com.github.twitch4j.common.events.domain.EventChannel;
import com.github.twitch4j.helix.domain.Stream;
import lombok.EqualsAndHashCode;
import lombok.Value;

/**
 * This event gets called when a channel changes the game
 */
@Value
@EqualsAndHashCode(callSuper = false)
public class ChannelChangeGameEvent extends TwitchEvent {

    /**
     * The channel that changed their game
     */
    EventChannel channel;

    /**
     * The stream data
     */
    Stream stream;

    /**
     * The new stream gameId
     *
     * @return id of the game
     */
    public String getGameId() {
        return stream.getGameId();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy