mirror of
https://github.com/nexy7574/LCC-bot.git
synced 2024-09-19 18:16:34 +01:00
Force Io
This commit is contained in:
parent
c63f481522
commit
6e17e766bf
1 changed files with 7 additions and 1 deletions
|
@ -750,7 +750,13 @@ class OtherCog(commands.Cog):
|
||||||
self.urls = iter(urls)
|
self.urls = iter(urls)
|
||||||
self.filename = urls[0].split("/")[-1]
|
self.filename = urls[0].split("/")[-1]
|
||||||
|
|
||||||
async def save(self, f):
|
async def save(self, f: str | typing.IO[bytes]):
|
||||||
|
if isinstance(f, str):
|
||||||
|
f = open(f, "wb+")
|
||||||
|
v = await self.save(f)
|
||||||
|
f.close()
|
||||||
|
return v
|
||||||
|
|
||||||
async with httpx.AsyncClient() as client:
|
async with httpx.AsyncClient() as client:
|
||||||
response = None
|
response = None
|
||||||
for url in self.urls:
|
for url in self.urls:
|
||||||
|
|
Loading…
Reference in a new issue