Skip to content

Commit

Permalink
fix arg issues in upload.py (UsergeTeam#121)
Browse files Browse the repository at this point in the history
  • Loading branch information
Phyco-Ninja authored Aug 7, 2020
1 parent 75661b5 commit c38c796
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions userge/plugins/misc/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ async def upload(message: Message, path: Path, del_path: bool = False, extra: st
await doc_upload(message, path, del_path, extra)


async def doc_upload(message: Message, path, del_path: bool, extra: str):
async def doc_upload(message: Message, path, del_path: bool = False, extra: str = ''):
sent: Message = await message.client.send_message(
message.chat.id, f"`Uploading {path.name} as a doc ... {extra}`")
start_t = datetime.now()
Expand Down Expand Up @@ -232,7 +232,7 @@ async def doc_upload(message: Message, path, del_path: bool, extra: str):
os.remove(str(path))


async def vid_upload(message: Message, path, del_path: bool, extra: str):
async def vid_upload(message: Message, path, del_path: bool = False, extra: str = ''):
strpath = str(path)
thumb = await get_thumb(strpath)
duration = 0
Expand Down Expand Up @@ -267,7 +267,7 @@ async def vid_upload(message: Message, path, del_path: bool, extra: str):
os.remove(str(path))


async def audio_upload(message: Message, path, del_path: bool, extra: str):
async def audio_upload(message: Message, path, del_path: bool = False, extra: str = ''):
title = None
artist = None
thumb = None
Expand Down Expand Up @@ -322,7 +322,7 @@ async def audio_upload(message: Message, path, del_path: bool, extra: str):
os.remove(str(path))


async def photo_upload(message: Message, path, del_path: bool, extra: str):
async def photo_upload(message: Message, path, del_path: bool = False, extra: str = ''):
strpath = str(path)
sent: Message = await message.client.send_message(
message.chat.id, f"`Uploading {path.name} as photo ... {extra}`")
Expand Down

0 comments on commit c38c796

Please sign in to comment.