Adding ship command to twitch

Ok so I’ve been working on adding a ship command, but have been having SO many issues no matter what I change.

The basic idea is:
!ship
returns:
:broken_heart: Aw you have no one to love ;-; don’t worry, I’m here for you! :broken_heart:

!ship user1
returns:
:revolving_hearts: [invoker] &[user1] are [random choice based on compatibility] :revolving_hearts: ([random % compatible]%) :revolving_hearts:

!ship [user1] [user2]
returns:
:revolving_hearts: [user1] & [user2] are [random choice based on compatibility] :revolving_hearts: ([random % compatible]%) :revolving_hearts:

!ship [user1] [user1]
returns:
Try shipping two different people!

I tried:

$(eval 
  u1="$(touser $(1))".toLowerCase(); 
  u2="$(touser $(2))".toLowerCase(); 
  u2 = u2 == "" ? "$(user).toLowerCase()" : u2; 
  rand=Math.floor(Math.random() * 101); 
  a=rand==0 ? "arch nemesies" : rand<20 ? "enemies" : rand<30 ? "friends" : rand<65 ? "friends" : rand<75 ? "best friends" : rand<90 ? "lovers" : "soul mates"; 
  (u1=="" && u2=="") ? `πŸ’” Aw you have no one to love ;-; don't worry, I'm here for you! πŸ’”` : 
  (u1 == u2 ? `πŸ’– Try shipping two different people... πŸ’–` : 
  `πŸ’ž ${u1}, and ${u2} are ${a} πŸ’ž (${rand}% compatible) πŸ’ž`)
)

and a few different variations to no avail. The snippet here is to long.

Try the following:

$(eval x=`$(1)`;y=`$(2)`;let r;if(x==='null'&&y==='null'){r=`πŸ’” Aw you have no one to love ;-; don't worry, I'm here for you! πŸ’”`;}if(r==null&&y==='null'){y=x;x=`$(user)`;}if(r==null&&x.toLowerCase()===y.toLowerCase()){r=`πŸ’– Try shipping two different people... πŸ’–`;}if(r==null){a=Math.floor(Math.random()*101);b=a===0?`arch nemesies`:a<20?`enemies`:a<30?`friends`:a<65?`friends`:a<75?`best friends`:a<90?`lovers`:`soul mates`;r=`πŸ’ž ${x} and ${y} are ${b} πŸ’ž (${a}% compatible) πŸ’ž`;}r)
1 Like

Not sure how to mark this as the answer, but this seems to have done it! Thank you!