RubigramClient 1.3.9__py3-none-any.whl → 1.4.1__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.
Potentially problematic release.
This version of RubigramClient might be problematic. Click here for more details.
- rubigram/__init__.py +4 -3
- rubigram/client.py +58 -38
- rubigram/filters.py +46 -6
- rubigram/method.py +188 -41
- rubigram/network.py +53 -25
- rubigram/state.py +30 -0
- rubigram/types.py +322 -332
- rubigramclient-1.4.1.dist-info/METADATA +70 -0
- rubigramclient-1.4.1.dist-info/RECORD +12 -0
- rubigramclient-1.3.9.dist-info/METADATA +0 -35
- rubigramclient-1.3.9.dist-info/RECORD +0 -11
- {rubigramclient-1.3.9.dist-info → rubigramclient-1.4.1.dist-info}/WHEEL +0 -0
- {rubigramclient-1.3.9.dist-info → rubigramclient-1.4.1.dist-info}/licenses/LICENSE +0 -0
- {rubigramclient-1.3.9.dist-info → rubigramclient-1.4.1.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: RubigramClient
|
|
3
|
+
Version: 1.4.1
|
|
4
|
+
Summary: A simple and flexible Python library for building advanced Rubika bots with powerful message handling, inline buttons, and custom filters.
|
|
5
|
+
Author-email: Javad RZ <Javad.Py1385@gmail.com>
|
|
6
|
+
Classifier: Programming Language :: Python :: 3
|
|
7
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
8
|
+
Classifier: Operating System :: OS Independent
|
|
9
|
+
Requires-Python: >=3.7
|
|
10
|
+
Description-Content-Type: text/markdown
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Requires-Dist: aiohttp
|
|
13
|
+
Requires-Dist: aiofiles
|
|
14
|
+
Dynamic: license-file
|
|
15
|
+
|
|
16
|
+
# Rubigram
|
|
17
|
+
A lightweight Python library to build Rubika bots easily.
|
|
18
|
+
|
|
19
|
+
## Installation
|
|
20
|
+
```bash
|
|
21
|
+
pip install RubigramClient
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Send Message
|
|
25
|
+
```python
|
|
26
|
+
from rubigram import Client, filters
|
|
27
|
+
from rubigram.types import Update
|
|
28
|
+
|
|
29
|
+
bot = Client("your_bot_token", "you_endpoint_url")
|
|
30
|
+
|
|
31
|
+
@bot.on_message(filters.command("start"))
|
|
32
|
+
async def start_handler(client, message: Update):
|
|
33
|
+
await message.reply("Hi, WELCOME TO RUBIGRAM")
|
|
34
|
+
|
|
35
|
+
bot.run()
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Send Message & Get receiveInlineMessage
|
|
39
|
+
```python
|
|
40
|
+
from rubigram import Client, filters
|
|
41
|
+
from rubigram.types import Update, Button, Keypad, KeypadRow, InlineMessage
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
bot = Client(token="bot_token", endpoint="endpoint_url")
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
@bot.on_message(filters.command("start"))
|
|
48
|
+
async def start(_, message: Update):
|
|
49
|
+
inline = Keypad(
|
|
50
|
+
rows=[
|
|
51
|
+
KeypadRow(
|
|
52
|
+
buttons=[
|
|
53
|
+
Button("1", "Simple", "Button 1"),
|
|
54
|
+
Button("2", "Simple", "Button 2")
|
|
55
|
+
]
|
|
56
|
+
)
|
|
57
|
+
]
|
|
58
|
+
)
|
|
59
|
+
await bot.send_message(message.chat_id, "Hi", inline_keypad=inline)
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
@bot.on_inline_message(filters.button(["1", "2"]))
|
|
63
|
+
async def button(_, message: InlineMessage):
|
|
64
|
+
if message.aux_data.button_id == "1":
|
|
65
|
+
await bot.send_message(message.chat_id, "You Click Button 1")
|
|
66
|
+
elif message.aux_data.button_id == "2":
|
|
67
|
+
await bot.send_message(message.chat_id, "You Click Button 2")
|
|
68
|
+
|
|
69
|
+
bot.run()
|
|
70
|
+
```
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
rubigram/__init__.py,sha256=WotLkwsGnUkQC6XhJRtI_QNtUfOboG5k4VVcqwp_zFI,128
|
|
2
|
+
rubigram/client.py,sha256=3bug_ezjMmhrPt3CmjOwEELbpFzNsRvXZZPQE7SJf0w,3557
|
|
3
|
+
rubigram/filters.py,sha256=lB75_08wCz3iQqiV4QXm-dUomf2QqRG7q3b1PL5JDUQ,5174
|
|
4
|
+
rubigram/method.py,sha256=AcvVyx1H0ADHHu6mfb4UW2auSVkeq9VWLE584RIXn1w,14748
|
|
5
|
+
rubigram/network.py,sha256=B5y_n7CC7wdMkzNqKpUG9cC7Cq86R0QJCwcScExluvM,2299
|
|
6
|
+
rubigram/state.py,sha256=jz9vNZyoxnMJM4juHeFZGc-AEa5npPWLSmp6_wBFfOY,954
|
|
7
|
+
rubigram/types.py,sha256=KOoexWaeaElShNM4Pov6JJD9It704YJ_7-ZiSYNcIrE,14373
|
|
8
|
+
rubigramclient-1.4.1.dist-info/licenses/LICENSE,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
|
+
rubigramclient-1.4.1.dist-info/METADATA,sha256=OsGqyYJg6pExZ9U9eGAntYMFmociYN25LFqF8qORD3Q,2035
|
|
10
|
+
rubigramclient-1.4.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
11
|
+
rubigramclient-1.4.1.dist-info/top_level.txt,sha256=Mhg5HfkL6rLec5sI4ClGmwoqYUANAZUz8sVa1sT_cas,9
|
|
12
|
+
rubigramclient-1.4.1.dist-info/RECORD,,
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: RubigramClient
|
|
3
|
-
Version: 1.3.9
|
|
4
|
-
Summary: A simple and flexible Python library for building advanced Rubika bots with powerful message handling, inline buttons, and custom filters.
|
|
5
|
-
Author-email: Javad RZ <Javad.Py1385@gmail.com>
|
|
6
|
-
Classifier: Programming Language :: Python :: 3
|
|
7
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
8
|
-
Classifier: Operating System :: OS Independent
|
|
9
|
-
Requires-Python: >=3.7
|
|
10
|
-
Description-Content-Type: text/markdown
|
|
11
|
-
License-File: LICENSE
|
|
12
|
-
Requires-Dist: aiohttp
|
|
13
|
-
Requires-Dist: aiofiles
|
|
14
|
-
Dynamic: license-file
|
|
15
|
-
|
|
16
|
-
# Rubigram
|
|
17
|
-
A lightweight Python library to build Rubika bots easily.
|
|
18
|
-
|
|
19
|
-
## Installation
|
|
20
|
-
```bash
|
|
21
|
-
pip install RubigramClient
|
|
22
|
-
```
|
|
23
|
-
## Example
|
|
24
|
-
```python
|
|
25
|
-
from rubigram import Client, filters
|
|
26
|
-
from rubigram.types import Update
|
|
27
|
-
|
|
28
|
-
bot = Client("your_bot_token", "you_endpoint_url")
|
|
29
|
-
|
|
30
|
-
@bot.on_message(filters.command("start"))
|
|
31
|
-
async def start_handler(client, message: Update):
|
|
32
|
-
await message.reply("Hi, WELCOME TO RUBIGRAM")
|
|
33
|
-
|
|
34
|
-
bot.run()
|
|
35
|
-
```
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
rubigram/__init__.py,sha256=4JZ6q8ukflz_izRmJNYcndcKZFCsyJdYoYVoAPwN5V0,107
|
|
2
|
-
rubigram/client.py,sha256=7XKqygP1v41yfJ7txTcLLBlOqB8B7Ovqfjo3La373FI,2641
|
|
3
|
-
rubigram/filters.py,sha256=ZOP_3Yum41miESITTFCbWI7XElfmKPHqud2mxTo7NdQ,3759
|
|
4
|
-
rubigram/method.py,sha256=nm2qfzkanpzDo3yusIXmjYgCYmLzV6nVOyaxPDDqqz4,9074
|
|
5
|
-
rubigram/network.py,sha256=K7vvGikXStvUBqHX2gogy3hJ1eQjLAJ7kdwLbfFuZIg,1399
|
|
6
|
-
rubigram/types.py,sha256=evelh8GGttOHFQjiwXOzwXYFwLXKJSHit60T0T-9VIE,17035
|
|
7
|
-
rubigramclient-1.3.9.dist-info/licenses/LICENSE,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
|
-
rubigramclient-1.3.9.dist-info/METADATA,sha256=Qpp5phDEIUsgO7_1-7JCgVffmACSH7SkdPzgAc_4Nb8,1022
|
|
9
|
-
rubigramclient-1.3.9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
10
|
-
rubigramclient-1.3.9.dist-info/top_level.txt,sha256=Mhg5HfkL6rLec5sI4ClGmwoqYUANAZUz8sVa1sT_cas,9
|
|
11
|
-
rubigramclient-1.3.9.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|