How do I disable the charging chime with Mojave on 2018 a MacBook?

In my case it did work after running this in the Terminal (I am using a USB-C monitor for powering the MacBook Pro)

defaults write com.apple.PowerChime ChimeOnNoHardware -bool true  
killall PowerChime

also this question discusses more ways to solve:

  • Turning Power Chime Off

A-HA! I know this one! I just found out recently what to do about it. I have an early 2011 MB Pro and this came up. Baffled the crud out of me. Very simple fix, really.

UNPLUG the charging cable and block from both the wall and the MacBook and just let it sit for about 2-3 minutes to discharge and, what I'm told, reset (something internal). After that, plug it in at both ends and see what happens.

(goes without mentioning this is in regards to using the stock Apple charging adapter and cable appropriate for the MacBook, of course.)

Looking/thinking back on this, I kinda jumped the gun and assumed your problem is that the periodic charge beeping continues no matter what you do, restart, etc., like what happened to me. Hope you get it sorted soon!