Creating a custom command

I am trying to make a hello response command but I dont know how to add other q= = words to react with it.
!addcom hi $(eval q=$(1); q==guys||q==null?Hello $(user), welcome to my stream!: )
Like the command works when i say ‘Hi’ or ‘Hi guys’ but I want to add more ways to have it respond to.
How would I add extra words like it has for ‘guys’.

1 Like

Hey @mysteryonzero!

I feel like we’ve answered this very question many times before, have you tried using the search bar before opening your topic?

$(eval if ('$(1)' === 'guys') { 'MESSAGE_IF_GUYS_IN_INPUT' } else if ('$(1)' === 'mate') { 'MESSAGE_IF_MATE_IN_INPUT' } else { 'Hello $(user), welcome to my stream!' })

Or if you want to use the ternary operator (a tiny bit more advanced, only use it if you understand it):

$(eval if '$(1)' === 'guys' ? 'MESSAGE_IF_GUYS_IN_INPUT' : '$(1)' === 'mate' ? 'MESSAGE_IF_MATE_IN_INPUT' : 'Hello $(user), welcome to my stream!')
1 Like

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