✨ Work towards making CommandMeta typesafe (#173)
Co-authored-by: Alexander Söderberg <sauilitired@gmail.com>
This commit is contained in:
parent
ab366be24d
commit
1e91273e0e
33 changed files with 450 additions and 64 deletions
|
|
@ -50,7 +50,7 @@ public final class ExampleBot {
|
|||
*
|
||||
* @param args Arguments to start the bot with (NOT used)
|
||||
*/
|
||||
public static void main(@NonNull final String[] args) {
|
||||
public static void main(final @NonNull String[] args) {
|
||||
SimplixInstaller
|
||||
.instance()
|
||||
.register(ExampleBot.class);
|
||||
|
|
|
|||
|
|
@ -56,9 +56,9 @@ public class ExampleApplication {
|
|||
*/
|
||||
@Inject
|
||||
public ExampleApplication(
|
||||
@NonNull final DiscordApiComponent discordApiComponent,
|
||||
@NonNull final CommandsComponent commandsComponent,
|
||||
@NonNull final ScheduledExecutorService executorService
|
||||
final @NonNull DiscordApiComponent discordApiComponent,
|
||||
final @NonNull CommandsComponent commandsComponent,
|
||||
final @NonNull ScheduledExecutorService executorService
|
||||
) throws
|
||||
Exception {
|
||||
this.discordApiComponent = discordApiComponent;
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ public class CommandsComponent {
|
|||
* @param discordApiComponent Instance of the {@link DiscordApiComponent} for registering the command listener
|
||||
*/
|
||||
@Inject
|
||||
public CommandsComponent(@NonNull final DiscordApiComponent discordApiComponent) {
|
||||
public CommandsComponent(final @NonNull DiscordApiComponent discordApiComponent) {
|
||||
this.discordApiComponent = discordApiComponent;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ public class DiscordApiComponent {
|
|||
*
|
||||
* @param token The Discord Bot token
|
||||
*/
|
||||
public final void login(@NonNull final String token) {
|
||||
public final void login(final @NonNull String token) {
|
||||
LOG.info("Logging in to Discord...");
|
||||
|
||||
this.api = this.builder.setToken(token).login().join();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue