# Darklord.js — removePotionSafe() (satır 3020) [← Darklord.js](index.md) · [← Master](../../wiki.md) ```javascript function removePotionSafe(player, id) { try { var potion = mappet.getPotion(id); if (potion != null && player.hasPotion(potion)) player.removePotion(potion); } catch (e) {} } ```