Vatuu / discord-rpc

Java Wrapper of the Discord-RPC Library for Discord Rich Presence.
MIT License
194 stars 42 forks source link

Typo in README #40

Closed noobidev closed 4 years ago

noobidev commented 4 years ago

Describe the bug Typo in README

Source Readme

Error

public void startup(){
  DiscordEventHandlers handlers = new DiscordEventHandler.Build().setReadyEventHandler((user) -> {
      System.out.println("Welcome " + user.username + "#" + user.discriminator + "!");
  }).build();
  DiscordRPC.initialize("1234567890", handler, true);
}

->

public void startup(){
  DiscordEventHandlers handlers = new DiscordEventHandler.Build().setReadyEventHandler((user) -> {
      System.out.println("Welcome " + user.username + "#" + user.discriminator + "!");
  }).build();
  DiscordRPC.initialize("1234567890", handlers, true);
}

or

public void startup(){
  DiscordEventHandlers handler = new DiscordEventHandler.Build().setReadyEventHandler((user) -> {
      System.out.println("Welcome " + user.username + "#" + user.discriminator + "!");
  }).build();
  DiscordRPC.initialize("1234567890", handler, true);
}

Versions (Must be completed):

Additional info Typo in readme

noobidev commented 4 years ago

@DeJayDev... Also change new DiscordEventHandler.Build() to new DiscordEventHandlers.Builder() because the class is named DiscordEventHandlers.

Vatuu commented 4 years ago

No need, it's the handler object.

noobidev commented 4 years ago

But the class DiscordEventHandlers.java is named DiscordEventHandlers 🤔

noobidev commented 4 years ago

And it should be new DiscordEventHandlers.Builder() because the inner class is Builder and not Build

noobidev commented 4 years ago

@Vatuu @DeJayDev?