Skip to content

Commit

Permalink
chore: update project/author metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
chuangcaleb committed Apr 27, 2024
1 parent 2a534b6 commit 6275352
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 27 deletions.
54 changes: 30 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<h1 align="center">🤖 Telegram Bot Template</h1>
<h1 align="center">🤖 PowerKids Bot</h1>

<img align="right" width="35%" src="https://github.com/bot-base/telegram-bot-template/assets/26162440/c4371683-3e99-4b1c-ae8e-11ccbea78f4b">

Bot starter template based on [grammY](https://grammy.dev/) bot framework.
Uses bot starter template based on [grammY](https://grammy.dev/) bot framework.

## Features

Expand All @@ -13,13 +11,13 @@ Bot starter template based on [grammY](https://grammy.dev/) bot framework.
- Logger (powered by [pino](https://github.com/pinojs/pino))
- Fast and low overhead server (powered by [fastify](https://github.com/fastify/fastify))
- Ready-to-use deployment setups:
- [Docker](#docker-dockercom)
- [Vercel](#vercel-vercelcom)
- [Docker](#docker-dockercom)
- [Vercel](#vercel-vercelcom)
- Examples:
- [Prisma ORM](#prisma-orm-prismaio)
- grammY plugins:
- [Conversations](#grammy-conversations-grammydevpluginsconversations)
- [Runner](#grammy-runner-grammydevpluginsrunner)
- [Prisma ORM](#prisma-orm-prismaio)
- grammY plugins:
- [Conversations](#grammy-conversations-grammydevpluginsconversations)
- [Runner](#grammy-runner-grammydevpluginsrunner)

## Usage

Expand All @@ -30,42 +28,50 @@ Follow these steps to set up and run your bot using this template:
Start by creating a new repository using this template. You can do this by clicking [here](https://github.com/bot-base/telegram-bot-template/generate).

2. **Environment Variables Setup**

Create an environment variables file by copying the provided example file:

```bash
cp .env.example .env
```

Open the newly created `.env` file and set the `BOT_TOKEN` environment variable.

3. **Launching the Bot**

You can run your bot in both development and production modes.

**Development Mode:**

Install the required dependencies:

```bash
npm install
```

Start the bot in watch mode (auto-reload when code changes):

```bash
npm run dev
```

**Production Mode:**

Install only production dependencies (no development dependencies):

```bash
npm install --only=prod
```

Set the `NODE_ENV` environment variable to "production" in your `.env` file. Also, make sure to update `BOT_WEBHOOK` with the actual URL where your bot will receive updates.

```dotenv
NODE_ENV=production
BOT_WEBHOOK=<your_webhook_url>
```

Start the bot in production mode:

```bash
npm start
# or
Expand Down Expand Up @@ -110,7 +116,7 @@ project-root/
### Docker ([docker.com](https://docker.com))
Branch:
[deploy/docker-compose](https://github.com/bot-base/telegram-bot-template/tree/deploy/docker-compose)
[deploy/docker-compose](https://github.com/bot-base/telegram-bot-template/tree/deploy/docker-compose)
([open diff](https://github.com/bot-base/telegram-bot-template/compare/deploy/docker-compose))
Use in your project:
Expand All @@ -131,7 +137,7 @@ git merge template/deploy/docker-compose -X theirs --squash --no-commit --allow-
### Vercel ([vercel.com](https://vercel.com))

Branch:
[deploy/vercel](https://github.com/bot-base/telegram-bot-template/tree/deploy/vercel)
[deploy/vercel](https://github.com/bot-base/telegram-bot-template/tree/deploy/vercel)
([open diff](https://github.com/bot-base/telegram-bot-template/compare/deploy/vercel))

Use in your project:
Expand All @@ -154,7 +160,7 @@ git merge template/deploy/vercel -X theirs --squash --no-commit --allow-unrelate
### Prisma ORM ([prisma.io](https://prisma.io))

Branch:
[example/orm-prisma](https://github.com/bot-base/telegram-bot-template/tree/example/orm-prisma)
[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:
Expand Down Expand Up @@ -182,7 +188,7 @@ npm i @prisma/client
### grammY conversations ([grammy.dev/plugins/conversations](https://grammy.dev/plugins/conversations))

Branch:
[example/plugin-conversations](https://github.com/bot-base/telegram-bot-template/tree/example/plugin-conversations)
[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:
Expand All @@ -209,7 +215,7 @@ npm i @grammyjs/conversations
### grammY runner ([grammy.dev/plugins/runner](https://grammy.dev/plugins/runner))

Branch:
[example/plugin-runner](https://github.com/bot-base/telegram-bot-template/tree/example/plugin-runner)
[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:
Expand Down Expand Up @@ -327,11 +333,11 @@ npm i @grammyjs/runner
Array of Number
</td>
<td>
<i>Optional.</i>
Administrator user IDs.
<i>Optional.</i>
Administrator user IDs.
Use this to specify user IDs that have special privileges, such as executing <code>/setcommands</code>. <br/>
Defaults to an empty array.
</td>
</tr>
</tbody>
</table>
</table>
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "telegram-bot-template",
"name": "powerkids-telegram-bot",
"version": "0.1.0",
"description": "Telegram bot starter template",
"description": "Telegram bot for PowerKids Kindergarten",
"type": "module",
"imports": {
"~/*": "./build/src/*"
Expand All @@ -16,7 +16,7 @@
"start:force": "tsx ./src/main.ts",
"prepare": "npx husky install"
},
"author": "deptyped <deptyped@gmail.com>",
"author": "chuangcaleb <dev@chuangcaleb.com>",
"license": "MIT",
"private": true,
"dependencies": {
Expand Down

0 comments on commit 6275352

Please sign in to comment.