//Set icon item
setIcon("minecraft:stick", 0, {ench:[{lvl:1s,id:51s}],display:{Name:"The Stick of Truth"}})

//Set title String
setTitle("The Stick of Truth")

//Set description String
setDescription("Acquire the The Stick of Truth")

//Set the parent advancement. The syntax is "modid:folder/path/to/the/advancement/then/filename"
setParent("triumph:example/example_inventory_changed")

//Adds criteria named "hasStickOfTruth" with the trigger type "minecraft:inventory_changed". This function returns the criteria as an object
criteria = addCriteria("hasStickOfTruth", "minecraft:inventory_changed")
//Adds the required item for the criteria. This is the item that needs to be in the player inventory. First variable is the item name, second is the metadata, third is the nbt. Nbt can be printed using /bnb hand.
criteria.addItem("minecraft:stick", 0, {ench:[{lvl:1s,id:51s}],display:{Name:"The Stick of Truth"}})