If you use more than one $(eval) you’re doing something wrong, everything can be contained in one, and it also helps speed up the execution of your code, here’s a fix:
!addcom !battle $(eval u = '$(user)'; t = '$(touser)'; r = a => a[Math.floor(Math.random() * a.length)]; s = $(urlfetch json https://pastebin.com/raw/Ap6zNgF3); o = [`It misses...`, `It's super effective! ${t} faints`, `It's not very effective...`]; `A wild ${u} appears & attacks ${t}! ${u} uses ${r(s)}. ${r(o)}`;)
I think your issue with the second part of the command was that you were using the wrong quotation marks: “” instead of "", '' or ``.