Skip to content

Commit

Permalink
Kensa is now displaying the current song in the 'Now playing' area
Browse files Browse the repository at this point in the history
  • Loading branch information
marlind89 committed Sep 8, 2016
1 parent ae80986 commit c975150
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@
import sx.blah.discord.api.IDiscordClient;
import sx.blah.discord.api.events.EventSubscriber;
import sx.blah.discord.handle.obj.IChannel;
import sx.blah.discord.handle.obj.Status;
import sx.blah.discord.util.MessageBuilder;
import sx.blah.discord.util.audio.AudioPlayer;
import sx.blah.discord.util.audio.events.TrackStartEvent;

import java.io.IOException;
import java.nio.charset.Charset;
Expand All @@ -36,6 +38,12 @@ public void handlePlayAudioEvent(PlayAudioEvent event)
AudioStreamer.stream(event.getUrl(), event.getTextChannel());
}

@EventSubscriber
public void handleTrackStartEvent(TrackStartEvent event)
{
client.changeStatus(Status.game(event.getTrack().toString()));
}

@EventSubscriber
public void handleSearchYoutubeEvent(SearchYoutubeEvent event)
{
Expand Down

0 comments on commit c975150

Please sign in to comment.