Skip to content

Clipboard and sound

Text only. Both go off the game’s threads, so they give promises.

import { clipboard } from "wraith";
await clipboard.setText(`0x${address.toString(16)}`);
const text = await clipboard.getText();

WAV files and Windows’ own sounds. One plays at a time, so a new one stops the last, and nothing plays while the user has Sounds off in Wraith’s settings. play reads the file off the game’s threads, so it gives a promise.

import { sound } from "wraith";
await sound.play("sounds/ding.wav"); // from the plugin's folder
sound.playBytes(wavBytes);
sound.playSystem("notification"); // default, info, warning, error, question
sound.stop();

Made with ♥ by Asgard