tybotframe 0.1.1__tar.gz
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-0.1.1/PKG-INFO +42 -0
- tybotframe-0.1.1/README.md +31 -0
- tybotframe-0.1.1/pyproject.toml +23 -0
- tybotframe-0.1.1/setup.cfg +4 -0
- tybotframe-0.1.1/tybotframe/__init__.py +6 -0
- tybotframe-0.1.1/tybotframe/tybotframe.py +47 -0
- tybotframe-0.1.1/tybotframe.egg-info/PKG-INFO +42 -0
- tybotframe-0.1.1/tybotframe.egg-info/SOURCES.txt +9 -0
- tybotframe-0.1.1/tybotframe.egg-info/dependency_links.txt +1 -0
- tybotframe-0.1.1/tybotframe.egg-info/requires.txt +1 -0
- tybotframe-0.1.1/tybotframe.egg-info/top_level.txt +1 -0
|
@@ -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,31 @@
|
|
|
1
|
+
# How To install
|
|
2
|
+
|
|
3
|
+
### Step 1:
|
|
4
|
+
```pip install tybotframe```
|
|
5
|
+
|
|
6
|
+
# How to Import and use
|
|
7
|
+
|
|
8
|
+
### Step 1:
|
|
9
|
+
import tybotframe module
|
|
10
|
+
```from tybotframe import message, button_message```
|
|
11
|
+
|
|
12
|
+
### Step 2:
|
|
13
|
+
import asyncio module
|
|
14
|
+
```import asyncio```
|
|
15
|
+
|
|
16
|
+
# Fuctions
|
|
17
|
+
|
|
18
|
+
### Basic Messaging
|
|
19
|
+
|
|
20
|
+
```async.run(message())```
|
|
21
|
+
|
|
22
|
+
### Button and command messaging
|
|
23
|
+
|
|
24
|
+
```async.run(button_message())```
|
|
25
|
+
|
|
26
|
+
# REQUIRMENTS
|
|
27
|
+
|
|
28
|
+
### updated python
|
|
29
|
+
### Your Group ID
|
|
30
|
+
### Your @BotFather API
|
|
31
|
+
### Message Content
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61.0"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "tybotframe"
|
|
7
|
+
version = "0.1.1"
|
|
8
|
+
authors = [
|
|
9
|
+
{ name="VCatus", email="no@thankyou.com" },
|
|
10
|
+
]
|
|
11
|
+
description = "A structural messaging module for sending text and buttons with commands through Telegram"
|
|
12
|
+
readme = "README.md"
|
|
13
|
+
requires-python = ">=3.7"
|
|
14
|
+
dependencies = [
|
|
15
|
+
"python-telegram-bot>=20.0"
|
|
16
|
+
]
|
|
17
|
+
classifiers = [
|
|
18
|
+
"Programming Language :: Python :: 3",
|
|
19
|
+
"Operating System :: OS Independent",
|
|
20
|
+
]
|
|
21
|
+
|
|
22
|
+
[tool.setuptools]
|
|
23
|
+
packages = ["tybotframe"]
|
|
@@ -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 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
python-telegram-bot>=20.0
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
tybotframe
|