Skip to content

Commit

Permalink
Transition to deno2 (#845)
Browse files Browse the repository at this point in the history
* Successful transition to deno2

* Fix build errors

* Remove dotenv and node process

* Remove node-fetch

* Remove node-fetch

* Fix wrong music url

* Fix voice joining

* Minor improvement to music library

* Code quality updates

* Move to version 2.0.0 and update action to deno

* Fix portal channel type check

* With 2.1.4 LTS Deno2 works fine with discordjs

* Update discordjs version and some minor updates

* Update dockerfile to latest deno version

* Updated readme
  • Loading branch information
keybraker authored Jan 22, 2025
1 parent 1e53186 commit 71270e6
Show file tree
Hide file tree
Showing 127 changed files with 10,003 additions and 10,630 deletions.
25 changes: 25 additions & 0 deletions .env_example
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# current version
VERSION=
# your Discord-API-Token
DISCORD_TOKEN=
# mongoDB url
# without docker: mongodb://localhost:27017/portal
# with docker: mongodb://mongo/portal?compressors
MONGO_URL=
# owner ID may be used throughout Portal
OWNER_ID=
CLIENT_ID=
# API KEYS
OPENWEATHERMAP=
COVID_193=
LYRICS=
COINGECKO=
FOOTBALL_DATA=
YAHOO_FINANCE=
NEW_YORK_TIMES=
TRANSLATE_ENGINE=
# how long after message sent, will it be deleted
TRANSLATE_KEY=
# log files in ../logs directory on host
DEBUG=
LOG=
3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

37 changes: 0 additions & 37 deletions .eslintrc.json

This file was deleted.

55 changes: 0 additions & 55 deletions .github/dependabot.yml

This file was deleted.

18 changes: 18 additions & 0 deletions .github/workflows/deno.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: deno

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
node_test:
runs-on: ubuntu-latest
steps:
- uses: denoland/setup-deno@v2
with:
deno-version: v2.0.0
- run: deno lint
- run: deno fmt
- run: deno test
20 changes: 0 additions & 20 deletions .github/workflows/nodejs.yml

This file was deleted.

4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ dist

# Stores VSCode versions used for testing VSCode extensions
.vscode-test
.vscode/*

# yarn v2
.yarn/cache
Expand All @@ -119,3 +120,6 @@ build/*

# Ignore IDE configuration files
.idea/

# Executable files
*.exe
14 changes: 0 additions & 14 deletions .prettierrc.json

This file was deleted.

20 changes: 0 additions & 20 deletions .prettierrcignore

This file was deleted.

5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"compile-hero.disable-compile-files-on-did-save-code": true,
"git-blame.gitWebUrl": "",
"git.ignoreLimitWarning": true
"git.ignoreLimitWarning": true,
"cSpell.words": [
"decapitalize"
]
}
23 changes: 23 additions & 0 deletions dasu.response

Large diffs are not rendered by default.

48 changes: 48 additions & 0 deletions deno.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"name": "Portal",
"version": "0.8.0",
"exports": {
".": "./src/app.ts"
},
"nodeModulesDir": "auto",
"tasks": {
"start": "deno run --allow-sys --allow-net --allow-read --allow-write --allow-env --allow-ffi --allow-run src/app.ts",
"dev": "deno run --watch --allow-net --allow-read --allow-write --allow-env --allow-ffi --allow-run src/app.ts",
"lint": "deno lint",
"fmt": "deno fmt"
},
"imports": {
"@discordjs/builders": "npm:@discordjs/[email protected]",
"@discordjs/opus": "npm:@discordjs/[email protected]",
"@discordjs/rest": "npm:@discordjs/rest@^2.4.0",
"@discordjs/voice": "npm:@discordjs/[email protected]",
"@discordjs/ws": "npm:@discordjs/ws@^2.0.0",
"@distube/ytdl-core": "npm:@distube/ytdl-core@^4.15.1",
"@std/dotenv": "jsr:@std/dotenv@^0.225.2",
"@std/expect": "jsr:@std/expect@^1.0.7",
"cheerio": "npm:[email protected]",
"dayjs": "npm:[email protected]",
"discord-api-types": "npm:[email protected]",
"discord-ytdl-core": "npm:[email protected]",
"discord.js": "npm:[email protected]",
"ffmpeg-static": "npm:[email protected]",
"jsonfile": "npm:[email protected]",
"libsodium-wrappers": "npm:[email protected]",
"mongoose": "npm:[email protected]",
"opusscript": "npm:[email protected]",
"play-dl": "npm:play-dl@^1.9.7",
"roll": "npm:[email protected]",
"voca": "npm:[email protected]",
"winston": "npm:[email protected]",
"yt-search": "npm:[email protected]",
"ytdl-core": "npm:[email protected]"
},
"compilerOptions": {
"lib": [
"deno.window",
"deno.ns",
"dom"
],
"strict": true
}
}
Loading

0 comments on commit 71270e6

Please sign in to comment.