Compare commits

..

23 Commits
v0.1.2 ... main

Author SHA1 Message Date
a5824dbd6b Merge pull request 'v0.1.3' (#74) from dev into main
Reviewed-on: #74
2024-10-10 12:54:38 +03:00
f8472b1b3f Bump version tp 0.1.3 2024-10-10 12:52:38 +03:00
13be95f0f8 Closes #70 2024-10-09 15:10:55 +00:00
524087f59f Merge pull request 'Update dependency async_pymongo to v0.1.9' (#73) from renovate/async_pymongo-0.x into dev
Reviewed-on: #73
2024-10-08 16:49:38 +03:00
cc66cc386b Update dependency async_pymongo to v0.1.9 2024-10-08 16:29:25 +03:00
39f7904bdc Merge pull request 'Update dependency async_pymongo to v0.1.8' (#72) from renovate/async_pymongo-0.x into dev
Reviewed-on: #72
2024-09-25 22:25:42 +03:00
b5173a8dba Update dependency async_pymongo to v0.1.8 2024-09-25 17:13:14 +03:00
0a06e8493f Merge pull request 'Update dependency async_pymongo to v0.1.7' (#71) from renovate/async_pymongo-0.x into dev
Reviewed-on: #71
2024-09-21 01:52:54 +03:00
c2ee35b3d9 Update dependency async_pymongo to v0.1.7 2024-09-20 17:24:31 +03:00
896262b83e Merge pull request 'Update dependency uvloop to v0.20.0' (#69) from renovate/uvloop-0.x into dev
Reviewed-on: #69
2024-08-15 23:48:30 +03:00
f6b1749408 Update dependency uvloop to v0.20.0 2024-08-15 23:25:25 +03:00
6867b64a18
Should resolve #87 2024-08-10 14:10:59 +02:00
f42117e542 revert a5a513cb82
revert Merge pull request 'Update dependency aiohttp to ~=3.10.0' (#65) from renovate/aiohttp-3.x into dev

Reviewed-on: #65
2024-08-01 00:47:16 +03:00
a5a513cb82 Merge pull request 'Update dependency aiohttp to ~=3.10.0' (#65) from renovate/aiohttp-3.x into dev
Reviewed-on: #65
2024-07-31 02:13:51 +03:00
3fef2eb028 Update dependency aiohttp to ~=3.10.0 2024-07-31 00:47:50 +03:00
11ca3223ab Merge pull request 'Update dependency libbot to v3.2.3' (#64) from renovate/libbot-3.x into dev
Reviewed-on: #64
2024-07-10 08:12:59 +03:00
6b138126c1 Update dependency libbot to v3.2.3 2024-07-10 00:43:50 +03:00
e6adb03f61 Merge pull request 'Update dependency async_pymongo to v0.1.6' (#63) from renovate/async_pymongo-0.x into dev
Reviewed-on: #63
2024-06-23 14:33:51 +03:00
d51fa1e04c Update dependency async_pymongo to v0.1.6 2024-06-23 13:30:14 +03:00
8b2456c2fd Merge pull request 'Update dependency async_pymongo to v0.1.5' (#62) from renovate/async_pymongo-0.x into dev
Reviewed-on: #62
2024-06-02 12:57:32 +03:00
6a6b4cd6cd Selected async_pymongo from PyPi 2024-06-02 12:56:46 +03:00
852f4307f8 Update dependency async_pymongo to v0.1.5 2024-06-01 15:32:20 +03:00
e73797d819
Replaced "source code" with "learn more" 2024-05-31 00:03:24 +02:00
9 changed files with 26 additions and 18 deletions

View File

@ -19,11 +19,11 @@ logger = logging.getLogger(__name__)
class PyroClient(LibPyroClient):
def __init__(self, **kwargs):
self.__version__ = (0, 1, 2)
self.__version__ = (0, 1, 3)
super().__init__(**kwargs)
self.updater = Updater(ClientSession())
self.updater = Updater()
self.contexts = []
if self.scheduler is not None:

View File

@ -1,5 +1,5 @@
import logging
from typing import Any, Dict, Tuple
from typing import Any, Dict, Tuple, Union
from aiohttp import ClientSession
@ -7,12 +7,15 @@ logger = logging.getLogger(__name__)
class Updater:
def __init__(self, client_session: ClientSession) -> None:
self.client_session: ClientSession = client_session
def __init__(self, client_session: Union[ClientSession, None] = None) -> None:
self.client_session: Union[ClientSession, None] = client_session
async def check_updates(
self, version_current: Tuple[int, int, int], api_url: str
) -> bool:
if not self.client_session:
self.client_session = ClientSession()
response = await self.client_session.get(api_url)
if response.status != 200:
@ -30,6 +33,9 @@ class Updater:
)
async def get_latest_release(self, api_url: str) -> Dict[str, Any]:
if not self.client_session:
self.client_session = ClientSession()
response = await self.client_session.get(api_url)
if response.status != 200:

View File

@ -8,7 +8,7 @@
},
"bot": {
"name": "Garbage Reminder",
"about": "Nie wieder Müllabfuhrtermin verpassen. Quellcode: https://garbagebot.eu",
"about": "Nie wieder Müllabfuhrtermin verpassen. Mehr erfahren: https://garbagebot.eu",
"description": "Sie können Erinnerungen an die Müllabfuhr für Orte Ihrer Wahl erhalten.\n\nVerwenden Sie /help, um die Funktionsweise des Bots besser zu verstehen, oder verwenden Sie /setup, um Ihre Erinnerungen zu konfigurieren."
},
"formats": {

View File

@ -8,7 +8,7 @@
},
"bot": {
"name": "Garbage Reminder",
"about": "Never forget about garbage collection again. Source code: https://garbagebot.eu",
"about": "Never forget about garbage collection again. Learn more: https://garbagebot.eu",
"description": "You can receive reminders about garbage collection for locations of your choice.\n\nUse /help to better understand how the bot works or use /setup to configure your reminders."
},
"formats": {

View File

@ -8,7 +8,7 @@
},
"bot": {
"name": "Garbage Reminder 🇺🇦",
"about": "Більше ніколи не забувайте про вивезення сміття. Вихідний код: https://garbagebot.eu",
"about": "Більше ніколи не забувайте про вивезення сміття. Дізнатись більше: https://garbagebot.eu",
"description": "Ви можете отримувати нагадування про вивезення сміття для обраних вами місць.\n\nВикористовуйте /help, щоб краще зрозуміти, як працює бот, або /setup, щоб налаштувати нагадування."
},
"formats": {

View File

@ -8,7 +8,7 @@
},
"bot": {
"name": "Garbage Reminder 🇺🇦",
"about": "Більше ніколи не забувайте про вивезення сміття. Вихідний код: https://garbagebot.eu",
"about": "Більше ніколи не забувайте про вивезення сміття. Дізнатись більше: https://garbagebot.eu",
"description": "Ви можете отримувати нагадування про вивезення сміття для обраних вами місць.\n\nВикористовуйте /help, щоб краще зрозуміти, як працює бот, або /setup, щоб налаштувати нагадування."
},
"formats": {

View File

@ -4,6 +4,7 @@ from argparse import ArgumentParser
from os import getpid
from pathlib import Path
from aiohttp import ClientSession
from convopyro import Conversation
from libbot import sync
@ -41,7 +42,8 @@ def main():
exit()
client = PyroClient(
scheduler=scheduler, commands_source=sync.json_read(Path("commands.json"))
scheduler=scheduler,
commands_source=sync.json_read(Path("commands.json")),
)
Conversation(client)

View File

@ -13,7 +13,7 @@ async def command_toggle(app: PyroClient, message: Message):
await user.update_state(not user.enabled)
if user.enabled:
if not user.enabled:
await message.reply_text(
app._("toggle_disabled", "messages", locale=user.locale)
)

View File

@ -1,12 +1,12 @@
aiohttp~=3.9.5
aiohttp~=3.10.2
apscheduler~=3.10.4
async_pymongo==0.1.9
convopyro==0.5
mongodb-migrations==1.3.1
pytz>=2024.1
tgcrypto==1.2.5
ujson>=5.0.0
uvloop==0.19.0
uvloop==0.20.0
--extra-index-url https://git.end-play.xyz/api/packages/profitroll/pypi/simple
async_pymongo==0.1.4
libbot[speed,pyrogram]==3.2.2
libbot[speed,pyrogram]==3.2.3
pykeyboard==0.1.7