We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cd7e643 commit 53875f2Copy full SHA for 53875f2
src/main/java/com/jagrosh/jmusicbot/commands/owner/EvalCmd.java
@@ -20,6 +20,7 @@
20
import com.jagrosh.jdautilities.command.CommandEvent;
21
import com.jagrosh.jmusicbot.Bot;
22
import com.jagrosh.jmusicbot.commands.OwnerCommand;
23
+import net.dv8tion.jda.api.entities.ChannelType;
24
25
/**
26
*
@@ -45,6 +46,10 @@ protected void execute(CommandEvent event)
45
46
se.put("bot", bot);
47
se.put("event", event);
48
se.put("jda", event.getJDA());
49
+ if (event.getChannelType() != ChannelType.PRIVATE) {
50
+ se.put("guild", event.getGuild());
51
+ se.put("channel", event.getChannel());
52
+ }
53
try
54
{
55
event.reply(event.getClient().getSuccess()+" Evaluated Successfully:\n```\n"+se.eval(event.getArgs())+" ```");
0 commit comments