Advertisement
Guest User

Untitled

a guest
May 17th, 2016
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. public OSUBot(Properties properties) throws BeamException,
  2. InterruptedException, ExecutionException {
  3. this.api = new BeamAPI();
  4. String username = properties.getProperty("username");
  5. String password = properties.getProperty("password");
  6. this.user = api
  7. .use(UsersService.class)
  8. .login(username,
  9. password).checkedGet();
  10. this.robot = new RobotBuilder().username(username)
  11. .password(password)
  12. .channel(user.channel.id).build(api);
  13. this.chat = api.use(ChatService.class).findOne(user.channel.id).get();
  14. this.chatConnectable = chat.connectable(api);
  15. boolean connected = this.chatConnectable.connect();
  16. if (!connected) {
  17. System.err
  18. .println("ERROR >> Could not log in! Invalid login details, maybe?");
  19. this.chatConnectable.disconnect();
  20. System.exit(0);
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement