Rubka 2.11.13__py3-none-any.whl → 7.1.17__py3-none-any.whl
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.
- rubka/__init__.py +72 -3
- rubka/adaptorrubka/__init__.py +4 -0
- rubka/adaptorrubka/client/__init__.py +1 -0
- rubka/adaptorrubka/client/client.py +60 -0
- rubka/adaptorrubka/crypto/__init__.py +1 -0
- rubka/adaptorrubka/crypto/crypto.py +82 -0
- rubka/adaptorrubka/enums.py +36 -0
- rubka/adaptorrubka/exceptions.py +22 -0
- rubka/adaptorrubka/methods/__init__.py +1 -0
- rubka/adaptorrubka/methods/methods.py +90 -0
- rubka/adaptorrubka/network/__init__.py +3 -0
- rubka/adaptorrubka/network/helper.py +22 -0
- rubka/adaptorrubka/network/network.py +221 -0
- rubka/adaptorrubka/network/socket.py +31 -0
- rubka/adaptorrubka/sessions/__init__.py +1 -0
- rubka/adaptorrubka/sessions/sessions.py +72 -0
- rubka/adaptorrubka/types/__init__.py +1 -0
- rubka/adaptorrubka/types/socket/__init__.py +1 -0
- rubka/adaptorrubka/types/socket/message.py +187 -0
- rubka/adaptorrubka/utils/__init__.py +2 -0
- rubka/adaptorrubka/utils/configs.py +18 -0
- rubka/adaptorrubka/utils/utils.py +251 -0
- rubka/api.py +1450 -95
- rubka/asynco.py +2515 -0
- rubka/button.py +404 -0
- rubka/context.py +744 -34
- rubka/exceptions.py +35 -1
- rubka/filters.py +321 -0
- rubka/helpers.py +1461 -0
- rubka/keypad.py +255 -5
- rubka/metadata.py +117 -0
- rubka/rubino.py +1231 -0
- rubka/tv.py +145 -0
- rubka/update.py +1038 -0
- rubka-7.1.17.dist-info/METADATA +1048 -0
- rubka-7.1.17.dist-info/RECORD +45 -0
- rubka-7.1.17.dist-info/entry_points.txt +2 -0
- rubka-2.11.13.dist-info/METADATA +0 -315
- rubka-2.11.13.dist-info/RECORD +0 -15
- {rubka-2.11.13.dist-info → rubka-7.1.17.dist-info}/WHEEL +0 -0
- {rubka-2.11.13.dist-info → rubka-7.1.17.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
rubka/__init__.py,sha256=P6IBiORfp-GqKHe5LZ-5lldWyG7tnrUYUcAQDUgwXmY,1973
|
|
2
|
+
rubka/api.py,sha256=71B10uy2iU3gP6yHQltjyTkq2mgkzWuV1TsE2kgHOZg,68092
|
|
3
|
+
rubka/asynco.py,sha256=KRYnEyB6y49VwwC6Xp-42dPVukacCwnQs9tlSRlJU9w,120288
|
|
4
|
+
rubka/button.py,sha256=woSzZVd5MtTqOrP-YgkH5b0GS9y4DuKBsFSc9-KuLnk,13320
|
|
5
|
+
rubka/config.py,sha256=Bck59xkOiqioLv0GkQ1qPGnBXVctz1hKk6LT4h2EPx0,78
|
|
6
|
+
rubka/context.py,sha256=brl7WXe4nzpLpcaMiOLVMfOs8BFTU5z5Sw6AIecCtOA,42492
|
|
7
|
+
rubka/decorators.py,sha256=hGwUoE4q2ImrunJIGJ_kzGYYxQf1ueE0isadqraKEts,1157
|
|
8
|
+
rubka/exceptions.py,sha256=DDOGIHEMoliHNW5E7C_s38WZgqqMBv9812fcJGvj7TY,1173
|
|
9
|
+
rubka/filters.py,sha256=fQYgFKhXfq18pOzjkKc3BmOgoZqQKriid_SAQR5uVT4,13254
|
|
10
|
+
rubka/helpers.py,sha256=QvK5lg4QDmycImxJia4m8HDpfacYzbKKZiOk536mafc,65161
|
|
11
|
+
rubka/jobs.py,sha256=GvLMLsVhcSEzRTgkvnPISPEBN71suW2xXI0hUaUZPTo,378
|
|
12
|
+
rubka/keyboards.py,sha256=7nr-dT2bQJVQnQ6RMWPTSjML6EEk6dsBx-4d8pab8xk,488
|
|
13
|
+
rubka/keypad.py,sha256=yGsNt8W5HtUFBzVF1m_p7GySlu1hwIcSvXZ4BTdrlvg,9558
|
|
14
|
+
rubka/logger.py,sha256=J2I6NiK1z32lrAzC4H1Et6WPMBXxXGCVUsW4jgcAofs,289
|
|
15
|
+
rubka/metadata.py,sha256=RWle8mwWAcIFVAETHzRPD3vCwqPidB0ERsMatQY8h_w,4329
|
|
16
|
+
rubka/rubino.py,sha256=HOILsm2zOIRe9EW1hxhLinhjwE_TvFrOAxBsg9T_L5E,61701
|
|
17
|
+
rubka/tv.py,sha256=rBoyCadCH3I3YqQGrQYv_dLtTg1I63AzVf1orn-hbko,5724
|
|
18
|
+
rubka/update.py,sha256=brl7WXe4nzpLpcaMiOLVMfOs8BFTU5z5Sw6AIecCtOA,42492
|
|
19
|
+
rubka/utils.py,sha256=XUQUZxQt9J2f0X5hmAH_MH1kibTAfdT1T4AaBkBhBBs,148
|
|
20
|
+
rubka/adaptorrubka/__init__.py,sha256=6o2tCXnVeES7nx-LjnzsuMqjKcWIm9qwKficLE54s-U,83
|
|
21
|
+
rubka/adaptorrubka/enums.py,sha256=cyiakExmZi-QQpYuf_A93HQvfZVmyG_0uVuvTTNT5To,1053
|
|
22
|
+
rubka/adaptorrubka/exceptions.py,sha256=UOqfsDdevjByBENGoywDDU-aEa9jVu9-cqhe1Nk3H1c,696
|
|
23
|
+
rubka/adaptorrubka/client/__init__.py,sha256=_5xoxBvqik7-PeMx5hwvFygQoUHpV34lQIJj__e4LaA,26
|
|
24
|
+
rubka/adaptorrubka/client/client.py,sha256=qjvDiLQ10YuG9QM117IEaaMTIjTFU_2otCPCLlrD4rY,2144
|
|
25
|
+
rubka/adaptorrubka/crypto/__init__.py,sha256=sp7mAs_5E02thg6KKcDRBJlQFV94GVp6GUhtwQyC5uA,28
|
|
26
|
+
rubka/adaptorrubka/crypto/crypto.py,sha256=VVucnuRFzq0ifLpbcfhSkpxhCLnNp3fuYA7BmUja2gQ,2937
|
|
27
|
+
rubka/adaptorrubka/methods/__init__.py,sha256=LmkMe1KZw2_cI5vcJU2-yeTqKh0e0Q9-x0IXE4GAu5c,28
|
|
28
|
+
rubka/adaptorrubka/methods/methods.py,sha256=NNG-Yz2vQhCD5eAfg_HeRyItMTfJ6bDox-ofVFY4Bv4,3328
|
|
29
|
+
rubka/adaptorrubka/network/__init__.py,sha256=5xXuNp0ezvGWen1cAveCnZURwijbJE4PHPhi7W1TlDE,84
|
|
30
|
+
rubka/adaptorrubka/network/helper.py,sha256=Z93cO55mFPvwioCRrIJ_KMYLH9bQQUbAU9CnpsBg0qM,601
|
|
31
|
+
rubka/adaptorrubka/network/network.py,sha256=bvVcBQkj0MepSGxSJhLyJKL6uzeqg8qp93CtY0Z9HoY,8016
|
|
32
|
+
rubka/adaptorrubka/network/socket.py,sha256=MzUrQO63RgMWv-lq_ibjHSTylmA5Ky9oAL1REdwd4Uk,827
|
|
33
|
+
rubka/adaptorrubka/sessions/__init__.py,sha256=8C_ePDLehLR7i9sSQf8hNq2U6VutWj7uQcMLRPongB8,30
|
|
34
|
+
rubka/adaptorrubka/sessions/sessions.py,sha256=Jhv_qK6wO8PHiFZbe03Eu06Vb-rcpBa9pJyimfPdSuE,2789
|
|
35
|
+
rubka/adaptorrubka/types/__init__.py,sha256=1AgTiALztqwPKinMmblRhiJe9eL1ey8VkOW7WfbC2i8,27
|
|
36
|
+
rubka/adaptorrubka/types/socket/__init__.py,sha256=gYbUzbYeqszb3RIHtQu6P2jSEqgY8a8D1JjAioC15wM,28
|
|
37
|
+
rubka/adaptorrubka/types/socket/message.py,sha256=0WgLMZh4eow8Zn7AiSX4C3GZjQTkIgtk-nCwmPLTa8Y,6866
|
|
38
|
+
rubka/adaptorrubka/utils/__init__.py,sha256=OgCFkXdNFh379quNwIVOAWY2NP5cIOxU5gDRRALTk4o,54
|
|
39
|
+
rubka/adaptorrubka/utils/configs.py,sha256=nMUEOJh1NqDJsf9W9PurkN_DLYjO6kKPMm923i4Jj_A,492
|
|
40
|
+
rubka/adaptorrubka/utils/utils.py,sha256=5-LioLNYX_TIbQGDeT50j7Sg9nAWH2LJUUs-iEXpsUY,8816
|
|
41
|
+
rubka-7.1.17.dist-info/METADATA,sha256=AGwgmYuMwUYRTEVhvDfDKXk3qeA4Q3BYJbEEAoWMsg8,34673
|
|
42
|
+
rubka-7.1.17.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
43
|
+
rubka-7.1.17.dist-info/entry_points.txt,sha256=4aESuUmuUOALMUy7Kucv_Gb5YlqhsJmTmdXLlZU9sJ0,46
|
|
44
|
+
rubka-7.1.17.dist-info/top_level.txt,sha256=vy2A4lot11cRMdQS-F4HDCIXL3JK8RKfu7HMDkezJW4,6
|
|
45
|
+
rubka-7.1.17.dist-info/RECORD,,
|
rubka-2.11.13.dist-info/METADATA
DELETED
|
@@ -1,315 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: Rubka
|
|
3
|
-
Version: 2.11.13
|
|
4
|
-
Summary: A Python library for interacting with Rubika Bot API.
|
|
5
|
-
Home-page: https://github.com/Mahdy-Ahmadi/Rubka
|
|
6
|
-
Download-URL: https://github.com/Mahdy-Ahmadi/Rubka/archive/refs/tags/v0.1.0.tar.gz
|
|
7
|
-
Author: Mahdi Ahmadi
|
|
8
|
-
Author-email: mahdiahmadi.1208@gmail.com
|
|
9
|
-
Maintainer: Mahdi Ahmadi
|
|
10
|
-
Maintainer-email: mahdiahmadi.1208@gmail.com
|
|
11
|
-
Classifier: Programming Language :: Python :: 3
|
|
12
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
13
|
-
Classifier: Operating System :: OS Independent
|
|
14
|
-
Classifier: Topic :: Communications :: Chat
|
|
15
|
-
Classifier: Topic :: Software Development :: Libraries
|
|
16
|
-
Requires-Python: >=3.6
|
|
17
|
-
Description-Content-Type: text/markdown
|
|
18
|
-
Requires-Dist: requests
|
|
19
|
-
Dynamic: author
|
|
20
|
-
Dynamic: author-email
|
|
21
|
-
Dynamic: classifier
|
|
22
|
-
Dynamic: description
|
|
23
|
-
Dynamic: description-content-type
|
|
24
|
-
Dynamic: download-url
|
|
25
|
-
Dynamic: home-page
|
|
26
|
-
Dynamic: maintainer
|
|
27
|
-
Dynamic: maintainer-email
|
|
28
|
-
Dynamic: requires-dist
|
|
29
|
-
Dynamic: requires-python
|
|
30
|
-
Dynamic: summary
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
# rubka
|
|
34
|
-
|
|
35
|
-
A Python library for interacting with the Rubika Bot API using the Robot class.
|
|
36
|
-
|
|
37
|
-
## Overview
|
|
38
|
-
rubka is a powerful and easy-to-use Python SDK designed to simplify building bots for the Rubika platform.
|
|
39
|
-
It supports sending messages, editing, polls, locations, contacts, keyboards, and managing bot commands with a clean and modern interface.
|
|
40
|
-
|
|
41
|
-
## Installation
|
|
42
|
-
|
|
43
|
-
```bash
|
|
44
|
-
pip install rubka
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
Or install from source:
|
|
48
|
-
|
|
49
|
-
```bash
|
|
50
|
-
git clone https://github.com/Mahdy-Ahmadi/rubka.git
|
|
51
|
-
cd rubka
|
|
52
|
-
pip install .
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
## Quick Start
|
|
56
|
-
|
|
57
|
-
```python
|
|
58
|
-
from rubka import Robot, on_message
|
|
59
|
-
|
|
60
|
-
bot = Robot(token="YOUR_BOT_TOKEN")
|
|
61
|
-
|
|
62
|
-
@on_message
|
|
63
|
-
def handle_message(bot, chat_id, message_id, text, sender_id):
|
|
64
|
-
if text == "/start":
|
|
65
|
-
bot.send_message(chat_id, "Hello! Welcome to rubka.")
|
|
66
|
-
|
|
67
|
-
updates = bot.get_updates(limit=10)
|
|
68
|
-
for update in updates.get("updates", []):
|
|
69
|
-
handle_message(update, bot)
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
## API Reference
|
|
73
|
-
|
|
74
|
-
### Class: Robot
|
|
75
|
-
|
|
76
|
-
The main class to interact with Rubika Bot API.
|
|
77
|
-
|
|
78
|
-
#### Methods:
|
|
79
|
-
|
|
80
|
-
- **get_me()**
|
|
81
|
-
|
|
82
|
-
Retrieve information about the bot.
|
|
83
|
-
|
|
84
|
-
Returns: `dict` — Bot information object.
|
|
85
|
-
|
|
86
|
-
Example:
|
|
87
|
-
|
|
88
|
-
```python
|
|
89
|
-
info = bot.get_me()
|
|
90
|
-
print(info)
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
- **send_message(chat_id: str, text: str, chat_keypad: dict = None, inline_keypad: dict = None, disable_notification: bool = False, reply_to_message_id: str = None, chat_keypad_type: str = None)**
|
|
94
|
-
|
|
95
|
-
Send a message to a chat with optional keypads.
|
|
96
|
-
|
|
97
|
-
Parameters:
|
|
98
|
-
|
|
99
|
-
- `chat_id` — Chat identifier.
|
|
100
|
-
- `text` — Message text.
|
|
101
|
-
- `chat_keypad` — (Optional) Custom keypad attached to chat.
|
|
102
|
-
- `inline_keypad` — (Optional) Inline keypad attached to message.
|
|
103
|
-
- `disable_notification` — (Optional) Disable notification for the message (default False).
|
|
104
|
-
- `reply_to_message_id` — (Optional) Message ID to reply to.
|
|
105
|
-
- `chat_keypad_type` — (Optional) Type of keypad ("New" or "Removed").
|
|
106
|
-
|
|
107
|
-
Returns: `dict` — Response including the sent message ID.
|
|
108
|
-
|
|
109
|
-
Example:
|
|
110
|
-
|
|
111
|
-
```python
|
|
112
|
-
bot.send_message(
|
|
113
|
-
chat_id="12345",
|
|
114
|
-
text="Welcome!",
|
|
115
|
-
inline_keypad={
|
|
116
|
-
"rows": [
|
|
117
|
-
{
|
|
118
|
-
"buttons": [
|
|
119
|
-
{"id": "100", "type": "Simple", "button_text": "Add Account"}
|
|
120
|
-
]
|
|
121
|
-
}
|
|
122
|
-
]
|
|
123
|
-
}
|
|
124
|
-
)
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
- **send_poll(chat_id: str, question: str, options: list[str])**
|
|
128
|
-
|
|
129
|
-
Send a poll to a chat.
|
|
130
|
-
|
|
131
|
-
Parameters:
|
|
132
|
-
|
|
133
|
-
- `chat_id` — Chat identifier.
|
|
134
|
-
- `question` — Poll question text.
|
|
135
|
-
- `options` — List of poll options.
|
|
136
|
-
|
|
137
|
-
Returns: `dict` — Response with poll message ID.
|
|
138
|
-
|
|
139
|
-
Example:
|
|
140
|
-
|
|
141
|
-
```python
|
|
142
|
-
bot.send_poll(
|
|
143
|
-
chat_id="12345",
|
|
144
|
-
question="Do you like this bot?",
|
|
145
|
-
options=["Yes", "No"]
|
|
146
|
-
)
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
- **send_location(chat_id: str, latitude: str, longitude: str, disable_notification: bool = False, inline_keypad: dict = None, reply_to_message_id: str = None, chat_keypad_type: str = None)**
|
|
150
|
-
|
|
151
|
-
Send a location to a chat.
|
|
152
|
-
|
|
153
|
-
Parameters:
|
|
154
|
-
|
|
155
|
-
- `chat_id` — Chat identifier.
|
|
156
|
-
- `latitude` — Latitude coordinate.
|
|
157
|
-
- `longitude` — Longitude coordinate.
|
|
158
|
-
- `disable_notification` — (Optional) Disable notification.
|
|
159
|
-
- `inline_keypad` — (Optional) Inline keypad.
|
|
160
|
-
- `reply_to_message_id` — (Optional) Reply message ID.
|
|
161
|
-
- `chat_keypad_type` — (Optional) Keypad type.
|
|
162
|
-
|
|
163
|
-
Returns: `dict` — Response with message ID.
|
|
164
|
-
|
|
165
|
-
- **send_contact(chat_id: str, first_name: str, last_name: str, phone_number: str, chat_keypad: dict = None, disable_notification: bool = False, inline_keypad: dict = None, reply_to_message_id: str = None, chat_keypad_type: str = None)**
|
|
166
|
-
|
|
167
|
-
Send a contact to a chat.
|
|
168
|
-
|
|
169
|
-
Parameters:
|
|
170
|
-
|
|
171
|
-
- `chat_id` — Chat identifier.
|
|
172
|
-
- `first_name` — Contact's first name.
|
|
173
|
-
- `last_name` — Contact's last name.
|
|
174
|
-
- `phone_number` — Contact's phone number.
|
|
175
|
-
|
|
176
|
-
Additional optional keypad and notification parameters.
|
|
177
|
-
|
|
178
|
-
Returns: `dict` — Response with message ID.
|
|
179
|
-
|
|
180
|
-
- **get_chat(chat_id: str)**
|
|
181
|
-
|
|
182
|
-
Get information about a chat.
|
|
183
|
-
|
|
184
|
-
Parameters:
|
|
185
|
-
|
|
186
|
-
- `chat_id` — Chat identifier.
|
|
187
|
-
|
|
188
|
-
Returns: `dict` — Chat info object.
|
|
189
|
-
|
|
190
|
-
- **get_updates(offset_id: str = None, limit: int = None)**
|
|
191
|
-
|
|
192
|
-
Get recent updates/messages sent to the bot.
|
|
193
|
-
|
|
194
|
-
Parameters:
|
|
195
|
-
|
|
196
|
-
- `offset_id` — (Optional) Start offset for updates.
|
|
197
|
-
- `limit` — (Optional) Max number of updates to retrieve.
|
|
198
|
-
|
|
199
|
-
Returns: `dict` — Updates list.
|
|
200
|
-
|
|
201
|
-
- **forward_message(from_chat_id: str, message_id: str, to_chat_id: str, disable_notification: bool = False)**
|
|
202
|
-
|
|
203
|
-
Forward a message from one chat to another.
|
|
204
|
-
|
|
205
|
-
Parameters:
|
|
206
|
-
|
|
207
|
-
- `from_chat_id` — Source chat ID.
|
|
208
|
-
- `message_id` — Message ID to forward.
|
|
209
|
-
- `to_chat_id` — Target chat ID.
|
|
210
|
-
- `disable_notification` — (Optional) Disable notification.
|
|
211
|
-
|
|
212
|
-
Returns: `dict` — Response with new message ID.
|
|
213
|
-
|
|
214
|
-
- **edit_message_text(chat_id: str, message_id: str, text: str)**
|
|
215
|
-
|
|
216
|
-
Edit the text of a previously sent message.
|
|
217
|
-
|
|
218
|
-
Parameters:
|
|
219
|
-
|
|
220
|
-
- `chat_id` — Chat ID.
|
|
221
|
-
- `message_id` — Message ID to edit.
|
|
222
|
-
- `text` — New text.
|
|
223
|
-
|
|
224
|
-
Returns: `dict` — Response status.
|
|
225
|
-
|
|
226
|
-
- **edit_inline_keypad(chat_id: str, message_id: str, inline_keypad: dict)**
|
|
227
|
-
|
|
228
|
-
Edit the inline keypad of a message.
|
|
229
|
-
|
|
230
|
-
Parameters:
|
|
231
|
-
|
|
232
|
-
- `chat_id` — Chat ID.
|
|
233
|
-
- `message_id` — Message ID.
|
|
234
|
-
- `inline_keypad` — New inline keypad structure.
|
|
235
|
-
|
|
236
|
-
Returns: `dict` — Response status.
|
|
237
|
-
|
|
238
|
-
- **delete_message(chat_id: str, message_id: str)**
|
|
239
|
-
|
|
240
|
-
Delete a message in a chat.
|
|
241
|
-
|
|
242
|
-
Parameters:
|
|
243
|
-
|
|
244
|
-
- `chat_id` — Chat ID.
|
|
245
|
-
- `message_id` — Message ID.
|
|
246
|
-
|
|
247
|
-
Returns: `dict` — Response status.
|
|
248
|
-
|
|
249
|
-
- **set_commands(bot_commands: list[dict])**
|
|
250
|
-
|
|
251
|
-
Set the list of bot commands for the bot menu.
|
|
252
|
-
|
|
253
|
-
Parameters:
|
|
254
|
-
|
|
255
|
-
- `bot_commands` — List of commands as dictionaries with "command" and "description".
|
|
256
|
-
|
|
257
|
-
Returns: `dict` — Response status.
|
|
258
|
-
|
|
259
|
-
- **update_bot_endpoint(url: str, type: str)**
|
|
260
|
-
|
|
261
|
-
Update the bot's webhook or API endpoint URL.
|
|
262
|
-
|
|
263
|
-
Parameters:
|
|
264
|
-
|
|
265
|
-
- `url` — New URL.
|
|
266
|
-
- `type` — Type of update endpoint (e.g. "GetSelectionItem").
|
|
267
|
-
|
|
268
|
-
Returns: `dict` — Response status.
|
|
269
|
-
|
|
270
|
-
- **remove_keypad(chat_id: str)**
|
|
271
|
-
|
|
272
|
-
Remove keypad from a chat.
|
|
273
|
-
|
|
274
|
-
Parameters:
|
|
275
|
-
|
|
276
|
-
- `chat_id` — Chat ID.
|
|
277
|
-
|
|
278
|
-
Returns: `dict` — Response status.
|
|
279
|
-
|
|
280
|
-
- **edit_chat_keypad(chat_id: str, chat_keypad: dict)**
|
|
281
|
-
|
|
282
|
-
Edit or set a new keypad for a chat.
|
|
283
|
-
|
|
284
|
-
Parameters:
|
|
285
|
-
|
|
286
|
-
- `chat_id` — Chat ID.
|
|
287
|
-
- `chat_keypad` — Keypad object.
|
|
288
|
-
|
|
289
|
-
Returns: `dict` — Response status.
|
|
290
|
-
|
|
291
|
-
## Decorators
|
|
292
|
-
|
|
293
|
-
- **@on_message**
|
|
294
|
-
|
|
295
|
-
Decorator for defining a message handler function.
|
|
296
|
-
|
|
297
|
-
Automatically parses incoming updates and calls your handler with parameters: `bot, chat_id, message_id, text, sender_id`.
|
|
298
|
-
|
|
299
|
-
Usage:
|
|
300
|
-
|
|
301
|
-
```python
|
|
302
|
-
from rubka import on_message
|
|
303
|
-
|
|
304
|
-
@on_message
|
|
305
|
-
def my_handler(bot, chat_id, message_id, text, sender_id):
|
|
306
|
-
# your code here
|
|
307
|
-
```
|
|
308
|
-
|
|
309
|
-
## Contributing
|
|
310
|
-
|
|
311
|
-
Contributions and feedback are welcome! Please submit issues or pull requests on GitHub.
|
|
312
|
-
|
|
313
|
-
## License
|
|
314
|
-
|
|
315
|
-
This project is licensed under the MIT License. See the LICENSE file for details.
|
rubka-2.11.13.dist-info/RECORD
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
rubka/__init__.py,sha256=3f4H6Uj1ylrfBYlTHmTvzZSvaPJsdNhCocyX3Bbvuv0,254
|
|
2
|
-
rubka/api.py,sha256=bF3lyXS7D3wxjdgxKkiiplfWY3fNGo6ORv4WQhdkAgU,13399
|
|
3
|
-
rubka/config.py,sha256=Bck59xkOiqioLv0GkQ1qPGnBXVctz1hKk6LT4h2EPx0,78
|
|
4
|
-
rubka/context.py,sha256=5OMFjcnMWvkn3ZigRgJrjMiFt_tYgMwzHsTS6qXMGj8,12843
|
|
5
|
-
rubka/decorators.py,sha256=hGwUoE4q2ImrunJIGJ_kzGYYxQf1ueE0isadqraKEts,1157
|
|
6
|
-
rubka/exceptions.py,sha256=tujZt1XrhWaw-lmdeVadVceUptpw4XzNgE44sAAY0gs,90
|
|
7
|
-
rubka/jobs.py,sha256=GvLMLsVhcSEzRTgkvnPISPEBN71suW2xXI0hUaUZPTo,378
|
|
8
|
-
rubka/keyboards.py,sha256=7nr-dT2bQJVQnQ6RMWPTSjML6EEk6dsBx-4d8pab8xk,488
|
|
9
|
-
rubka/keypad.py,sha256=FHe0xVYhOXMdHZhbGKHsRxtsRB27qZv0DvNfb8NkNwI,1545
|
|
10
|
-
rubka/logger.py,sha256=J2I6NiK1z32lrAzC4H1Et6WPMBXxXGCVUsW4jgcAofs,289
|
|
11
|
-
rubka/utils.py,sha256=XUQUZxQt9J2f0X5hmAH_MH1kibTAfdT1T4AaBkBhBBs,148
|
|
12
|
-
rubka-2.11.13.dist-info/METADATA,sha256=Iz2JhjVfJBk5pOq1eXG4GcwQsT7pUpG24JzU-GSdkD0,8170
|
|
13
|
-
rubka-2.11.13.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
14
|
-
rubka-2.11.13.dist-info/top_level.txt,sha256=vy2A4lot11cRMdQS-F4HDCIXL3JK8RKfu7HMDkezJW4,6
|
|
15
|
-
rubka-2.11.13.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|