This commit closes #9

This commit is contained in:
2023-03-16 15:03:14 +01:00
parent 62e0a4986c
commit 4ec69c2a05
5 changed files with 30 additions and 15 deletions

View File

@@ -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