diff options
author | Melody Horn <melody@boringcactus.com> | 2020-06-19 01:20:17 -0600 |
---|---|---|
committer | Melody Horn <melody@boringcactus.com> | 2020-06-19 01:20:17 -0600 |
commit | 254e4b7b2675bbd11142006154b7ab97fd27349e (patch) | |
tree | 2f7abba9c9d106514811a92ac84dcb61b3908132 | |
parent | 6f4472ae6272a670ef29ad1ff844c601b1cb5d95 (diff) | |
download | crabravebot-254e4b7b2675bbd11142006154b7ab97fd27349e.tar.gz crabravebot-254e4b7b2675bbd11142006154b7ab97fd27349e.zip |
only activate on DMs
-rw-r--r-- | bot.py | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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('/') |