From 2146472146eb8f2ff0d5c0cbffe6fadf239dc74c Mon Sep 17 00:00:00 2001 From: Tsiry Sandratraina Date: Fri, 26 Jul 2024 08:47:24 +0000 Subject: [PATCH] feat: add community subcommand --- main.ts | 5 +++++ src/cmd/community.ts | 11 +++++++++++ 2 files changed, 16 insertions(+) create mode 100644 src/cmd/community.ts diff --git a/main.ts b/main.ts index 7c45927..5a6b49a 100644 --- a/main.ts +++ b/main.ts @@ -25,6 +25,7 @@ import status from "./src/cmd/status.ts"; import restart from "./src/cmd/restart.ts"; import stop from "./src/cmd/stop.ts"; import echo from "./src/cmd/echo.ts"; +import community from "./src/cmd/community.ts"; export async function main() { Deno.env.set( @@ -249,6 +250,10 @@ export async function main() { .action(async function (_, service) { await echo(service); }) + .command("community", "Join our community Discord to chat with us") + .action(async function () { + await community(); + }) .globalOption("--check-update ", "check for update", { default: true, }) diff --git a/src/cmd/community.ts b/src/cmd/community.ts new file mode 100644 index 0000000..bf46c9a --- /dev/null +++ b/src/cmd/community.ts @@ -0,0 +1,11 @@ +import { open } from "../../deps.ts"; + +export default function community() { + const DISCORD_INVITE = "https://discord.gg/V4U6dPskKc"; + console.log(DISCORD_INVITE); + + open(DISCORD_INVITE).catch((err) => { + console.error(err); + Deno.exit(1); + }); +}