Skip to content

Commit

Permalink
add community command
Browse files Browse the repository at this point in the history
  • Loading branch information
tsirysndr committed Aug 20, 2024
1 parent e035da9 commit c7363c7
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 0 deletions.
10 changes: 10 additions & 0 deletions deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions deps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,4 @@ export {
export { generateName } from "https://deno.land/x/[email protected]/mod.ts ";
import * as _ from "https://cdn.skypack.dev/lodash";
export { _ };
export { open } from "https://deno.land/x/[email protected]/index.ts";
5 changes: 5 additions & 0 deletions main.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Command, brightGreen } from "./deps.ts";
import community from "./src/cmd/community.ts";
import down from "./src/cmd/down.ts";
import init from "./src/cmd/init.ts";
import list from "./src/cmd/list.ts";
Expand Down Expand Up @@ -67,6 +68,10 @@ async function main() {
.action(async function () {
await list();
})
.command("community", "Join our community Discord to chat with us")
.action(async function () {
await community();
})
.parse(Deno.args);
}

Expand Down
11 changes: 11 additions & 0 deletions src/cmd/community.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { open } from "../../deps.ts";

export default function community() {
const DISCORD_INVITE = "https://discord.gg/RxKa62YAs4";
console.log(DISCORD_INVITE);

open(DISCORD_INVITE).catch((err) => {
console.error(err);
Deno.exit(1);
});
}

0 comments on commit c7363c7

Please sign in to comment.