RubigramClient 1.5.4__py3-none-any.whl → 1.5.5__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/method.py CHANGED
@@ -195,7 +195,7 @@ class Method(Network):
195
195
  chat_id: str,
196
196
  file: str,
197
197
  file_name: str,
198
- text: str = None,
198
+ caption: str = None,
199
199
  type: Literal["File", "Image", "Voice", "Music", "Gif", "Video"] = "File",
200
200
  chat_keypad: Keypad = None,
201
201
  inline_keypad: Keypad = None,
@@ -207,7 +207,7 @@ class Method(Network):
207
207
  data = {
208
208
  "chat_id": chat_id,
209
209
  "file_id": file_id,
210
- "text": text,
210
+ "text": caption,
211
211
  "chat_keypad": chat_keypad.to_dict() if chat_keypad else None,
212
212
  "inline_keypad": inline_keypad.to_dict() if inline_keypad else None,
213
213
  "disable_notification": disable_notification,
@@ -218,20 +218,20 @@ class Method(Network):
218
218
  response = await self.request("sendFile", data)
219
219
  return MessageId.from_dict(response)
220
220
 
221
- async def send_document(self, chat_id: str, document: str, name: str, **kwargs):
222
- return await self.send_file(chat_id, document, name, "File", **kwargs)
221
+ async def send_document(self, chat_id: str, document: str, name: str, caption: str = None, **kwargs):
222
+ return await self.send_file(chat_id, document, name, caption, "File", **kwargs)
223
223
 
224
- async def send_photo(self, chat_id: str, photo: str, name: str, **kwargs):
225
- return await self.send_file(chat_id, photo, name, "Image", **kwargs)
224
+ async def send_photo(self, chat_id: str, photo: str, name: str, caption: str = None, **kwargs):
225
+ return await self.send_file(chat_id, photo, name, caption, "Image", **kwargs)
226
226
 
227
- async def send_video(self, chat_id: str, video: str, name: str, **kwargs):
228
- return await self.send_file(chat_id, video, name, "Video", **kwargs)
227
+ async def send_video(self, chat_id: str, video: str, name: str, caption: str = None, **kwargs):
228
+ return await self.send_file(chat_id, video, name, caption, "Video", **kwargs)
229
229
 
230
- async def send_gif(self, chat_id: str, gif: str, name: str, **kwargs):
231
- return await self.send_file(chat_id, gif, name, "Gif", **kwargs)
230
+ async def send_gif(self, chat_id: str, gif: str, name: str, caption: str = None, **kwargs):
231
+ return await self.send_file(chat_id, gif, name, caption, "Gif", **kwargs)
232
232
 
233
- async def send_music(self, chat_id: str, music: str, name: str, **kwargs):
234
- return await self.send_file(chat_id, music, name, "Music", **kwargs)
233
+ async def send_music(self, chat_id: str, music: str, name: str, caption: str = None, **kwargs):
234
+ return await self.send_file(chat_id, music, name, caption, "Music", **kwargs)
235
235
 
236
- async def send_voice(self, chat_id: str, voice: str, name: str, **kwargs):
237
- return await self.send_file(chat_id, voice, name, "Voice", **kwargs)
236
+ async def send_voice(self, chat_id: str, voice: str, name: str, caption: str = None, **kwargs):
237
+ return await self.send_file(chat_id, voice, name, caption, "Voice", **kwargs)
rubigram/models.py CHANGED
@@ -386,8 +386,7 @@ class MessageId(Dict):
386
386
  @dataclass
387
387
  class Update(Dict):
388
388
  client: Optional["rubigram.Client"] = None
389
- type: Optional[Literal["NewMessage", "UpdatedMessage", "RemovedMessage",
390
- "StartedBot", "StoppedBot", "UpdatedPayment"]] = None
389
+ type: Optional[Literal["NewMessage", "UpdatedMessage", "RemovedMessage", "StartedBot", "StoppedBot", "UpdatedPayment"]] = None
391
390
  chat_id: Optional[str] = None
392
391
  removed_message_id: Optional[str] = None
393
392
  new_message: Optional[Message] = None
@@ -417,32 +416,32 @@ class Update(Dict):
417
416
  self,
418
417
  file: str,
419
418
  file_name: str,
420
- text: str = None,
419
+ caption: str = None,
421
420
  type: Literal["File", "Image", "Voice", "Music", "Gif", "Video"] = "File",
422
421
  chat_keypad: Keypad = None,
423
422
  inline_keypad: Keypad = None,
424
423
  chat_keypad_type: Literal["New", "Remove"] = None,
425
424
  disable_notification: bool = False,
426
425
  ) -> "MessageId":
427
- return await self.client.send_file(self.chat_id, file, file_name, text, type, chat_keypad, inline_keypad, chat_keypad_type, disable_notification, self.new_message.message_id)
426
+ return await self.client.send_file(self.chat_id, file, file_name, caption, type, chat_keypad, inline_keypad, chat_keypad_type, disable_notification, self.new_message.message_id)
428
427
 
429
- async def reply_document(self, document: str, name: str, **kwargs) -> "MessageId":
430
- return await self.reply_file(document, name, "File", **kwargs)
428
+ async def reply_document(self, document: str, name: str, caption: Optional[str] = None, **kwargs) -> "MessageId":
429
+ return await self.reply_file(document, name, caption, "File", **kwargs)
431
430
 
