RubigramClient 1.5.8__tar.gz → 1.5.9__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.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: RubigramClient
3
- Version: 1.5.8
3
+ Version: 1.5.9
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.5.8
3
+ Version: 1.5.9
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.5.8"
3
+ version = "1.5.9"
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
- if self.endpoint:
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:pass
114
+ except Exception as error:
115
+ print(f"ERROR : {error}")
File without changes
File without changes
File without changes