Skip to content

Tego Bot API Documentation v0.2.0


Tego Bot API Documentation / rightClick

Function: rightClick() ​

rightClick(x?, y?): void

Defined in: botjs/src/index.ts:752

Perform a right-click at the current mouse position or at specified coordinates

Parameters ​

x? ​

number

Optional X coordinate to move to before right-clicking

y? ​

number

Optional Y coordinate to move to before right-clicking

Returns ​

void

Example ​

typescript
import { rightClick } from "@tego/botjs";

// Right-click at current position
rightClick();

// Move to (300, 400) and right-click
rightClick(300, 400);

Released under the MIT License.