dev #19
@ -17,6 +17,8 @@ class PosterClient(Client):
|
|||||||
|
|
||||||
def __init__(self, name: str, **kwargs): # type: ignore
|
def __init__(self, name: str, **kwargs): # type: ignore
|
||||||
super().__init__(name, **kwargs)
|
super().__init__(name, **kwargs)
|
||||||
|
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) -> Union[Message, None]:
|
||||||
|
|
||||||
@ -40,7 +42,7 @@ class PosterClient(Client):
|
|||||||
|
|
||||||
response = await upload_pic(str(filepath))
|
response = await upload_pic(str(filepath))
|
||||||
|
|
||||||
if response[0] is False:
|
if len(response[1]) > 0:
|
||||||
raise SubmissionDuplicatesError(str(filepath), response[1])
|
raise SubmissionDuplicatesError(str(filepath), response[1])
|
||||||
|
|
||||||
col_submitted.find_one_and_update({"_id": ObjectId(id)}, {"$set": {"done": True}})
|
col_submitted.find_one_and_update({"_id": ObjectId(id)}, {"$set": {"done": True}})
|
||||||
|
@ -3,7 +3,8 @@
|
|||||||
"locale": "en",
|
"locale": "en",
|
||||||
"locale_log": "en",
|
"locale_log": "en",
|
||||||
"locale_fallback": "en",
|
"locale_fallback": "en",
|
||||||
"admin": 0,
|
"owner": 0,
|
||||||
|
"admins": [],
|
||||||
"bot": {
|
"bot": {
|
||||||
"api_id": 0,
|
"api_id": 0,
|
||||||
"api_hash": "",
|
"api_hash": "",
|
||||||
@ -46,7 +47,8 @@
|
|||||||
"channel": 0,
|
"channel": 0,
|
||||||
"silent": false,
|
"silent": false,
|
||||||
"move_sent": false,
|
"move_sent": false,
|
||||||
"interval": 1,
|
"use_interval": false,
|
||||||
|
"interval": "1h30m",
|
||||||
"extensions": {
|
"extensions": {
|
||||||
"photo": [
|
"photo": [
|
||||||
"jpg",
|
"jpg",
|
||||||
@ -74,6 +76,7 @@
|
|||||||
],
|
],
|
||||||
"api": {
|
"api": {
|
||||||
"address": "http://localhost:8054",
|
"address": "http://localhost:8054",
|
||||||
|
"address_external": "https://photos.domain.com",
|
||||||
"username": "",
|
"username": "",
|
||||||
"password": "",
|
"password": "",
|
||||||
"album": ""
|
"album": ""
|
||||||
@ -105,6 +108,8 @@
|
|||||||
"rules"
|
"rules"
|
||||||
],
|
],
|
||||||
"commands_admin": [
|
"commands_admin": [
|
||||||
|
"import",
|
||||||
|
"export",
|
||||||
"reboot"
|
"reboot"
|
||||||
]
|
]
|
||||||
}
|
}
|
Reference in New Issue
Block a user