-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor: migrate to deno * ci: attempt fix * remove more code * ci: pass deno fmt * refactor: dotenv, envalid & graphql_request * make it 100% working with deno
- Loading branch information
Showing
48 changed files
with
729 additions
and
3,688 deletions.
There are no files selected for viewing
File renamed without changes.
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 |
---|---|---|
@@ -1,28 +1,27 @@ | ||
# AnimeDB-tgbot | ||
# AnimeDB-tgbot | ||
|
||
A [Telegram Bot](https://telegram.dog/animedb_bot) to Search Anime & Manga Details using [AniList](https://anilist.co) API | ||
A [Telegram Bot](https://telegram.dog/animedb_bot) to Search Anime & Manga | ||
Details using [AniList](https://anilist.co) API | ||
|
||
[![CI](https://github.com/ArnabXD/AnimeDB-tgbot/actions/workflows/CI.yml/badge.svg)](https://github.com/ArnabXD/AnimeDB-tgbot/actions/workflows/CI.yml) | ||
|
||
### Run Locally | ||
|
||
```shell | ||
git clone https://github.com/ArnabXD/AnimeDB-tgbot.git | ||
cd AnimeDB-tgbot | ||
pnpm install | ||
pnpm run build | ||
vim .env | ||
pnpm run start | ||
deno task start | ||
``` | ||
|
||
#### .env File | ||
|
||
``` | ||
BOT_TOKEN=YOUR BOT TOKEN FROM @BOTFATHER | ||
# OPTIONAL FOR WEBHOOK | ||
PORT=yourWebhookPort | ||
``` | ||
|
||
### License & Copyright : | ||
|
||
- This Project is [GNU General Public License v3.0](https://github.com/ArnabXD/AnimeDB-tgbot/blob/main/LICENSE) Licensed | ||
- This Project is | ||
[GNU General Public License v3.0](https://github.com/ArnabXD/AnimeDB-tgbot/blob/main/LICENSE) | ||
Licensed | ||
- Copyright 2021 by [ArnabXD](https://telegram.dog/Arnab431) |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -12,78 +12,40 @@ jobs: | |
if: "!contains(github.event.head_commit.message, '#skip-lint')" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: pnpm/action-setup@v2.2.2 | ||
- uses: denoland/setup-deno@v1 | ||
with: | ||
version: 7.0.0 | ||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "16" | ||
cache: pnpm | ||
|
||
- name: Install dependencies | ||
run: pnpm install --no-frozen-lockfile | ||
deno-version: vx.x.x | ||
- name: Linter Check | ||
run: deno lint | ||
|
||
- name: Run Linter | ||
run: pnpm run lint | ||
|
||
test: | ||
fmt: | ||
runs-on: ubuntu-latest | ||
if: "!contains(github.event.head_commit.message, '#skip-test')" | ||
if: "!contains(github.event.head_commit.message, '#skip-fmt')" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: pnpm/[email protected] | ||
with: | ||
version: 7.0.0 | ||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
- uses: denoland/setup-deno@v1 | ||
with: | ||
node-version: "16" | ||
cache: pnpm | ||
|
||
- name: Install dependencies | ||
run: pnpm install --no-frozen-lockfile | ||
|
||
- name: Run Ava Tests | ||
run: pnpm run test | ||
deno-version: vx.x.x | ||
- name: Formatter Check | ||
run: deno fmt --check | ||
|
||
build: | ||
test: | ||
runs-on: ubuntu-latest | ||
if: "!contains(github.event.head_commit.message, '#skip-build')" | ||
if: "!contains(github.event.head_commit.message, '#skip-test')" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: pnpm/action-setup@v2.2.2 | ||
- uses: denoland/setup-deno@v1 | ||
with: | ||
version: 7.0.0 | ||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "16" | ||
cache: pnpm | ||
|
||
- name: Install dependencies | ||
run: pnpm install --no-frozen-lockfile | ||
|
||
- name: Build | ||
run: pnpm run build | ||
deno-version: vx.x.x | ||
- name: Run Tests | ||
run: deno test --allow-all | ||
|
||
release: | ||
runs-on: ubuntu-latest | ||
needs: [ lint, build, test ] | ||
needs: [ lint, fmt, test ] | ||
if: startsWith(github.ref, 'refs/tags/') | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: pnpm/[email protected] | ||
with: | ||
version: 7.0.0 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16' | ||
cache: pnpm | ||
|
||
- name: Install dependencies | ||
run: pnpm install --no-frozen-lockfile | ||
|
||
- uses: softprops/action-gh-release@v1 | ||
with: | ||
generate_release_notes: true | ||
|
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 |
---|---|---|
@@ -1,3 +1 @@ | ||
build/ | ||
node_modules/ | ||
.env |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"deno.enable": true, | ||
"deno.lint": true, | ||
"[typescript]": { | ||
"editor.defaultFormatter": "denoland.vscode-deno" | ||
}, | ||
"prettier.enable": false, | ||
"editor.formatOnSave": true | ||
} |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"importMap": "./import_map.json", | ||
"tasks": { | ||
"server": "deno run --allow-net --allow-read --allow-env server.ts", | ||
"serverless": "deno run --allow-net --allow-read --allow-env serverless.ts" | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { config } from "dotenv"; | ||
import { cleanEnv, str } from "envalid"; | ||
|
||
await config({ export: true }); | ||
|
||
export default cleanEnv(Deno.env.toObject(), { | ||
BOT_TOKEN: str(), | ||
}); |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"imports": { | ||
"grammy": "https://deno.land/x/[email protected]/mod.ts", | ||
"grammy/": "https://deno.land/x/[email protected]/", | ||
"gql": "https://raw.githubusercontent.com/ArnabXD/graphql-request/temp/mod.ts", | ||
"dotenv": "https://deno.land/[email protected]/dotenv/mod.ts", | ||
"envalid": "https://deno.land/x/[email protected]/mod.ts", | ||
"server": "https://deno.land/[email protected]/http/server.ts", | ||
"testing/": "https://deno.land/[email protected]/testing/" | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.