This commit is contained in:
NikolajDanger
2021-02-01 15:45:01 +01:00
parent 6decee0cb3
commit 519885a435

View File

@ -225,16 +225,16 @@ class BedreNetflix():
async def downloading(self,ctx):
messageText, allDownloaded = await self.genDownloadList()
if messageText.startswith("```"):
updatesLeft = 20
messageText = messageText[:-3]+"\nThis message will update once every 30 seconds for "+str(math.ceil(updatesLeft/2))+" more minutes\n```"
updatesLeft = 60
messageText = messageText[:-3]+"\nThis message will update every 10 seconds for "+str(math.ceil(updatesLeft/6))+" more minutes\n```"
oldMessage = await ctx.send(messageText)
while ((not allDownloaded) and updatesLeft > 0):
await asyncio.sleep(30)
await asyncio.sleep(10)
updatesLeft -= 1
messageText, allDownloaded = await self.genDownloadList()
messageText = messageText[:-3]+"\nThis message will update once every 30 seconds for "+str(math.ceil(updatesLeft/2))+" more minutes\n```"
messageText = messageText[:-3]+"\nThis message will update every 10 seconds for "+str(math.ceil(updatesLeft/6))+" more minutes\n```"
await oldMessage.edit(content = messageText)
messageText, allDownloaded = await self.genDownloadList()