Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OSUBot(Properties properties) throws BeamException,
- InterruptedException, ExecutionException {
- this.api = new BeamAPI();
- String username = properties.getProperty("username");
- String password = properties.getProperty("password");
- this.user = api
- .use(UsersService.class)
- .login(username,
- password).checkedGet();
- this.robot = new RobotBuilder().username(username)
- .password(password)
- .channel(user.channel.id).build(api);
- this.chat = api.use(ChatService.class).findOne(user.channel.id).get();
- this.chatConnectable = chat.connectable(api);
- boolean connected = this.chatConnectable.connect();
- if (!connected) {
- System.err
- .println("ERROR >> Could not log in! Invalid login details, maybe?");
- this.chatConnectable.disconnect();
- System.exit(0);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement