From ESOUI Wiki
Checks the item in a particular bag slot and returns its item link, or an empty string.
- A number representing the bag to check; it must be one of the built-in Bag values.
- The numeric index of the slot in that bag which should be checked. For most bags, this is a number ranging from 1 to the size of the bag.
- The type of item link to return, as a LinkStyle value. If this is an invalid or nil value, then the game will use LINK_STYLE_DEFAULT.
local link = GetItemLink(bagId, slotIndex) if link ~= "" then d("That item is a " .. link .. "!") end