Can someone help me create a custom command

me and a friend have a !roll and a !goal command where we manually put in a number between 1-100 for the goal and then viewers can use the !roll command and they have to try and roll the goal that was set it’s just a fun little minigame for chat but i cant figure out how to make a !setgoal command that i can do to set a new goal so i wont have to manually change the number in the goal command if it can also pick a random number between 1-100 that would be great but if not that is fine

if i understand u correctly, this should do the trick…

!addcom !setgoal -a=!commands -ul=moderator edit !goal $(eval Math.floor(Math.random()*100)+1)
1 Like

this worked thankyou <3

1 Like