{"id":13772942,"url":"https://github.com/waptik/grammy-on-deta-template","last_synced_at":"2025-07-10T06:42:16.510Z","repository":{"id":50743905,"uuid":"405600531","full_name":"waptik/grammy-on-deta-template","owner":"waptik","description":"A template to use for deploying a #grammY bot on #deta","archived":false,"fork":false,"pushed_at":"2022-08-09T10:10:03.000Z","size":50,"stargazers_count":17,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-30T11:12:24.452Z","etag":null,"topics":["deta","grammy","grammyjs","telegram","telegram-bot"],"latest_commit_sha":null,"homepage":"https://t.me/GrammyOnDetaBot","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/waptik.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-09-12T09:33:41.000Z","updated_at":"2024-03-26T20:22:26.000Z","dependencies_parsed_at":"2022-09-10T18:01:55.637Z","dependency_job_id":null,"html_url":"https://github.com/waptik/grammy-on-deta-template","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waptik%2Fgrammy-on-deta-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waptik%2Fgrammy-on-deta-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waptik%2Fgrammy-on-deta-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waptik%2Fgrammy-on-deta-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/waptik","download_url":"https://codeload.github.com/waptik/grammy-on-deta-template/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233279522,"owners_count":18652172,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deta","grammy","grammyjs","telegram","telegram-bot"],"created_at":"2024-08-03T17:01:09.434Z","updated_at":"2025-01-10T01:16:04.702Z","avatar_url":"https://github.com/waptik.png","language":"TypeScript","funding_links":[],"categories":["Templates"],"sub_categories":[],"readme":"# Grammy Bot on Deta.sh Template\n\nThis is a template to deploy a telegram bot using [grammY](https://grammy.dev) and deploy it on [Deta](https://deta.sh) using typescript\n\n## How to use\n\nClick the `Use this template` button to have your copy, clone the newly generated repo locally and do your changes as you see fit.\n\n## Configuration\n\n### Step 1. Create a Deta Account and Install Deta cli locally\n\n- Create an account on [Deta](https://www.deta.sh/?ref=waptik).\n- Install [Deta CLI](https://docs.deta.sh/docs/cli/install?ref=waptik) and the instructions found there.\n\n### Step 2. Get your Telegram bot token and your user ID\n\n- Create a telegram account if you don't have one. Then start a conversation with [@BotFather](https://t.me/@BotFather) and send the /newbot command. Save the token you receive somewhere safe, we'll use it later.\n\n- To get your user ID, talk to [@GrammyOnDetaBot](https://t.me/GrammyOnDetaBot) and send the /me command. Save your user id somewhere for later.\n\n### Step 3. Setting Up Environment Variables\n\nCopy the `.env.example` file from this directory to `.env` (which will be ignored by Git):\n\n```bash\ncp .env.example .env\n```\n\nThen set each variable on `.env`:\n\n- `BOT_TOKEN` should be the bot token that you saved from step 2(required).\n\nThe resulting `.env` file should look like this:\n\n```bash\nBOT_TOKEN=...\n```\n\n- `ADMIN` should be the the user ID that you saved from step 2(not required).\n\nThe resulting `.env` file should look like this:\n\n```bash\nBOT_TOKEN=...\nADMIN=...\n```\n\n### Step 4. Run grammY in development mode\n\n```bash\nnpm install\nnpm run dev\n# or\nyarn install\nyarn dev\n```\n\nYour bot should be up and running on [http://localhost:8080](http://localhost:8080)! If it doesn't work, post on [GitHub discussions](https://github.com/waptik/grammy-on-deta-template/discussions).\n\n### Create a Deta.sh micros\n\nAs of now, you have yet to link your local to a micros on Deta cloud:\n\n```bash\nnpm run build\ndeta new -n\n#or\nyarn build\ndeta new -n\n```\n\n#### Deploy Your Local Project\n\nTo deploy your local project to Deta, simply run the deploy command:\n\n```sh\nnpm run deploy\n#or\nyarn deploy\n```\n\nThis will do 3 things for you:\n\n1. Clean your root folder of any build outputs\n2. Push your environment variables to Deta\n3. Deploy your app on Deta\n4. Clean your root folder of any build outputs again\n\nThat's all!!!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaptik%2Fgrammy-on-deta-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwaptik%2Fgrammy-on-deta-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaptik%2Fgrammy-on-deta-template/lists"}