Return a text if a specific user is in the chat

I want to make a command who return a message in chat if a specific user is in the chat
for example (the names are generic ones):
The command !kiwi
will check if the user “GreatKiwi” is in the chat and return a message “Yes, Kiwi is in the chat” or “No, he is not”
Note that is user is also a moderator,
so what I was thinking of doing something like this (It’s not the right language but it gives the idea of the concept of what i want to do) :

mods = $(current_moderators)
if ‘GreatKiwi’ in mods :
return “Kiwi is here”
else :
return “Kiwi is not here”

I don’t know if it’s possible, I don’t really know how to code, especially in this language, if you can help me on that it can be awesome,
Thanks !

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