Does this make sense to be a subclass?

I'm trying to create a subclass to implement some custom functionality to a parent class. I'm making a discord bot that has a class
Discord
. This
Discord
class has a constructor that takes a token.

I've created a subclass
Bot
that has a constructor that calls the parent function. I've done this so I can implement environment variables.

class Bot extends Discord
{

    ...

    public function __construct()
    {
        $dotenv = Dotenv::createImmutable(dirname(__DIR__, 1));
        $dotenv->load();
        $dotenv->required('UMPIRE_TOKEN')->notEmpty();

        parent::__construct([
            'token' => $_ENV['UMPIRE_TOKEN'],
            'intents' => Intents::getDefaultIntents(),
        ]);
    }

    ...

}


Everything runs fine but for some reason, this just looks really off to me. I'm not sure if I'm overcomplicating it or creating an antipattern.
Was this page helpful?