Function createBadge

  • Creates a new badge.

    Usage

    const badge: Omit<Badge, '_id'> = {
    name: "New Badge",
    description: "Very cool new badge.",
    requirements: "video",
    img: "http://http.cat/404.jpg",
    points: 5,
    gameId: 25413,
    title: null,
    isSteamGame: true,
    enabled: true,
    legacy: false,
    };

    const {
    acknowledged,
    insertedId,
    } = await sdk.createBadge({ badge });

    Parameters

    • params: {
          badge: Omit<Badge, "_id">;
      }
      • badge: Omit<Badge, "_id">

        Data of the new badge. All fields of the type Badge are required.

    Returns Promise<InsertOneResult<Badge>>

Generated using TypeDoc