Skip to content

Commit

Permalink
Replace app.ts contents with app schema (#9)
Browse files Browse the repository at this point in the history
* replace app.ts

* move app schema to `app.ts`

* upgrade to `deno.land/x/[email protected]`
  • Loading branch information
EthanThatOneKid authored Dec 5, 2023
1 parent dbaac9a commit 443e55f
Show file tree
Hide file tree
Showing 7 changed files with 334 additions and 386 deletions.
53 changes: 0 additions & 53 deletions app.ts

This file was deleted.

29 changes: 29 additions & 0 deletions app_schema.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { discord } from "shorter/deps.ts";
import type { AppSchema } from "shorter/deps.ts";

export const appSchema = {
chatInput: {
name: "shorter",
description: "Shorten a URL",
options: {
alias: {
type: discord.ApplicationCommandOptionType.String,
description: "The alias of the shortlink",
required: true,
},
destination: {
type: discord.ApplicationCommandOptionType.String,
description: "The destination of the shortlink",
required: true,
},
force: {
type: discord.ApplicationCommandOptionType.Boolean,
description: "Whether to overwrite an existing shortlink",
},
ttl: {
type: discord.ApplicationCommandOptionType.String,
description: "The time-to-live of the shortlink",
},
},
},
} as const satisfies AppSchema;
272 changes: 196 additions & 76 deletions deno.lock

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions deps.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
export * as dotenv from "https://deno.land/std@0.203.0/dotenv/mod.ts";
export * as discord from "https://deno.land/x/[email protected].60/v10.ts";
export * as dotenv from "https://deno.land/std@0.208.0/dotenv/mod.ts";
export * as discord from "https://deno.land/x/[email protected].65/v10.ts";
export * from "https://deno.land/x/[email protected]/github/mod.ts";
export type { GitHubAPIClientOptions } from "https://deno.land/x/[email protected]/github/api/mod.ts";
export { Duration } from "https://deno.land/x/[email protected]/mod.ts";
export {
type AppSchema,
createApp,
} from "https://deno.land/x/[email protected]/mod.ts";
export { default as nacl } from "https://esm.sh/[email protected]";
1 change: 0 additions & 1 deletion lib/discord/mod.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
export * from "./discord_api_client_interface.ts";
export * from "./discord_api_client.ts";
export * from "./verify.ts";
66 changes: 0 additions & 66 deletions lib/discord/verify.ts

This file was deleted.

Loading

0 comments on commit 443e55f

Please sign in to comment.