To make your Mineflayer bot right-click and interact with custom menus (like GUI interfaces triggered by items or blocks), you need to use the correct interaction methods based on the server's mechanics. For blocks, use bot.activateBlock(block) where block is obtained from bot.blockAt(position). For items in hand (like opening a menu with a compass), use bot.activateItem() or simulate a use with bot._client.write('block_place', {...}) for more custom behavior. Keep in mind some servers use plugins that require exact packet handling or have anti-bot protections, so you may need to listen for window events like bot.on('windowOpen', ...) to handle menus properly.