Templater Random Pokemon

const random = Math.floor(Math.random() * (649 - 1))
const randomPoke = await fetch(`https://pokeapi.co/api/v2/pokemon/${random}`)
const capitaliseFirstLetter = (string) => (string.charAt(0).toUpperCase() + string.slice(1));
const pokeJson = await randomPoke.json()
let pokePlate = {sprite: pokeJson.sprites.other["official-artwork"].front_default, name: capitaliseFirstLetter(pokeJson.name), id: pokeJson.id}
 
## Pokemon of the Day: < % pokePlate.name %>, # < % pokePlate.id %>
 
![](< % pokePlate.sprite %>)
 

Templater Ask for Title

 
const title = tp.file.title
if (title.includes("Untitled")) {
const newTitle = await tp.system.prompt("File Name")
await tp.file.rename(newTitle)
}