create-gramstax 0.0.24 → 0.0.25
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/dist/src/templates/.env.example +3 -2
- package/dist/src/templates/package.json +0 -1
- package/dist/src/templates/src/pages/general-error-input-notfound.ts +5 -0
- package/dist/src/templates/src/pages/general-error.ts +8 -0
- package/dist/src/templates/src/pages/help.ts +5 -0
- package/dist/src/templates/src/pages/start.ts +7 -0
- package/dist/src/templates/src/pages/username-notfound.ts +5 -0
- package/package.json +1 -1
- package/dist/src/templates/src/pages/example.ts +0 -17
|
@@ -3,8 +3,9 @@ BOT_TOKEN=your_bot_token_here
|
|
|
3
3
|
|
|
4
4
|
# Bot Deployment Mode
|
|
5
5
|
# Options:
|
|
6
|
-
# - polling
|
|
7
|
-
# - webhook:https://yourdomain.com (
|
|
6
|
+
# - polling
|
|
7
|
+
# - webhook:https://yourdomain.com (dynamic value = url public)
|
|
8
|
+
# - serverless:std/http (dynamic value = adapter)
|
|
8
9
|
BOT_DEPLOY=polling
|
|
9
10
|
|
|
10
11
|
# Environment
|
|
@@ -14,10 +14,15 @@ export class GeneralErrorInputNotFoundPage extends PageBase {
|
|
|
14
14
|
|
|
15
15
|
public static template = /*jsx*/ `
|
|
16
16
|
<base>
|
|
17
|
+
<keyboard type="inline">.. Home</keyboard>
|
|
17
18
|
<keyboard lang="en" type="inline">.. Home</keyboard>
|
|
18
19
|
<keyboard lang="it" type="inline">.. Casa</keyboard>
|
|
19
20
|
<keyboard lang="id" type="inline">.. Beranda</keyboard>
|
|
20
21
|
|
|
22
|
+
<message>
|
|
23
|
+
<b>❌ Not Found</b>
|
|
24
|
+
</message>
|
|
25
|
+
|
|
21
26
|
<message lang="en">
|
|
22
27
|
<b>❌ Not Found</b>
|
|
23
28
|
</message>
|
|
@@ -22,10 +22,18 @@ export class GeneralErrorPage extends PageBase {
|
|
|
22
22
|
|
|
23
23
|
public static template = /*jsx*/ `
|
|
24
24
|
<base>
|
|
25
|
+
<keyboard type="inline">.. Home</keyboard>
|
|
25
26
|
<keyboard lang="en" type="inline">.. Home</keyboard>
|
|
26
27
|
<keyboard lang="es" type="inline">.. Inicio</keyboard>
|
|
27
28
|
<keyboard lang="id" type="inline">.. Beranda</keyboard>
|
|
28
29
|
|
|
30
|
+
<message>
|
|
31
|
+
<b>❌ Error</b>
|
|
32
|
+
|
|
33
|
+
An unexpected error occurred.
|
|
34
|
+
Please try again later.
|
|
35
|
+
</message>
|
|
36
|
+
|
|
29
37
|
<message lang="en">
|
|
30
38
|
<b>❌ Error</b>
|
|
31
39
|
|
|
@@ -36,10 +36,15 @@ export class HelpPage extends PageBase {
|
|
|
36
36
|
|
|
37
37
|
public static template = /*jsx*/ `
|
|
38
38
|
<base>
|
|
39
|
+
<keyboard type="inline">.. Back</keyboard>
|
|
39
40
|
<keyboard lang="en" type="inline">.. Back</keyboard>
|
|
40
41
|
<keyboard lang="it" type="inline">.. Ritorno</keyboard>
|
|
41
42
|
<keyboard lang="id" type="inline">.. Kembali</keyboard>
|
|
42
43
|
|
|
44
|
+
<message>
|
|
45
|
+
<b>Help message</b>
|
|
46
|
+
</message>
|
|
47
|
+
|
|
43
48
|
<message lang="en">
|
|
44
49
|
<b>Help message</b>
|
|
45
50
|
</message>
|
|
@@ -37,10 +37,17 @@ export class StartPage extends PageBase {
|
|
|
37
37
|
|
|
38
38
|
public static template = /*jsx*/ `
|
|
39
39
|
<base>
|
|
40
|
+
<keyboard type="inline">❓ Help</keyboard>
|
|
40
41
|
<keyboard lang="en" type="inline">❓ Help</keyboard>
|
|
41
42
|
<keyboard lang="it" type="inline">❓ Aiuto</keyboard>
|
|
42
43
|
<keyboard lang="id" type="inline">❓ Bantuan</keyboard>
|
|
43
44
|
|
|
45
|
+
<message>
|
|
46
|
+
<b>Welcome to the bot {{username}}</b>
|
|
47
|
+
|
|
48
|
+
<b>❓ Help</b> - View help
|
|
49
|
+
</message>
|
|
50
|
+
|
|
44
51
|
<message lang="en">
|
|
45
52
|
<b>Welcome to the bot {{username}}</b>
|
|
46
53
|
|
|
@@ -21,10 +21,15 @@ export class UserNameNotFoundPage extends PageBase {
|
|
|
21
21
|
|
|
22
22
|
public static template = /*jsx*/ `
|
|
23
23
|
<base>
|
|
24
|
+
<keyboard type="inline">.. Home</keyboard>
|
|
24
25
|
<keyboard lang="en" type="inline">.. Home</keyboard>
|
|
25
26
|
<keyboard lang="es" type="inline">.. Inicio</keyboard>
|
|
26
27
|
<keyboard lang="id" type="inline">.. Beranda</keyboard>
|
|
27
28
|
|
|
29
|
+
<message>
|
|
30
|
+
Please set the username first before using the bot.
|
|
31
|
+
</message>
|
|
32
|
+
|
|
28
33
|
<message lang="en">
|
|
29
34
|
Please set the username first before using the bot.
|
|
30
35
|
</message>
|
package/package.json
CHANGED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { PageBase } from "~/base/page"
|
|
2
|
-
|
|
3
|
-
export class ExamplePage extends PageBase {
|
|
4
|
-
public async textCommand() {
|
|
5
|
-
await this.reply()
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
public static template = /*jsx*/ `
|
|
9
|
-
<base>
|
|
10
|
-
<message lang="en">
|
|
11
|
-
Must have file page in /pages/example.ts
|
|
12
|
-
|
|
13
|
-
Content from /templates/example.html
|
|
14
|
-
</message>
|
|
15
|
-
</base>
|
|
16
|
-
`
|
|
17
|
-
}
|