...pt. 2
This commit is contained in:
parent
8edcefb7ae
commit
d751186594
1 changed files with 2 additions and 2 deletions
|
@ -173,8 +173,8 @@ class DelojzaBot:
|
||||||
message.reply_text("Something is FUCKED: %s" % exc_value)
|
message.reply_text("Something is FUCKED: %s" % exc_value)
|
||||||
|
|
||||||
def handle_url(self, _, update):
|
def handle_url(self, _, update):
|
||||||
urls = map(lambda e: update.message.parse_entity(e),
|
urls = list(map(lambda e: update.message.parse_entity(e),
|
||||||
filter(lambda e: e.type == 'url', update.message.entities))
|
filter(lambda e: e.type == 'url', update.message.entities)))
|
||||||
ytdl_urls = [url for url in urls if self.ytdl_can(url)]
|
ytdl_urls = [url for url in urls if self.ytdl_can(url)]
|
||||||
normal_urls = [url for url in urls if not self.ytdl_can(url)]
|
normal_urls = [url for url in urls if not self.ytdl_can(url)]
|
||||||
if len(ytdl_urls) > 0:
|
if len(ytdl_urls) > 0:
|
||||||
|
|
Loading…
Reference in a new issue