From b0587f1c685cfee98fab7287175c68e796ce6ae2 Mon Sep 17 00:00:00 2001 From: Anthony Sottile Date: Fri, 17 Jul 2020 14:03:39 -0700 Subject: [PATCH] limit !settoday to mods --- bot.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bot.py b/bot.py index 971d285..21949ec 100644 --- a/bot.py +++ b/bot.py @@ -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)