I do not personally understand why the Message class is tightly coupled with the Client class. It doesn't make sense to me that it can send itself.
I think that if you want to have an explicit message you should explicitly send it.
It also makes it hard to separate the message creation logic from the sending logic since you would have to pass a useless client that you won't use everywhere.
I propose adding HeadlessMessage or a similar class that doesn't require the client in it's constructor.
I do not personally understand why the
Message
class is tightly coupled with theClient
class. It doesn't make sense to me that it can send itself. I think that if you want to have an explicit message you should explicitly send it. It also makes it hard to separate the message creation logic from the sending logic since you would have to pass a useless client that you won't use everywhere. I propose addingHeadlessMessage
or a similar class that doesn't require the client in it's constructor.