fixed filename output to not be a url
This commit is contained in:
parent
73679351d3
commit
5b8c433e95
2 changed files with 4 additions and 2 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue