zalobot-python 0.1.2__tar.gz → 0.1.3__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: zalobot-python
3
- Version: 0.1.2
3
+ Version: 0.1.3
4
4
  Summary: Python SDK for the Zalo Bot API
5
5
  Author: NovaH00
6
6
  Author-email: NovaH00 <trantay2006super@gmail.com>
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "zalobot-python"
3
- version = "0.1.2"
3
+ version = "0.1.3"
4
4
  description = "Python SDK for the Zalo Bot API"
5
5
  readme = "README.md"
6
6
  authors = [
@@ -34,14 +34,14 @@ async def fetch[T](
34
34
 
35
35
  return ErrorResponse(**response_json)
36
36
 
37
- class WebhookHandler(Protocol):
37
+ class AsyncWebhookHandler(Protocol):
38
38
  async def __call__(self, update_event: Event, bot: ZaloBot) -> None: ...
39
39
 
40
40
  class ZaloBot:
41
41
  def __init__(self, BOT_TOKEN: str):
42
42
  self._BOT_TOKEN: str = BOT_TOKEN
43
43
  self._base_url: str = f"{ZaloAPIConfig.BASE_URL}/bot{BOT_TOKEN}"
44
- self._webhook_handlers: list[WebhookHandler] = []
44
+ self._webhook_handlers: list[AsyncWebhookHandler] = []
45
45
 
46
46
  async def getMe(self) -> BotInfo:
47
47
  url = f"{self._base_url}/getMe"
@@ -122,7 +122,7 @@ class ZaloBot:
122
122
 
123
123
  return res.result
124
124
 
125
- def on_webhook_update(self, handler: WebhookHandler) -> None:
125
+ def on_webhook_update(self, handler: AsyncWebhookHandler) -> None:
126
126
  """Registers a handler to handle on webhook event update"""
127
127
  self._webhook_handlers.append(handler)
128
128
 
File without changes