Hello everyone, I am currently developing a Twitch.tv moderation bot and the last step I have is a !topic script. I have scoured across the internet and tried to create the script myself but it never works.

So basically what I want the bot to do is when i type !topic and then a message after that it sets the message as the topic, and then when i type !topic without any text after it, it says the topic message in my channel. I have seen this on almost every moderation bot so I know it can be done. Any help you guys can provide is greatly appreciated. Thanks.