Skip to content

Commit

Permalink
Properly register eval block thing
Browse files Browse the repository at this point in the history
  • Loading branch information
duncte123 committed Jan 2, 2018
1 parent b0a243f commit 3be5bab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public class EvalCommand extends Command {
};
private EvalFilter filter = new EvalFilter();

private boolean runIfNotOwner = true;
private boolean runIfNotOwner;

/**
* This initialises the engine
Expand Down Expand Up @@ -114,6 +114,7 @@ public Object evaluate(String scriptText) throws CompilationFailedException {
catch (ScriptException e) {
e.printStackTrace();
}
setFilter(false);
}

@Override
Expand All @@ -122,7 +123,7 @@ public void executeCommand(String invoke, String[] args, GuildMessageReceivedEve
event.getAuthor().getId()) ||
event.getAuthor().getId().equals(Settings.ownerId);

if (runIfNotOwner == !isRanByBotOwner)
if (runIfNotOwner && !isRanByBotOwner)
return;

if (!isRanByBotOwner && !hasUpvoted(event.getAuthor())) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

import com.google.common.util.concurrent.FutureCallback;
import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.SettableFuture;
import com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager;
import com.sedmelluq.discord.lavaplayer.source.AudioSourceManager;
import com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager;
Expand All @@ -29,10 +28,6 @@
import com.sedmelluq.discord.lavaplayer.tools.io.HttpConfigurable;
import com.sedmelluq.discord.lavaplayer.track.*;
import com.wrapper.spotify.Api;
import com.wrapper.spotify.methods.AlbumRequest;
import com.wrapper.spotify.methods.PlaylistRequest;
import com.wrapper.spotify.methods.TrackRequest;
import com.wrapper.spotify.methods.authentication.ClientCredentialsGrantRequest;
import com.wrapper.spotify.models.*;
import ml.duncte123.skybot.utils.AirUtils;
import org.apache.http.client.config.RequestConfig;
Expand Down

0 comments on commit 3be5bab

Please sign in to comment.