Added the create_ticket function and code to the command handler