limit !settoday to mods

This commit is contained in:
Anthony Sottile 2020-07-17 14:03:39 -07:00
parent 1515f163af
commit b0587f1c68
1 changed files with 4 additions and 0 deletions

4
bot.py
View File

@ -350,6 +350,10 @@ class SetTodayResponse(MessageResponse):
@handle_message('!settoday')
def cmd_settoday(match: Match[str]) -> Response:
if not _is_moderator(match) and match['user'] != match['channel']:
return MessageResponse(
match, 'https://www.youtube.com/watch?v=RfiQYRn7fBg',
)
_, _, rest = match['msg'].partition(' ')
return SetTodayResponse(match, rest)