That is a long regex. You could have done it like so:
on $999:text:$(/^[!@.`~^](do|bot|\Q $+ $me $+ \E)$/Si):#:{
\Q and \E in regex makes special characters literal. A nick can consist of them. This will trigger upon
!,@,.,',~,or ^Dertikter, do, and me
Just the way you want it.