Start by going to the E_MessageTypes there add a new enum and call it what you want for this guide I will call mine New Command. Then save the enum.
Next go to the BP_CGGFunctions and then go to the CGGSelectMessagingType function and in the My Blueprint panel select the MessageTypesL. In the details add a new entry to the array by pressing the + button. Then in the new entry set the message type to your new message type you created.
Then create a new entry in its Prefixes array by clicking the + button. This is the commands that the play must type to run the commands code. It must start with / then followed by the text the player needs to enter. Example below.
Note that the text is not case sensitive so if the player uses capital letters it will still work!
Next go to the BP_Chat widget, in the event graph you will find the switch node with all the message types. Here is where you add the code for your new command. This code will totally depend on what you want your command to do.
Last in the class defaults of the BP_Chat add your new message type to the Ignore Command Message Type.
Below is an example of how you can call events on your character or player controller.
You may want to add your new command to the command list so when players type /commands they can see what your command is and what it does. Follow the guide below on how to change the commands message.