This commit closes #9
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
from os import path, remove, sep
|
||||
from shutil import rmtree
|
||||
from typing import Union
|
||||
from typing import Tuple, Union
|
||||
from pyrogram.client import Client
|
||||
from pyrogram.types import Message
|
||||
from classes.exceptions import SubmissionDuplicatesError, SubmissionUnavailableError
|
||||
@@ -18,7 +18,9 @@ class PosterClient(Client):
|
||||
self.owner = configGet("owner")
|
||||
self.admins = configGet("admins") + [configGet("owner")]
|
||||
|
||||
async def submit_photo(self, id: str) -> Union[Message, None]:
|
||||
async def submit_photo(
|
||||
self, id: str
|
||||
) -> Tuple[Union[Message, None], Union[str, None]]:
|
||||
db_entry = col_submitted.find_one({"_id": ObjectId(id)})
|
||||
submission = None
|
||||
|
||||
@@ -87,7 +89,7 @@ class PosterClient(Client):
|
||||
f"Could not delete '{filepath}' on submission accepted", debug=True
|
||||
)
|
||||
|
||||
return submission
|
||||
return submission, response[2]
|
||||
|
||||
async def ban_user(self, id: int) -> None:
|
||||
pass
|
||||
|
Reference in New Issue
Block a user