Function createAward

  • Creates a new award.

    Usage

    const award: Omit<Award, '_id'|'requirement'> = {
    name: "Masoveteran",
    description: "Award given for being a Masochist.ME member for 10 years.",
    img: "http://http.cat/404.jpg",
    category: "5f5affe76ba7865769",
    children: [],
    isStackable: false,
    isEnabled: true,
    isLegacy: false
    };

    [TODO] Allow adding children here as well!!!

    const {
    acknowledged,
    insertedId,
    } = await sdk.createAward({ award });

    Parameters

    • params: {
          award: Partial<Omit<Award, "_id" | "requirements">>;
      }
      • award: Partial<Omit<Award, "_id" | "requirements">>

        Data of the new award. All fields of the type Award are required.

    Returns Promise<InsertOneResult<Award>>

Generated using TypeDoc