JDA-Applications / JDA-Utilities

A series of tools and utilities for JDA to assist in bot creation
Apache License 2.0
218 stars 111 forks source link

Default Game Always Used #63

Closed averen closed 6 years ago

averen commented 6 years ago

Regardless of using CommandClientBuilder#useDefaultGame, the default is always used. To mitigate this, the default value for Game on line 38 of CommandClientBuilder should be null since null is already checked for in CommandClientImpl#onReady.

Shengaero commented 6 years ago

Unfortunately this is intended behavior. We have discussed this in the past, and ultimately we decided that simple and out-of-the-box support for things like the default game is a key feature we want to provide.

To disable the default game you simply need to provide null to CommandClientBuilder#setGame

CommandClientBuilder builder = /* ... */;
builder.setGame(null);

Additionally, I don't think changing a legacy default for the sake of people who don't want to use the default game saving the cost of a single method call is not worth it at this point.