Add a command to let everyone add another command

Hi,

Basically I thought about creating a !feedback command available to all users that gives text feedback inside a command (the command will most likely never be executed) a bit like this !addcom !feedback -a=!commands add _feedback$(count)_ -ul=moderator $(query) (together with !addcom !resetfeedback -a=!commands -ul=moderator edit !feedback \-c=-1 to reset it after reading them) but it didn’t work.

After looking a bit on the forum, I found out that !commands was limited to moderators+, but also that a workaround existed to edit count commands (here or here), using a custom API.

The issue is, I couldn’t find any post talking about a workaround to create commands without !commands so I’m wondering if anyone knew if it was possible or not. (I’m aware there are alternatives to using a command for that, but that’s what would be the most simple for viewers if it’s possible)

Thanks

@Civafu

The only ways to add commands through chat are to use !addcom or an alias of !addcom, both of which are mod-only by default and cannot be changed to be used by lower level users.

However, ehsan’s quote list API that I mentioned in both of the posts you linked can be used to set up a list of feedback that users can add to.


Click this link. It will generate three links and two tokens, a public token (8 characters long) and a private token (16 characters long). The public token is located within the first generated link. The private token is located within both the second and third generated links. The tokens are found after token= and before &data=$(querystring) Copy them and keep them somewhere safe!

I set up 3 commands below: !addfeedback which adds a user’s input to the list, !feedback which lets you look up bits of feedback from the list, and !resetfeedback (mod-only) which clears the list. Either copy and paste these commands into chat or add them through the Nightbot dashboard. Add the commands through chat only if you are sure no one else is there, otherwise they might see your private token (which is used to edit the list)! Replace PUBLIC_TOKEN with your public token and PRIVATE_TOKEN with your private token.

!addcom -cd=5 !addfeedback $(eval a=`$(urlfetch http://twitch.center/customapi/addquote?token=PRIVATE_TOKEN&data=$(user): $(querystring))`;`Thank you for your feedback $(user)!`)
!addcom -cd=5 !feedback Feedback from $(urlfetch http://twitch.center/customapi/quote/list?token=PUBLIC_TOKEN&no_id=1)
!addcom -ul=mod !resetfeedback $(eval a=`$(urlfetch http://twitch.center/customapi/delquote?token=PRIVATE_TOKEN&clear=1)`;`$(user) has cleared the feedback list!`)
1 Like

Thanks for the fast reply, it works even better than I thought since it also gives username

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.