When you have an issue, you need to better explain what your issue actually is because your one sentence makes no sense.
After quickly going over your code, it looks like you are making things more complicated than it needs to be. Don't try to do global menus, especially since you're doing user-specific items. Simply create the menu when the player uses the chat command, display it there, and then destroy it in the handler.