From 4865b970e3d3ff4774545d58e942f584fd02e967 Mon Sep 17 00:00:00 2001 From: blank X Date: Fri, 30 Oct 2020 13:17:39 +0700 Subject: [PATCH] telegram you are fucking weird --- redditbot.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/redditbot.py b/redditbot.py index 17ec1ae..126ea88 100644 --- a/redditbot.py +++ b/redditbot.py @@ -17,7 +17,7 @@ import aiohttp import aiocron from bs4 import BeautifulSoup from telethon import TelegramClient, events -from telethon.utils import chunks +from telethon.utils import chunks, is_list_like with open('config.yaml') as file: config_data = yaml.safe_load(file) @@ -202,6 +202,10 @@ async def main(): k = None if not k and len(j) == 1: j = j[0] + if is_list_like(j) and is_list_like(k): + if len(j) == 1 and len(k) == 1: + j = j[0] + k = k[0] await client.send_message(chat, j, file=k, link_preview=False) async def _download_file(filename, url):