You could make an array of enums the enum will hold every command you can use, use a loop and use a switch statement at the beginning of the loop to see what command the user want, after that just write the functions of the commands.
oops, I might have gotten something wrong, one sec I will try this and see if it would work. It may have given you the general idea even if it's not entirely accurate. Doing the work 4 u -_-