interactions.stop
Ends a use now, as if the player stopped. interactionEnded follows with reason
"script".
Signature
Section titled “Signature”interactions.stop(id: string): Promise<ActionResult>Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
id |
string |
The use’s ID, from interactions.listAll or an event. |
Returns
Section titled “Returns”A promise of an ActionResult: applied, or rejected with invalid-interaction-id or
interaction-not-found.
Example
Section titled “Example”Everyone off the machines.
import { commands, interactions } from "nativemp";
commands.register("closegym", async () => { for (const use of interactions.listAll()) await interactions.stop(use.id);});Related
Section titled “Related”interactions.listAll: every useinteractionEnded: a use ended