From 6275352e5ad9d9eb4f45cee0f8a8ccbc557194ae Mon Sep 17 00:00:00 2001 From: chuangcaleb Date: Sat, 27 Apr 2024 13:36:32 +0800 Subject: [PATCH] chore: update project/author metadata --- README.md | 54 +++++++++++++++++++++++++++++----------------------- package.json | 6 +++--- 2 files changed, 33 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index 4dd7781..40f9da8 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,6 @@ -

🤖 Telegram Bot Template

+

🤖 PowerKids Bot

- - -Bot starter template based on [grammY](https://grammy.dev/) bot framework. +Uses bot starter template based on [grammY](https://grammy.dev/) bot framework. ## Features @@ -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 @@ -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= ``` - + Start the bot in production mode: + ```bash npm start # or @@ -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: @@ -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: @@ -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: @@ -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: @@ -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: @@ -327,11 +333,11 @@ npm i @grammyjs/runner Array of Number - Optional. - Administrator user IDs. + Optional. + Administrator user IDs. Use this to specify user IDs that have special privileges, such as executing /setcommands.
Defaults to an empty array. - \ No newline at end of file + diff --git a/package.json b/package.json index f415dd1..fca761a 100644 --- a/package.json +++ b/package.json @@ -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/*" @@ -16,7 +16,7 @@ "start:force": "tsx ./src/main.ts", "prepare": "npx husky install" }, - "author": "deptyped ", + "author": "chuangcaleb ", "license": "MIT", "private": true, "dependencies": {