package fr.Skydust.JdrBot;

import fr.Skydust.JdrBot.cmds.LastTimeOnline;
import fr.Skydust.JdrBot.cmds.playmusic.StopMusic;
import fr.Skydust.JdrBot.menu.MenuSystem;
import fr.Skydust.JdrBot.tasks.HeartbeatTask;
import net.dv8tion.jda.api.events.GatewayPingEvent;
import net.dv8tion.jda.api.events.guild.voice.GuildVoiceUpdateEvent;
import net.dv8tion.jda.api.events.message.react.MessageReactionAddEvent;
import net.dv8tion.jda.api.events.user.update.UserUpdateOnlineStatusEvent;
import net.dv8tion.jda.api.hooks.ListenerAdapter;
import org.jetbrains.annotations.NotNull;

public class JdrBotListener extends ListenerAdapter {
	/* LastTimeOnline listener */
	@Override
	public void onUserUpdateOnlineStatus(@NotNull UserUpdateOnlineStatusEvent e) {
		LastTimeOnline.onUserUpdateOnlineStatus(e);
	}
	/* Empty voice channel listener */
	@Override
	public void onGuildVoiceUpdate(@NotNull GuildVoiceUpdateEvent e) {
		StopMusic.onGuildVoiceUpdate(e);
	}
	/* Menu system listener */
	@Override
	public void onMessageReactionAdd(@NotNull MessageReactionAddEvent e) { MenuSystem.onMessageReactionAdd(e); }
	/* Heartbeat command listener */
	@Override
	public void onGatewayPing(@NotNull GatewayPingEvent e) { HeartbeatTask.HeartbeatUpdateEvent(e); }
}