Its most likely possible to code the bot to do so, However ANY action the bot performs that can not be performed by a human player is the direct path to having your account banned.. Even simple things like opening your inventory, As the developers discovered you need to code the bot to inject the Exact memory code as if the user pushed the I button him self.
It was how some users where banned with the Exilebuddy Bot, as the bot was doing things that a human player could not.. So the actually bot was not detected, Just the code that was being injected was... They lent there lesson there and wont be doing it again.