create-gramstax 0.0.20 → 0.0.22
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/src/env.ts +6 -0
- package/dist/src/templates/src/index.ts +4 -6
- package/dist/src/templates/src/pages/general-error-input-notfound.ts +1 -1
- package/dist/src/templates/src/pages/general-error.ts +1 -1
- package/dist/src/templates/src/pages/help.ts +1 -1
- package/dist/src/templates/src/pages/start.ts +1 -1
- package/dist/src/templates/src/pages/username-notfound.ts +1 -1
- package/dist/src/templates/src/repositories/example.ts +1 -1
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { env } from "./env"
|
|
1
2
|
import { log } from "./utils/log"
|
|
2
3
|
import { BotCore } from "./core/bot"
|
|
3
4
|
import { MainThread } from "./threads/main"
|
|
@@ -6,12 +7,9 @@ import { CacheExternal } from "gramstax"
|
|
|
6
7
|
new MainThread(() => {
|
|
7
8
|
log.success(`Bot started..`)
|
|
8
9
|
|
|
9
|
-
const token = process.env.BOT_TOKEN as string
|
|
10
|
-
const deploy = process.env.BOT_DEPLOY as string
|
|
11
|
-
const cache = process.env.CACHE_SESSION as string
|
|
12
10
|
new BotCore({
|
|
13
|
-
token,
|
|
14
|
-
deploy,
|
|
15
|
-
cacheSession: new CacheExternal(
|
|
11
|
+
token: env.BOT_TOKEN,
|
|
12
|
+
deploy: env.BOT_DEPLOY,
|
|
13
|
+
cacheSession: new CacheExternal(env.CACHE_SESSION, `session`, 24 * 60 * 60 * 1000)
|
|
16
14
|
})
|
|
17
15
|
})
|
|
@@ -3,7 +3,7 @@ import { StartPage } from "./start"
|
|
|
3
3
|
|
|
4
4
|
export class GeneralErrorInputNotFoundPage extends PageBase {
|
|
5
5
|
public kb() {
|
|
6
|
-
return this.
|
|
6
|
+
return this.inlineKeyboard((kb, arr) => {
|
|
7
7
|
return kb.text(arr[0], StartPage.data.callbackData())
|
|
8
8
|
})
|
|
9
9
|
}
|
|
@@ -3,7 +3,7 @@ import { PageBase } from "~/base/page"
|
|
|
3
3
|
|
|
4
4
|
export class UserNameNotFoundPage extends PageBase {
|
|
5
5
|
public kb() {
|
|
6
|
-
return this.
|
|
6
|
+
return this.inlineKeyboard((kb, arr) => {
|
|
7
7
|
return kb //
|
|
8
8
|
.text(arr[0], HelpPage.data.callbackData())
|
|
9
9
|
})
|