I want to create an API that will roll a healing potion for dnd 5e and apply the amount to the selected token with this API my players are able to select their token and say like !usepotion healing chat will say something like "Player: used a healing potion and healed for x hit points" and will apply this to the token. I want to have the ability for my players to just quickly click a button on their character sheet or something where it might say "Healing Potion" so they don't have to memorize the exact commands for the healing, is something like this even possible? I tried to make a macro that talks with API but I don't think API can actively monitor the chat and I'm not sure how to trigger the API to respond to when the macro would roll "Healing Potion 8 hp healed". on("chat:message", function(msg) { if (msg.type === "api" && msg.content.startsWith("!usepotion ")) { const potionType = msg.content.split(" ")[1].toLowerCase(); const potions = { "healing": [2, 4, 2], "greater": [4, 4, 4], "superior": [8, 4, 8], "supreme": [10, 4, 20] }; const selectedToken = msg.selected ? getObj("graphic", msg.selected[0]._id) : undefined; if (!selectedToken) { sendChat("API", "No token selected."); return; } if (!potions.hasOwnProperty(potionType)) { sendChat("API", "Invalid potion type. Available types: healing, greater, superior, supreme"); return; } const rollResult = randomInteger(potions[potionType][0]) + potions[potionType][2]; const currentHealth = parseInt(selectedToken.get("bar3_value")) || 0; const newHealth = currentHealth + rollResult; selectedToken.set("bar3_value", newHealth); sendChat("API", `${selectedToken.get("name")} used a ${potionType} potion and healed for ${rollResult} hit points.`); } });