fixed filename output to not be a url

This commit is contained in:
phixxy 2024-09-04 20:35:52 -07:00
parent 73679351d3
commit 5b8c433e95
2 changed files with 4 additions and 2 deletions

View file

@ -26,7 +26,9 @@ class YoutubeDL(BotBaseCog):
async def check_for_downloads(self):
for file in os.listdir("data/ytdl"):
if file.endswith(".txt"):
await self.bot.get_channel(544408659174883328).send(f"{file[:-4]}")
with open(f"data/ytdl/{file}", "r") as f:
url = f.read()
await self.bot.get_channel(544408659174883328).send(f"{url}")
os.remove(f"data/ytdl/{file}")
async def setup(bot):