Skip to content

Ghostv13 dev patch 1 - #1

Merged
Ghostv13-dev merged 2 commits into
mainfrom
Ghostv13-dev-patch-1
Sep 16, 2026
Merged

Ghostv13-dev merged 2 commits into
mainfrom
Ghostv13-dev-patch-1

Conversation

@Ghostv13-dev

Copy link
Copy Markdown
Owner

No description provided.

Ghostv13-dev and others added 2 commits September 16, 2026 15:33
This workflow runs Hadolint to analyze Dockerfiles and uploads results to GitHub.
…n permissions

GramIO's core package explicitly supports Deno before committing to the import-map approach:

Confirmed: GramIO explicitly advertises "🌐 Multi-runtime - Works on Node.js, Bun and Deno." Good — I can proceed confidently with a Deno setup, using an import map so the source stays identical across runtimes.

Now update db/init.ts to drop the Node-only process.argv self-invocation check in favor of a cross-runtime one:

Now update package.json to drop the dotenv dependency (no longer needed) and use --env-file for Node:

No real errors (grep found nothing beyond expected missing-dependency noise). Now let's update the README with Deno instructions and repackage:

Now let's repackage the zip with all the changes:

Updated. What changed:

- **.env loading** — dropped the dotenv package entirely. Both runtimes load it natively now via --env-file=.env (Node 20.6+, Deno 1.44+), wired into the npm/Deno task scripts.
- **deno.json** — added with an import map (gramio, @gramio/auto-answer-callback-query, better-sqlite3 → their npm: equivalents) so the exact same src/ files run under deno task dev / deno task start with zero code forking. GramIO itself explicitly advertises Node/Deno/Bun support, so this should be solid.
- **src/env.ts** — small helper that reads Deno.env.get or process.env depending on which runtime is present, used everywhere instead of raw process.env.
- **src/index.ts / src/db/init.ts** — swapped Node-only bits (process.argv, process.on) for cross-runtime equivalents.

One caveat, flagged in the README: better-sqlite3 is a native addon, and while Deno's npm compatibility generally supports native modules, I can't 100% guarantee it for this specific package on every Deno version — if it gives you trouble, the README points to swapping in jsr:@db/sqlite (same schema, same SQL, different wrapper) as a quick fix.

To run: cp .env.example .env → fill in BOT_TOKEN/OWNER_ID → deno task dev.

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@Ghostv13-dev Ghostv13-dev self-assigned this Sep 16, 2026
@Ghostv13-dev
Ghostv13-dev merged commit 1073ef2 into main Sep 16, 2026
2 checks passed
@Ghostv13-dev
Ghostv13-dev deleted the Ghostv13-dev-patch-1 branch September 16, 2026 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant