Skip to Content
defold-typescript libraries
widgrensitasobi-defold

widgrensit/asobi-defold/asobi.api.dm

asobi direct messages over REST. A project reaches it as client.dm.

  • GitHub: widgrensit/asobi-defold — pinned to v1.18.1
    1. Pick a release from widgrensit/asobi-defold releases and add its Source code (zip) URL (or a packaged .zip asset, if the library ships one) to game.project under [project] dependencies, then Fetch Libraries in the Defold editor.
    2. Run bunx @defold-typescript/cli resolve to materialize its types.
    3. Import it under a namespace alias of your choice:
      import * as api_dm from "asobi.api.dm"

Functions

send(client: Client, recipient_id: string, content: string, callback?: HttpCallback)

Sends a direct message to a player.

Parameters

  • client: Client — The client.
  • recipient_id: string — The recipient's player id.
  • content: string — The message text.
  • callback?: HttpCallback — Receives the sent message, or the error.

history(client: Client, player_id: string, limit?: number, callback?: HttpCallback)

Fetches the direct messages exchanged with a player.

Parameters

  • client: Client — The client.
  • player_id: string — The other player's id.
  • limit?: number — The most messages to return. The server's default applies when left out.
  • callback?: HttpCallback — Receives the messages, or the error.

On this page