diff --git a/src/Bot/Client.php b/src/Bot/Client.php index 31f513c..773276b 100644 --- a/src/Bot/Client.php +++ b/src/Bot/Client.php @@ -119,13 +119,17 @@ class Client */ private static function concatClasspath($fromRoot, ...$classes) { - $path = $fromRoot ? '\\' : ''; + $path = ''; foreach ($classes as $class) { - $path .= '\\' . $class; + if (empty($path) && !$fromRoot) { + $path .= $class; + } else { + $path .= '\\' . $class; + } } - return str_replace('\\\\', '\\', $path); + return $path; } /**