pyrobale 0.2.1__py3-none-any.whl → 0.2.3__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.
@@ -1,7 +1,9 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyrobale
3
- Version: 0.2.1
3
+ Version: 0.2.3
4
4
  Summary: A python wrapper for bale api
5
+ Project-URL: github, https://github.com/pyrobale/pyrobale
6
+ Project-URL: website, https://pyrobale.github.io
5
7
  Author-email: Ali Safamanesh <darg.q.a.a@gmail.com>
6
8
  License: GNU GENERAL PUBLIC LICENSE
7
9
  Version 3, 29 June 2007
@@ -676,7 +678,11 @@ License: GNU GENERAL PUBLIC LICENSE
676
678
  may consider it more useful to permit linking proprietary applications with
677
679
  the library. If this is what you want to do, use the GNU Lesser General
678
680
  Public License instead of this License. But first, please read
681
+ <<<<<<< HEAD
679
682
  <https://www.gnu.org/licenses/why-not-lgpl.html>.
683
+ =======
684
+ <https://www.gnu.org/licenses/why-not-lgpl.html>.
685
+ >>>>>>> a5043d5a348e3fb8d7f8faf92c8a566bc05b9d84
680
686
  License-File: LICENSE
681
687
  Classifier: License :: OSI Approved :: MIT License
682
688
  Classifier: Operating System :: OS Independent
@@ -713,13 +719,11 @@ A Python wrapper for the Bale Bot API that makes it easy to build Bale bots.
713
719
 
714
720
  ## Installation
715
721
 
716
-
717
- pip install pyrobale
718
-
722
+ ``pip install pyrobale``
719
723
 
720
724
  ## Quick Start
721
725
 
722
-
726
+ ```py
723
727
  from bale import Client, MenuKeyboardMarkup, MenuKeyboardButton
724
728
 
725
729
  # Initialize bot with token
@@ -732,92 +736,98 @@ def handle_message(message):
732
736
  # Create keyboard
733
737
  keyboard = MenuKeyboardMarkup()
734
738
  keyboard.add(MenuKeyboardButton("Hello!"))
735
-
739
+
736
740
  # Send welcome message
737
741
  message.reply_message("Welcome!", reply_markup=keyboard)
738
742
 
739
743
  # Start the bot
740
744
  bot.run()
741
-
745
+ ```
742
746
 
743
747
  ## Key Components
744
748
 
745
749
  ### Client
750
+
746
751
  The main class for interacting with Bale API. Handles all API requests and provides event decorators.
747
752
 
748
753
  ### Message
754
+
749
755
  Represents a message in Bale with methods for replying, editing, and deleting messages.
750
756
 
751
757
  ### User
758
+
752
759
  Represents a Bale user with their properties and methods.
753
760
 
754
761
  ### Chat
762
+
755
763
  Represents a chat conversation with methods for sending messages and managing chat settings.
756
764
 
757
765
  ### Keyboards
766
+
758
767
  - `MenuKeyboardMarkup`: For creating text keyboards
759
768
  - `InlineKeyboardMarkup`: For creating inline keyboards
760
769
 
761
770
  ### Database
771
+
762
772
  Built-in SQLite database support for storing persistent data.
763
773
 
764
774
  ## Event Handlers
765
775
 
766
-
767
776
  # Message handler
777
+
778
+ ```python
768
779
  @bot.on_message
769
780
  def handle_message(message):
770
781
  pass
782
+ ```
771
783
 
772
784
  # Callback query handler
785
+
786
+ ```python
773
787
  @bot.on_callback_query
774
788
  def handle_callback(callback):
775
789
  pass
790
+ ```
776
791
 
777
792
  # Periodic task handler
793
+
794
+ ```python
778
795
  @bot.on_tick(60) # Runs every 60 seconds
779
796
  def handle_tick():
780
797
  pass
798
+ ```
781
799
 
782
800
  # Ready event handler
801
+
802
+ ```python
783
803
  @bot.on_ready
784
804
  def handle_ready():
785
805
  pass
806
+ ```
786
807
 
787
808
  # Member join handler
809
+
810
+ ```python
788
811
  @bot.on_member_chat_join
789
812
  def handle_join(message, chat, user):
790
813
  pass
814
+ ```
791
815
 
792
816
  # Member leave handler
817
+
818
+ ```python
793
819
  @bot.on_member_chat_leave
794
820
  def handle_leave(message, chat, user):
795
821
  pass
796
-
822
+ ```
797
823
 
798
824
  ## Database Usage
799
825
 
800
-
801
826
  # Access database
827
+
828
+ ```py
802
829
  with bot.database as db:
803
- # Store data
804
830
  db.write_key("user_123", {"points": 100})
805
-
806
- # Read data
831
+
807
832
  data = db.read_key("user_123")
808
-
809
-
810
- ## Running Multiple Bots
811
-
812
-
813
- from bale import run_multiple_clients
814
-
815
- bot1 = Client("TOKEN1")
816
- bot2 = Client("TOKEN2")
817
-
818
- run_multiple_clients(bot1, bot2)
819
-
820
-
821
- ## License
822
-
823
- This project is licensed under the MIT License - see the LICENSE file for details.
833
+ ```
@@ -0,0 +1,5 @@
1
+ pyrobale.py,sha256=nmEvxxBaBkWGjwmcIIIC7-ZteCzB2-8fBnL7sN8NcDs,66285
2
+ pyrobale-0.2.3.dist-info/METADATA,sha256=DTtp9d30fGBVTp6tvUZsnYCda6otbxGc3yH0p-1hP60,43668
3
+ pyrobale-0.2.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
4
+ pyrobale-0.2.3.dist-info/licenses/LICENSE,sha256=B90gew13o1bBEF7pZKWHKW9hHEXnnHOf6tjwuJxlsE8,35947
5
+ pyrobale-0.2.3.dist-info/RECORD,,