RubigramClient 1.5.8__tar.gz → 1.6.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of RubigramClient might be problematic. Click here for more details.
- {rubigramclient-1.5.8 → rubigramclient-1.6.0}/PKG-INFO +1 -1
- {rubigramclient-1.5.8 → rubigramclient-1.6.0}/RubigramClient.egg-info/PKG-INFO +1 -1
- {rubigramclient-1.5.8 → rubigramclient-1.6.0}/pyproject.toml +1 -1
- {rubigramclient-1.5.8 → rubigramclient-1.6.0}/rubigram/client.py +6 -6
- {rubigramclient-1.5.8 → rubigramclient-1.6.0}/rubigram/method.py +4 -4
- {rubigramclient-1.5.8 → rubigramclient-1.6.0}/LICENSE +0 -0
- {rubigramclient-1.5.8 → rubigramclient-1.6.0}/README.md +0 -0
- {rubigramclient-1.5.8 → rubigramclient-1.6.0}/RubigramClient.egg-info/SOURCES.txt +0 -0
- {rubigramclient-1.5.8 → rubigramclient-1.6.0}/RubigramClient.egg-info/dependency_links.txt +0 -0
- {rubigramclient-1.5.8 → rubigramclient-1.6.0}/RubigramClient.egg-info/requires.txt +0 -0
- {rubigramclient-1.5.8 → rubigramclient-1.6.0}/RubigramClient.egg-info/top_level.txt +0 -0
- {rubigramclient-1.5.8 → rubigramclient-1.6.0}/rubigram/__init__.py +0 -0
- {rubigramclient-1.5.8 → rubigramclient-1.6.0}/rubigram/filters.py +0 -0
- {rubigramclient-1.5.8 → rubigramclient-1.6.0}/rubigram/models.py +0 -0
- {rubigramclient-1.5.8 → rubigramclient-1.6.0}/rubigram/network.py +0 -0
- {rubigramclient-1.5.8 → rubigramclient-1.6.0}/rubigram/state.py +0 -0
- {rubigramclient-1.5.8 → rubigramclient-1.6.0}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: RubigramClient
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.6.0
|
|
4
4
|
Summary: A simple and flexible Python library for building advanced Rubika bots with powerful message handling, inline buttons, and custom filters.
|
|
5
5
|
Author-email: Javad RZ <Javad.Py1385@gmail.com>
|
|
6
6
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: RubigramClient
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.6.0
|
|
4
4
|
Summary: A simple and flexible Python library for building advanced Rubika bots with powerful message handling, inline buttons, and custom filters.
|
|
5
5
|
Author-email: Javad RZ <Javad.Py1385@gmail.com>
|
|
6
6
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "RubigramClient"
|
|
3
|
-
version = "1.
|
|
3
|
+
version = "1.6.0"
|
|
4
4
|
description = "A simple and flexible Python library for building advanced Rubika bots with powerful message handling, inline buttons, and custom filters."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.7"
|
|
@@ -7,7 +7,6 @@ from datetime import datetime
|
|
|
7
7
|
from aiohttp import web
|
|
8
8
|
import asyncio
|
|
9
9
|
|
|
10
|
-
|
|
11
10
|
class Client(Method):
|
|
12
11
|
def __init__(
|
|
13
12
|
self,
|
|
@@ -63,9 +62,7 @@ class Client(Method):
|
|
|
63
62
|
|
|
64
63
|
async def set_endpoints(self):
|
|
65
64
|
endpoint_type = ["ReceiveUpdate", "ReceiveInlineMessage"]
|
|
66
|
-
|
|
67
|
-
for i in endpoint_type:
|
|
68
|
-
await self.update_bot_endpoint(f"{self.endpoint}/{i}", i)
|
|
65
|
+
for i in endpoint_type: await self.update_bot_endpoint(f"{self.endpoint}/{i}", i)
|
|
69
66
|
|
|
70
67
|
async def on_startup(self, app):
|
|
71
68
|
await self.set_endpoints()
|
|
@@ -105,11 +102,14 @@ class Client(Method):
|
|
|
105
102
|
|
|
106
103
|
def run(self):
|
|
107
104
|
if self.endpoint:
|
|
108
|
-
app = web.Application()
|
|
105
|
+
app = web.Application()
|
|
106
|
+
app.on_startup(self.on_startup)
|
|
107
|
+
app.on_cleanup(self.on_cleanup)
|
|
109
108
|
app.router.add_post("/ReceiveUpdate", self.create_request_handler())
|
|
110
109
|
app.router.add_post("/ReceiveInlineMessage", self.create_request_handler())
|
|
111
110
|
web.run_app(app, host=self.host, port=self.port)
|
|
112
111
|
else:
|
|
113
112
|
try:
|
|
114
113
|
asyncio.run(self.runner())
|
|
115
|
-
except:
|
|
114
|
+
except Exception as error:
|
|
115
|
+
print(f"ERROR : {error}")
|
|
@@ -37,11 +37,11 @@ class Method(Network):
|
|
|
37
37
|
async def remove_chat_keypad(self, chat_id: str):
|
|
38
38
|
await self.request("editChatKeypad", {"chat_id": chat_id, "chat_keypad_type": "Remove"})
|
|
39
39
|
|
|
40
|
-
async def edit_chat_keypad(self, chat_id: str, chat_keypad):
|
|
41
|
-
await self.request("editChatKeypad", {"chat_id": chat_id, "chat_keypad_type": "New", "chat_keypad": chat_keypad})
|
|
40
|
+
async def edit_chat_keypad(self, chat_id: str, chat_keypad: Keypad):
|
|
41
|
+
await self.request("editChatKeypad", {"chat_id": chat_id, "chat_keypad_type": "New", "chat_keypad": chat_keypad.to_dict()})
|
|
42
42
|
|
|
43
|
-
async def edit_message_keypad(self, chat_id: str, message_id: str, inline_keypad):
|
|
44
|
-
await self.request("editMessageKeypad", {"chat_id": chat_id, "message_id": message_id, "inline_keypad": inline_keypad})
|
|
43
|
+
async def edit_message_keypad(self, chat_id: str, message_id: str, inline_keypad: Keypad):
|
|
44
|
+
await self.request("editMessageKeypad", {"chat_id": chat_id, "message_id": message_id, "inline_keypad": inline_keypad.to_dict()})
|
|
45
45
|
|
|
46
46
|
async def edit_message_text(self, chat_id: str, message_id: str, text: str):
|
|
47
47
|
await self.request("editMessageText", {"chat_id": chat_id, "message_id": message_id, "text": text})
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|