Skip to content

Commit c7363c7

Browse files
committed
add community command
1 parent e035da9 commit c7363c7

File tree

4 files changed

+27
-0
lines changed

4 files changed

+27
-0
lines changed

deno.lock

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

deps.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,4 @@ export {
4040
export { generateName } from "https://deno.land/x/[email protected]/mod.ts ";
4141
import * as _ from "https://cdn.skypack.dev/lodash";
4242
export { _ };
43+
export { open } from "https://deno.land/x/[email protected]/index.ts";

main.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { Command, brightGreen } from "./deps.ts";
2+
import community from "./src/cmd/community.ts";
23
import down from "./src/cmd/down.ts";
34
import init from "./src/cmd/init.ts";
45
import list from "./src/cmd/list.ts";
@@ -67,6 +68,10 @@ async function main() {
6768
.action(async function () {
6869
await list();
6970
})
71+
.command("community", "Join our community Discord to chat with us")
72+
.action(async function () {
73+
await community();
74+
})
7075
.parse(Deno.args);
7176
}
7277

src/cmd/community.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { open } from "../../deps.ts";
2+
3+
export default function community() {
4+
const DISCORD_INVITE = "https://discord.gg/RxKa62YAs4";
5+
console.log(DISCORD_INVITE);
6+
7+
open(DISCORD_INVITE).catch((err) => {
8+
console.error(err);
9+
Deno.exit(1);
10+
});
11+
}

0 commit comments

Comments
 (0)