Skip to content

Commit 8a303d6

Browse files
committed
Using runCode with message return
1 parent 5feee1a commit 8a303d6

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

Events/Evall.php

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,22 +31,9 @@ public static function handler(Message $message = null, Discord $discord = null)
3131
return;
3232
}
3333

34-
$version = EvalCommand::getUserVersion($message->author);
35-
3634
$message->channel->broadcastTyping();
3735

38-
EvalCommand::runCode($code, EvalCommand::getUserVersion($message->author))->then(function ($results) use ($message, $version) {
39-
$reply = MessageBuilder::new();
40-
41-
/** @var Embed $embed */
42-
$embed = newPartDiscord(Embed::class);
43-
44-
$embed->setTitle("PHP Version - $version");
45-
$embed->setDescription("{$results->stats}\n\n```\n$results->output\n```");
46-
$embed->setTimestamp(time());
47-
48-
$reply->addEmbed($embed);
49-
36+
EvalCommand::runCode($code, EvalCommand::getUserVersion($message->author), true)->then(function ($reply) use ($message) {
5037
$message->reply($reply);
5138
});
5239
}

0 commit comments

Comments
 (0)