webfast 0.0.8 → 0.1.11
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.
package/README.md
CHANGED
@@ -24,7 +24,7 @@ WebFast! provides a flexible and intuitive platform for creating web application
|
|
24
24
|
1. Clone the repository:
|
25
25
|
|
26
26
|
```bash
|
27
|
-
git clone https://github.com/ThePhotoCodeGrapher/
|
27
|
+
git clone https://github.com/ThePhotoCodeGrapher/webfast.git
|
28
28
|
```
|
29
29
|
|
30
30
|
2. Navigate to the project directory:
|
@@ -84,6 +84,12 @@ module.exports = {
|
|
84
84
|
}
|
85
85
|
}
|
86
86
|
|
87
|
+
```
|
88
|
+
## Important!
|
89
|
+
|
90
|
+
The folder [/app] is for your custom project, your custom github and code but can be used in combination with Webfast. Don't wory to contribute.
|
91
|
+
```
|
92
|
+
|
87
93
|
```
|
88
94
|
## License
|
89
95
|
|
@@ -1,8 +1,25 @@
|
|
1
|
-
module.exports = async function(program,message,id) {
|
1
|
+
module.exports = async function(program,message,id,buttons) {
|
2
2
|
console.log(`Telegram Send`);
|
3
3
|
// Create Request for send
|
4
4
|
const telegramURL = `https://api.telegram.org/bot${process.env.telegram}/sendMessage`;
|
5
5
|
|
6
|
+
// Check if buttons is send as []
|
7
|
+
let options;
|
8
|
+
if (buttons != undefined) {
|
9
|
+
console.log(`Loop Through Buttons`);
|
10
|
+
const keyboard = {
|
11
|
+
inline_keyboard: buttons,
|
12
|
+
|
13
|
+
resize_keyboard: true,
|
14
|
+
one_time_keyboard: true
|
15
|
+
};
|
16
|
+
|
17
|
+
options = {
|
18
|
+
reply_markup: JSON.stringify(keyboard)
|
19
|
+
};
|
20
|
+
}
|
21
|
+
|
22
|
+
|
6
23
|
const body = {
|
7
24
|
text: message,
|
8
25
|
disable_web_page_preview: false,
|
@@ -12,6 +29,11 @@ module.exports = async function(program,message,id) {
|
|
12
29
|
parse_mode : 'HTML'
|
13
30
|
}
|
14
31
|
|
32
|
+
// If options is there add as
|
33
|
+
if (options != undefined) {
|
34
|
+
body.reply_markup = options.reply_markup;
|
35
|
+
}
|
36
|
+
|
15
37
|
const madeRequest = await program.modules.request.post(program,telegramURL,body)
|
16
38
|
console.log(`Send Message`);
|
17
39
|
return madeRequest;
|
@@ -143,7 +143,12 @@ module.exports = async function(program,folder) {
|
|
143
143
|
} catch (err) {
|
144
144
|
//console.error(err);
|
145
145
|
//console.error(`Error For Telegram Function`);
|
146
|
-
await program.modules.telegram.functions.send(program,`${command}`,middleValue.chat.id
|
146
|
+
await program.modules.telegram.functions.send(program,`${command}`,middleValue.chat.id,[
|
147
|
+
[
|
148
|
+
{ text: 'EventGO!', web_app : { url : 'https://cloud.eventgo.today/events/list'}},
|
149
|
+
{ text: 'Create Event', callback_data: 'create_event' },
|
150
|
+
]
|
151
|
+
]);
|
147
152
|
}
|
148
153
|
|
149
154
|
|
package/package.json
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
{
|
2
2
|
"name": "webfast",
|
3
|
-
"version": "0.
|
4
|
-
"description": "WebFast
|
3
|
+
"version": "0.1.11",
|
4
|
+
"description": "WebFast! Bot Application, including TON mini-apps",
|
5
5
|
"main": "index.js",
|
6
6
|
"repository": {
|
7
7
|
"type": "git",
|
8
|
-
"url": "https://github.com/ThePhotoCodeGrapher/
|
8
|
+
"url": "https://github.com/ThePhotoCodeGrapher/webfast"
|
9
9
|
},
|
10
10
|
"scripts": {
|
11
11
|
"test": "echo \"Error: no test specified\" && exit 1"
|
@@ -16,7 +16,13 @@
|
|
16
16
|
"mini",
|
17
17
|
"app",
|
18
18
|
"ton",
|
19
|
-
"telegram"
|
19
|
+
"telegram",
|
20
|
+
"fast",
|
21
|
+
"framework",
|
22
|
+
"lowcode",
|
23
|
+
"kaigartner",
|
24
|
+
"bots",
|
25
|
+
"generator"
|
20
26
|
],
|
21
27
|
"author": "Kai Gartner",
|
22
28
|
"license": "ISC",
|