432
- async def reply_photo(self, photo: str, name: str, **kwargs) -> "MessageId":
433
- return await self.reply_file(photo, name, "Image", **kwargs)
431
+ async def reply_photo(self, photo: str, name: str, caption: Optional[str] = None, **kwargs) -> "MessageId":
432
+ return await self.reply_file(photo, name, caption, "Image", **kwargs)
434
433
 
435
- async def reply_video(self, video: str, name: str, **kwargs) -> "MessageId":
436
- return await self.reply_file(video, name, "Video", **kwargs)
434
+ async def reply_video(self, video: str, name: str, caption: Optional[str] = None, **kwargs) -> "MessageId":
435
+ return await self.reply_file(video, name, caption, "Video", **kwargs)
437
436
 
438
- async def reply_gif(self, gif: str, name: str, **kwargs) -> "MessageId":
439
- return await self.reply_file(gif, name, "Gif", **kwargs)
437
+ async def reply_gif(self, gif: str, name: str, caption: Optional[str] = None, **kwargs) -> "MessageId":
438
+ return await self.reply_file(gif, name, caption, "Gif", **kwargs)
440
439
 
441
- async def reply_music(self, music: str, name: str, **kwargs) -> "MessageId":
442
- return await self.reply_file(music, name, "Music", **kwargs)
440
+ async def reply_music(self, music: str, name: str, caption: Optional[str] = None, **kwargs) -> "MessageId":
441
+ return await self.reply_file(music, name, caption, "Music", **kwargs)
443
442
 
444
- async def reply_voice(self, voice: str, name: str, **kwargs) -> "MessageId":
445
- return await self.reply_file(voice, name, "Voice", **kwargs)
443
+ async def reply_voice(self, voice: str, name: str, caption: Optional[str] = None, **kwargs) -> "MessageId":
444
+ return await self.reply_file(voice, name, caption, "Voice", **kwargs)
446
445
 
447
446
 
448
447
  @dataclass
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: RubigramClient
3
- Version: 1.5.4
3
+ Version: 1.5.5
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
@@ -0,0 +1,12 @@
1
+ rubigram/__init__.py,sha256=IWNCN7oDaIBzaP54cGiA-4Sa31ehGBlqj0SuqhNQVgU,162
2
+ rubigram/client.py,sha256=GDdlGzCeSwBAzEP3Truat1g2il5l3nPWbmFw2hRhYoc,6511
3
+ rubigram/filters.py,sha256=EyrcKbEIwqDwf18lucusUoZYP0KIkaKkZc7PnaA0GcU,6218
4
+ rubigram/method.py,sha256=PUP9DTX6XpWVbersiLv12GdlwOFaXzrgx582nJd4i_I,10613
5
+ rubigram/models.py,sha256=42WK68VPKqgKCy14jrRyoP_XRsZ-04S5rUbdpO_UfaQ,13831
6
+ rubigram/network.py,sha256=ErrGwtKpMHN1Dq4IvPHSrMOcDN-TFjUk1CfU-2EuPAY,2364
7
+ rubigram/state.py,sha256=oRk5xXuO4k-cK0qRI2Rz2mdoivJkANlo20zQAkdqFSY,4081
8
+ rubigramclient-1.5.5.dist-info/licenses/LICENSE,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
+ rubigramclient-1.5.5.dist-info/METADATA,sha256=Abido_4uhjv1iK3kIoUv49ulhGE8DmKfgzfRPoVcED8,2320
10
+ rubigramclient-1.5.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
11
+ rubigramclient-1.5.5.dist-info/top_level.txt,sha256=Mhg5HfkL6rLec5sI4ClGmwoqYUANAZUz8sVa1sT_cas,9
12
+ rubigramclient-1.5.5.dist-info/RECORD,,
@@ -1,12 +0,0 @@
1
- rubigram/__init__.py,sha256=IWNCN7oDaIBzaP54cGiA-4Sa31ehGBlqj0SuqhNQVgU,162
2
- rubigram/client.py,sha256=GDdlGzCeSwBAzEP3Truat1g2il5l3nPWbmFw2hRhYoc,6511
3
- rubigram/filters.py,sha256=EyrcKbEIwqDwf18lucusUoZYP0KIkaKkZc7PnaA0GcU,6218
4
- rubigram/method.py,sha256=B9uDuczkMyO0Zi_N54ZEPzO7btqbOXweqdn1Zgxl-lc,10427
5
- rubigram/models.py,sha256=hIr0UWaojdLO-2Hb-yW1f1OpTRreFJPwQ0RoLNI7EQ0,13613
6
- rubigram/network.py,sha256=ErrGwtKpMHN1Dq4IvPHSrMOcDN-TFjUk1CfU-2EuPAY,2364
7
- rubigram/state.py,sha256=oRk5xXuO4k-cK0qRI2Rz2mdoivJkANlo20zQAkdqFSY,4081
8
- rubigramclient-1.5.4.dist-info/licenses/LICENSE,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
- rubigramclient-1.5.4.dist-info/METADATA,sha256=jkVF9ahQoXaaT6CjuSXAI2eu1ZtclPKnvL82T0bSo8o,2320
10
- rubigramclient-1.5.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
11
- rubigramclient-1.5.4.dist-info/top_level.txt,sha256=Mhg5HfkL6rLec5sI4ClGmwoqYUANAZUz8sVa1sT_cas,9
12
- rubigramclient-1.5.4.dist-info/RECORD,,