/**
     * @param Request $request
     * @param array   $matches
     *
     * @return \React\EventLoop\Timer\Timer|\React\EventLoop\Timer\TimerInterface
     */
    protected function evalCode(Request $request, array $matches = [])
    {
        $request->deleteMessage($request->getMessage())->then(function () use($request, $matches) {
            $request->reply('Executing Code')->then(function (Message $message) use($request, $matches) {
                // Lets set some local variables for the eval
                $client = $this->getDiscord();
                $container = $this->container;
                $server = $request->getServer();
                $author = $request->getAuthor();
                $channel = $request->getChannel();
                $self = $this;
                $start = microtime(true);
                $_____responseContent = <<<'EOF'
```php
# Executed the following code in %d ms
%s

# Resulted in the following:
%s

```
EOF;
                $sprintf = [];
                $sprintf[] = $matches[2];
                try {
                    if ($matches[1] === ' --raw') {
                        $response = eval($matches[2]);
                        var_dump($response);
                    } else {
                        $language = new ExpressionLanguage();
                        $sprintf[0] = $language->compile($matches[2], array_keys(get_defined_vars())) . ' (' . $matches[2] . ')';
                        $response = @$language->evaluate($matches[2], get_defined_vars());
                    }
                } catch (\Exception $e) {
                    $sprintf[] = $e->getMessage() . ' on line ' . $e->getLine() . ' in file ' . $e->getFile();
                    $sprintf[] = (microtime(true) - $start) * 1000;
                    return $request->updateMessage($message, sprintf($_____responseContent, $sprintf[2], $sprintf[0], $sprintf[1]));
                }
                if (is_array($response) || is_object($response)) {
                    $response = json_decode($response, true);
                }
                $sprintf[] = $response;
                $sprintf[] = (microtime(true) - $start) * 1000;
                $request->updateMessage($message, sprintf($_____responseContent, $sprintf[2], $sprintf[0], $sprintf[1]));
            });
        });
    }
 private function isIgnored(Request $request)
 {
     $channel = $request->getChannel();
     if (!is_object($channel)) {
         return false;
     }
     $server = $request->getServer();
     if (!is_object($server)) {
         return false;
     }
     $author = $request->getAuthor();
     if (!is_object($author)) {
         return false;
     }
     $channelId = (string) $channel->id;
     $serverId = (string) $server->id;
     $userId = (string) $author->id;
     if ($userId === $this->adminId) {
         return false;
     }
     foreach ($this->ignoredRepository->all() as $ignored) {
         if (!$ignored->getIgnored()) {
             continue;
         }
         if ($ignored->isType('channel') && $ignored->getIdentifier() === $channelId) {
             return true;
         }
         if ($ignored->isType('server') && $ignored->getIdentifier() === $serverId) {
             return true;
         }
         if ($ignored->isType('user') && $ignored->getIdentifier() === $userId) {
             return true;
         }
     }
     return false;
 }