Setgoal and roll command

Hello there was a previous post about creating a command for setting a goal and having users roll for it

i was able to create the setgoal and goal comamnds

edit !goal $(eval a=`$(query)`;!isNaN(parseFloat(a))?`${a}`:`${Math.floor(Math.random()*100)+1}`) 󠀀

However is there a way to set the roll command to so that it rolls a random number until the users can hit the current goal number?