A command that implements other commands?

Ok so here’s what I put:

!editcom !slap $(eval user="$(user)";touser="$(touser)";responses=$(urlfetch json PASTEBIN);responses[Math.floor(Math.random()*responses.length)])

(PASTEBIN is replaced with the proper url, ZvVsTuMU)

and when I do it, nightbot just returns random letters of the alphabet, no matter if I put !slap Mark or just !slap