tybotframe 0.1.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.
tybotframe/__init__.py ADDED
@@ -0,0 +1,6 @@
1
+ # botframe/__init__.py
2
+
3
+ from .tybotframe import message, button_message
4
+
5
+ __version__ = "0.1.1"
6
+ __all__ = ["message", "button_message"]
@@ -0,0 +1,47 @@
1
+ # Made by a Solo Developer - ???
2
+ import asyncio
3
+ import time
4
+ from telegram import Bot
5
+ from telegram import InlineKeyboardButton as kb, InlineKeyboardMarkup as km
6
+
7
+
8
+ async def message(message, id, token):
9
+ bot = Bot(token=token)
10
+ async with bot:
11
+ await bot.send_message(chat_id=id, text=message, protect_content=True, disable_notification=True )
12
+
13
+ async def button_message(message, id, token,button1_cmd, button1_text, button2_cmd, button2_text, button3_url_text, button3_url, button_pos ):
14
+ bot = Bot(token=token)
15
+ b1 = kb(button1_text, callback_data=button1_cmd)
16
+ b2 = kb(button2_text, callback_data=button2_cmd)
17
+ b3 = kb(button3_url_text, url=button3_url)
18
+ keyboard_y = km([
19
+ [b1],
20
+ [b2],
21
+ [b3]
22
+ ])
23
+ buttons_1 = [b1,b2, b3]
24
+ keyboard_x = km(
25
+ [buttons_1]
26
+ )
27
+ if button_pos.lower() in ["y", "vertical"]:
28
+ async with bot:
29
+ await bot.send_message(
30
+ chat_id=id,
31
+ text=message,
32
+ reply_markup=keyboard_y
33
+ )
34
+ elif button_pos == "x" or "X" or "Horizontal" or "horizontal":
35
+ async with bot:
36
+ await bot.send_message(
37
+ chat_id=id,
38
+ text=message,
39
+ reply_markup=keyboard_x
40
+ )
41
+ else:
42
+ print("Error - 'button_pos' variable incorrect input")
43
+ time(5)
44
+ exit()
45
+
46
+
47
+
@@ -0,0 +1,42 @@
1
+ Metadata-Version: 2.4
2
+ Name: tybotframe
3
+ Version: 0.1.1
4
+ Summary: A structural messaging module for sending text and buttons with commands through Telegram
5
+ Author-email: VCatus <no@thankyou.com>
6
+ Classifier: Programming Language :: Python :: 3
7
+ Classifier: Operating System :: OS Independent
8
+ Requires-Python: >=3.7
9
+ Description-Content-Type: text/markdown
10
+ Requires-Dist: python-telegram-bot>=20.0
11
+
12
+ # How To install
13
+
14
+ ### Step 1:
15
+ ```pip install tybotframe```
16
+
17
+ # How to Import and use
18
+
19
+ ### Step 1:
20
+ import tybotframe module
21
+ ```from tybotframe import message, button_message```
22
+
23
+ ### Step 2:
24
+ import asyncio module
25
+ ```import asyncio```
26
+
27
+ # Fuctions
28
+
29
+ ### Basic Messaging
30
+
31
+ ```async.run(message())```
32
+
33
+ ### Button and command messaging
34
+
35
+ ```async.run(button_message())```
36
+
37
+ # REQUIRMENTS
38
+
39
+ ### updated python
40
+ ### Your Group ID
41
+ ### Your @BotFather API
42
+ ### Message Content
@@ -0,0 +1,6 @@
1
+ tybotframe/__init__.py,sha256=KPMV67mu7h7yvaSzF1ZFUDH6tFNXGUSnzXN4HrQci-8,134
2
+ tybotframe/tybotframe.py,sha256=gRBQiT3PQdH5yEeqeFSdFBZ_43XrYkhxTytNflY6ogg,1396
3
+ tybotframe-0.1.1.dist-info/METADATA,sha256=gpQD_4sUqeRVGhBV_4xO8uRAs5-g09XDxn99jW2RHAo,855
4
+ tybotframe-0.1.1.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
5
+ tybotframe-0.1.1.dist-info/top_level.txt,sha256=7h4qFy16cp0SpGlCPPnHEaMdlXbU2bvuJ-WdhUOMkiU,11
6
+ tybotframe-0.1.1.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (82.0.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1 @@
1
+ tybotframe