Skip to content

Commit

Permalink
feat: rickroll
Browse files Browse the repository at this point in the history
  • Loading branch information
marnixah committed Jan 21, 2022
1 parent ab64e98 commit 9212ca8
Showing 1 changed file with 201 additions and 13 deletions.
214 changes: 201 additions & 13 deletions src/classes/tv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,39 +32,43 @@ export default class TV {
}

right(times?: number): Promise<Response[]> {
return this.sendIRCC('Right');
return this.sendIRCC('Right', times);
}

up(times?: number): Promise<Response[]> {
return this.sendIRCC('Up');
return this.sendIRCC('Up', times);
}

down(times?: number): Promise<Response[]> {
return this.sendIRCC('Down');
return this.sendIRCC('Down', times);
}

ok(times?: number): Promise<Response[]> {
return this.sendIRCC('Confirm');
return this.sendIRCC('Confirm', times);
}

off(times?: number): Promise<Response[]> {
return this.sendIRCC('PowerOff');
return this.sendIRCC('PowerOff', times);
}

on(times?: number): Promise<Response[]> {
return this.sendIRCC('WakeUp');
return this.sendIRCC('WakeUp', times);
}

sleep(times?: number): Promise<Response[]> {
return this.sendIRCC('Sleep');
return this.sendIRCC('Sleep', times);
}

volumeUp(times?: number): Promise<Response[]> {
return this.sendIRCC('VolumeUp');
return this.sendIRCC('VolumeUp', times);
}

volumeDown(times?: number): Promise<Response[]> {
return this.sendIRCC('VolumeDown');
return this.sendIRCC('VolumeDown', times);
}

exit(): Promise<Response[]> {
return this.sendIRCC('Exit');
}

mute(): Promise<Response[]> {
Expand All @@ -91,16 +95,200 @@ export default class TV {
// Send applicationLauncher to open the app selection screen, then go right 5 times then 1 down. Then enter.
await this.applicationLauncher();
await this.resetApplicationLauncher();
await this.right(5);
await this.down();
await this.ok();
}

async rickRoll(): Promise<void> {
await this.browser();
await this.exit();
await this.down();
await this.up(100);
await this.ok();

// Delete everything in text field
await this.left();
await this.down(2);
await this.ok(100);

// y
await this.left(4);
await this.up(2);
await this.ok();

// o
await this.right(3);
await this.ok();

// u
await this.left(2);
await this.ok();

// t
await this.left(2);
await this.ok();

// u
await this.right(2);
await this.ok();

// b
await this.down(2);
await this.left();
await this.ok();

// e
await this.up(2);
await this.left(3);
await this.ok();

// .
await this.left(4);
await this.down(2);
await this.ok();

// c
await this.right(5);
await this.ok();

// o
await this.right(5);
await this.up(2);
await this.ok();

// m
await this.down(2);
await this.left(1);
await this.ok();

// /
await this.right(3);
await this.down();
await this.ok();
await this.up(2);
await this.left();
await this.ok();
await this.right();
await this.down(2);
await this.ok();

// w
await this.up(3);
await this.right();
await this.ok();

// a
await this.left();
await this.down();
await this.ok();

// t
await this.right(4);
await this.up();
await this.ok();

// c
await this.down(2);
await this.left();
await this.ok();

// h
await this.right(2);
await this.up();
await this.ok();

// ?
await this.left(5);
await this.down(2);
await this.ok();
await this.up();
await this.left(3);
await this.ok();
await this.right(3);
await this.down();
await this.ok();

// v
await this.up();
await this.right(4);
await this.ok();

// =
await this.left(4);
await this.down();
await this.ok();
await this.up();
await this.ok();
await this.left(4);
await this.up();
await this.ok();
await this.right(4);
await this.down(2);
await this.ok();

// d
await this.up(2);
await this.right(2);
await this.ok();

// Q
await this.left(2);
await this.down();
await this.ok();
await this.up(2);
await this.ok();

// w
await this.right();
await this.ok();

// 4
await this.sendIRCC('Num4');

// w
await this.ok();

// 9
await this.sendIRCC('Num9');

// W
await this.left();
await this.down(2);
await this.ok();
await this.right();
await this.right();
await this.up(2);
await this.ok();

// g
await this.right(3);
await this.down(1);
await this.ok();

// X
await this.left(4);
await this.down();
await this.ok();
}
await this.right(2);
await this.ok();

// c
await this.right();
await this.ok();

// Q
await this.left(3);
await this.ok();
await this.up(2);
await this.ok();

// Enter
await this.left();
await this.down(3);
await this.ok();

topOfScreen(): Promise<Response[]> {
return this.up(30);
// Increase Volume
await this.volumeDown(100);
await this.volumeUp(20);
}
}

1 comment on commit 9212ca8

@martvdm
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lol

Please sign in to comment.