Browse Source

telegram you are fucking weird

master
blank X 2 years ago
parent
commit
4865b970e3
  1. 6
      redditbot.py

6
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):

Loading…
Cancel
Save