-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
57 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,10 +16,13 @@ Bot starter template based on [grammY](https://grammy.dev/) bot framework. | |
- [Docker](#docker-dockercom) | ||
- [Vercel](#vercel-vercelcom) | ||
- Examples: | ||
- [Prisma ORM](#prisma-orm-prismaio) | ||
- grammY plugins: | ||
- [Conversations](#grammy-conversations-grammydevpluginsconversations) | ||
- [Runner](#grammy-runner-grammydevpluginsrunner) | ||
- Databases: | ||
- [Prisma ORM](#prisma-orm-prismaio) | ||
- Runtimes: | ||
- [Bun](#bun-bunsh) | ||
|
||
## Usage | ||
|
||
|
@@ -155,11 +158,11 @@ git merge template/deploy/vercel -X theirs --squash --no-commit --allow-unrelate | |
|
||
## Examples | ||
|
||
### Prisma ORM ([prisma.io](https://prisma.io)) | ||
### grammY conversations ([grammy.dev/plugins/conversations](https://grammy.dev/plugins/conversations)) | ||
|
||
Branch: | ||
[example/orm-prisma](https://github.com/bot-base/telegram-bot-template/tree/example/orm-prisma) | ||
([open diff](https://github.com/bot-base/telegram-bot-template/compare/example/orm-prisma)) | ||
[example/plugin-conversations](https://github.com/bot-base/telegram-bot-template/tree/example/plugin-conversations) | ||
([open diff](https://github.com/bot-base/telegram-bot-template/compare/example/plugin-conversations)) | ||
|
||
Use in your project: | ||
|
||
|
@@ -173,21 +176,20 @@ git remote update | |
2. Merge example | ||
|
||
```sh | ||
git merge template/example/orm-prisma -X theirs --squash --no-commit --allow-unrelated-histories | ||
git merge template/example/plugin-conversations -X theirs --squash --no-commit --allow-unrelated-histories | ||
``` | ||
|
||
3. Install dependencies | ||
|
||
```sh | ||
npm i -D prisma | ||
npm i @prisma/client | ||
npm i @grammyjs/conversations | ||
``` | ||
|
||
### grammY conversations ([grammy.dev/plugins/conversations](https://grammy.dev/plugins/conversations)) | ||
### grammY runner ([grammy.dev/plugins/runner](https://grammy.dev/plugins/runner)) | ||
|
||
Branch: | ||
[example/plugin-conversations](https://github.com/bot-base/telegram-bot-template/tree/example/plugin-conversations) | ||
([open diff](https://github.com/bot-base/telegram-bot-template/compare/example/plugin-conversations)) | ||
[example/plugin-runner](https://github.com/bot-base/telegram-bot-template/tree/example/plugin-runner) | ||
([open diff](https://github.com/bot-base/telegram-bot-template/compare/example/plugin-runner)) | ||
|
||
Use in your project: | ||
|
||
|
@@ -201,20 +203,20 @@ git remote update | |
2. Merge example | ||
|
||
```sh | ||
git merge template/example/plugin-conversations -X theirs --squash --no-commit --allow-unrelated-histories | ||
git merge template/example/plugin-runner -X theirs --squash --no-commit --allow-unrelated-histories | ||
``` | ||
|
||
3. Install dependencies | ||
|
||
```sh | ||
npm i @grammyjs/conversations | ||
npm i @grammyjs/runner | ||
``` | ||
|
||
### grammY runner ([grammy.dev/plugins/runner](https://grammy.dev/plugins/runner)) | ||
### Prisma ORM ([prisma.io](https://prisma.io)) | ||
|
||
Branch: | ||
[example/plugin-runner](https://github.com/bot-base/telegram-bot-template/tree/example/plugin-runner) | ||
([open diff](https://github.com/bot-base/telegram-bot-template/compare/example/plugin-runner)) | ||
[example/orm-prisma](https://github.com/bot-base/telegram-bot-template/tree/example/orm-prisma) | ||
([open diff](https://github.com/bot-base/telegram-bot-template/compare/example/orm-prisma)) | ||
|
||
Use in your project: | ||
|
||
|
@@ -228,13 +230,51 @@ git remote update | |
2. Merge example | ||
|
||
```sh | ||
git merge template/example/plugin-runner -X theirs --squash --no-commit --allow-unrelated-histories | ||
git merge template/example/orm-prisma -X theirs --squash --no-commit --allow-unrelated-histories | ||
``` | ||
|
||
3. Install dependencies | ||
|
||
```sh | ||
npm i @grammyjs/runner | ||
npm i -D prisma | ||
npm i @prisma/client | ||
``` | ||
|
||
### Bun ([bun.sh](https://bun.sh)) | ||
|
||
Branch: | ||
[example/runtime-bun](https://github.com/bot-base/telegram-bot-template/tree/example/runtime-bun) | ||
([open diff](https://github.com/bot-base/telegram-bot-template/compare/example/runtime-bun)) | ||
|
||
Use in your project: | ||
|
||
1. Add the template repository as a remote | ||
|
||
```sh | ||
git remote add template [email protected]:bot-base/telegram-bot-template.git | ||
git remote update | ||
``` | ||
|
||
2. Merge example | ||
|
||
```sh | ||
git merge template/example/runtime-bun -X theirs --squash --no-commit --allow-unrelated-histories | ||
``` | ||
|
||
3. Install dependencies | ||
|
||
```sh | ||
# remove Node-related dependencies | ||
npm r @types/node tsx tsc-watch | ||
|
||
# install dependencies | ||
bun i | ||
|
||
# remove npm lockfile | ||
rm package-lock.json | ||
|
||
# install bun typings | ||
bun add -d @types/bun | ||
``` | ||
|
||
## Environment Variables | ||
|