From 254e4b7b2675bbd11142006154b7ab97fd27349e Mon Sep 17 00:00:00 2001 From: Melody Horn Date: Fri, 19 Jun 2020 01:20:17 -0600 Subject: only activate on DMs --- bot.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bot.py b/bot.py index d7590bf..ee7d055 100644 --- a/bot.py +++ b/bot.py @@ -177,11 +177,12 @@ def inline_query(update: telegram.Update, context: CallbackContext): def message(update: telegram.Update, context: CallbackContext): - text = update.effective_message.text + if update.effective_chat.type == telegram.Chat.PRIVATE: + text = update.effective_message.text - logger.info('Got query %s', text) + logger.info('Got query %s', text) - update.effective_message.reply_video(BytesIO(make_video(text, STYLES[0].id))) + update.effective_message.reply_video(BytesIO(make_video(text, 'classic'))) @app.route('/') -- cgit v1.2.3