It works, if it's used completely standalone. Aside from that, saying its variable usage is poor would be an understatement, and it uses an abundance of if-statements where you could easily just slap in a list and have code that's much neater and easier to work with. It's also completely incompatible with other chat systems, because instead of adjusting the message or using the built-in prefix or formatting system, it completely cancels the chat event and blindly overrides the entire message system with whatever it pleases.
Overall, I'd rather go with a different alternative. Here's a neat list of things to change:
- Use lists instead of 10 if-statements
- Follow variable naming conventions and use uuids
- Use the built-in prefix system, and replace messages and chat formatting instead of cancelling them and sending your own
- Don't hardcode the prefix, instead use options.