slight changes to QoL
This commit is contained in:
@@ -122,6 +122,8 @@ public class Bot extends ListenerAdapter {
|
||||
|
||||
@Override
|
||||
public void onGuildMessageReceived(GuildMessageReceivedEvent event) {
|
||||
if(event.getAuthor().isBot())
|
||||
return;
|
||||
Object searchresult = pullSearch(event);
|
||||
if(searchresult!=null)
|
||||
{
|
||||
|
||||
@@ -40,6 +40,11 @@ public class SearchCmd extends Command {
|
||||
|
||||
@Override
|
||||
protected void execute(String args, GuildMessageReceivedEvent event, PermLevel caller, ClumpedMusicPlayer player) {
|
||||
if(args==null || args.equals(""))
|
||||
{
|
||||
Sender.sendReply(SpConst.ERROR+"Please include search terms!", event);
|
||||
return;
|
||||
}
|
||||
StringBuilder builder = new StringBuilder(SpConst.SUCCESS+"<@"+event.getAuthor().getId()+"> Results for `"+args+"`:");
|
||||
if(searcher==null)
|
||||
{
|
||||
@@ -76,6 +81,7 @@ public class SearchCmd extends Command {
|
||||
}
|
||||
else
|
||||
{
|
||||
event.getChannel().sendTyping();
|
||||
List<YoutubeInfo> list = searcher.getResults(args, 3);
|
||||
if(list==null)
|
||||
{
|
||||
|
||||
@@ -37,7 +37,7 @@ public class VoteskipCmd extends Command {
|
||||
{
|
||||
if(checked.contains(user.getId()) || user.isBot())
|
||||
continue;
|
||||
if(!event.getGuild().getVoiceStatusOfUser(user).isDeaf())
|
||||
if(event.getGuild().getVoiceStatusOfUser(user).inVoiceChannel() && !event.getGuild().getVoiceStatusOfUser(user).isDeaf())
|
||||
listeners++;
|
||||
if(player.getCurrentSkips().contains(user.getId()))
|
||||
skippers++;
|
||||
|
||||
Reference in New Issue
Block a user