don't ignore protected tags completely, download to PUBLIC/ instead

This commit is contained in:
Tomáš Mládek 2019-05-22 12:12:16 +02:00
parent 4d74e08b00
commit 4059ce6366

View file

@ -12,7 +12,6 @@ from configparser import ConfigParser
from datetime import datetime, timedelta
from glob import glob
from operator import itemgetter
from random import choice
import acoustid
import filetype
@ -264,13 +263,9 @@ class DelojzaBot:
if any(hashtag in self.protected_tags for hashtag in hashtags):
if message.chat.title not in self.protected_chats:
self.logger.info("Ignoring {} in chat {} due to protected hashtags: {}..."
self.logger.info("Redirecting {} in chat {} due to protected hashtags: {}..."
.format(urls, message.chat.title, hashtags))
replies = ["Nein", "Nope", ":(", "Error: Cannot.",
"Error: {}".format(self.markov.make_sentence() if self.markov else "Cannot."),
"Failed: {}".format(self.markov.make_sentence() if self.markov else "Cannot.")]
message.reply_text(choice(replies))
return
hashtags.insert(0, "PUBLIC")
self.last_hashtags = None