Skip to main content

IOverwolfUtilityApi

Electron APIs / Utility / IOverwolfUtilityApi

Defines the API for managing game launch and utility operations.

Methods

on("game-launched")

on(eventName: "game-launched", listener: (gameInfo: GameInfo) => void): this;

Registers an event listener that triggers when a tracked game is launched.

Parameters
ParameterTypeDescription
eventName"game-launched"The name of the event ('game-launched').
listener(gameInfo: GameInfo) => voidA callback that receives the GameInfo of the launched game.
Returns

this

The current instance for method chaining.

on("game-exit")

on(eventName: "game-exit", listener: (gameInfo: GameInfo) => void): this;

Registers an event listener that triggers when a tracked game is exited.

Parameters
ParameterTypeDescription
eventName"game-exit"The name of the event ('game-exit').
listener(gameInfo: GameInfo) => voidA callback that receives the GameInfo of the exited game.
Returns

this

The current instance for method chaining.


scan()

scan(filter?: any): Promise<InstalledGameInfo[]>;

Scans the system for installed games that match the provided filter.

Parameters

ParameterTypeDescription
filter?anyOptional. A filter to narrow down the list of installed games.

Returns

Promise<InstalledGameInfo[]>

A promise that resolves to a list of installed game information.


trackGames()

trackGames(filter: GamesFilter): Promise<void>;

Begins tracking game launch and exit events based on a given filter. Once a game that matches the filter is launched or exited, the appropriate event listeners will be triggered.

Parameters

ParameterTypeDescription
filterGamesFilterCriteria used to determine which games to track.

Returns

Promise<void>