Need help making a command

Asked May 14, 2024·2 replies·Last activity 2 years ago·Open in Discord ↗
Archived from the original community forum
Things may have changed since it was written. Still stuck? Ask the community on Discord.

i made a similar post a few weeks ago but i need help making a command for a minigame me and a friend have in our twitch chats. the 3 commands it uses are !roll !goal and !setgoal rn the !setgoal command will pick a random number 1-100 and set that as the number in the !goal command and viewers can roll to try and get the goal. instead of the !setgoal command picking a random number 1-100 is there a way that i can set the number the goal will change too? for example if i used !set goal 11 the goal would then be set to 11

2 replies

yes, i remember helping with that one... this should do the trick...

js
!editcom !setgoal -a=!commands -ul=moderator edit !goal $(eval a=`$(query)`;a==a*1?`${a}`:`${Math.floor(Math.random()*100)+1}`)