creating a guest command

Hi, I don’t know if this has been asked before but I’m wondering if there is a way nightbot is able to retain information previously input for example; I’ve been testing out touser and query but there is always an argument needed for the command to work.

An example of what I am attempting to do would be !guest Today’s guest is $(touser) checkout his/her POV at https://www.twitch.tv/$(touser). where tosuer is filled without needing a variable. Like from the previous time the command was used. Like if initially the command was used for myself !guest sohwei the inital command would display: "Today’s guest is sohwei checkout his/her POV at https://www.twitch.tv/sohwei." However, if there is no argument, !guest "“Today’s guest is checkout his/her POV at https://www.twitch.tv/”. I would like the person’s name to remain and stay there till a new username is input from the command or chat and remains that way till changed.

TL;DR: Looking for a shoutout command that retains the argument previously typed

You generally wouldn’t be able to retain the previous usage, but you could make a separate, moderator-only command to set the output of the primary command using aliases. Is that something that solves your use case?

Hey @sohwei!

To expand on what Night suggested, here’s how to set up such commands:
First you’ll need a command to set up your guest, copy/paste the code in your chat:
!setguest [user]:

!addcom !setguest -ul=mod -a=!editcom !guest $(twitch $(touser) "Today's guest is {{displayName}}! Check out their POV at {{url}}") 

This will edit your !guest command, after that, the command will “remember” the current guest.
To set up your guest command for the first time, do it like so:
!guest:

!addcom !guest $(twitch $(channel) "Today's guest is {{displayName}}! Check out their POV at {{url}}")

Yes thank you so much!!!

THIS IS THE BEST I LOVE YOU GUYS!!! Thank you so much!! Its been something i’ve tried many times on my own with no avail… I was pointed here by someone else awhile ago but did not have the courage to post anything. Thank you once again and thanks for being so nice!

1 Like

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