From 2cdb407c69bc0aee4a8d8fea8353650bdba71ec8 Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Sun, 19 Feb 2023 21:10:32 -0700 Subject: [PATCH] Add Nightbot command documentation --- docs/nightbot/index.html | 36 ++++++++++++++++++++++++++++++++++++ src/endpoints/files/docs.ts | 19 +++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 docs/nightbot/index.html create mode 100644 src/endpoints/files/docs.ts diff --git a/docs/nightbot/index.html b/docs/nightbot/index.html new file mode 100644 index 0000000..3d8de5d --- /dev/null +++ b/docs/nightbot/index.html @@ -0,0 +1,36 @@ + + + + + + + Chatman Command Documentation + + + +

Chatman Nightbot Commands

+

!chatman start (Mod-Only)

+

+ Starts a new game of Chatman in the channel. +

+
+ +

!chatman show

+

+ Shows the current state of the game. +

+
+ +

!chatman guess <letter>

+

+ Guesses a letter in the currently active game. letter can + only be one letter, it doesn't allow guessing the full word. +

+ +

!chatman <letter>

+

+ This is an alias for !chatman guess <letter> +

+
+ + \ No newline at end of file diff --git a/src/endpoints/files/docs.ts b/src/endpoints/files/docs.ts new file mode 100644 index 0000000..eb3d0d2 --- /dev/null +++ b/src/endpoints/files/docs.ts @@ -0,0 +1,19 @@ +import { ServerRoute } from "@hapi/hapi"; +import path from "path"; + +const route: ServerRoute = { + method: `GET`, path: `/docs/{path*}`, + options: { + files: { + relativeTo: path.join(process.cwd(), `docs`), + }, + }, + handler: { + directory: { + path: `.`, + index: true, + redirectToSlash: true, + }, + }, +}; +export default route; \ No newline at end of file