0
0
Fork 0

Add Nightbot command documentation

This commit is contained in:
Oliver-Akins 2023-02-19 21:10:32 -07:00
parent a639e7c1ae
commit 2cdb407c69
2 changed files with 55 additions and 0 deletions

36
docs/nightbot/index.html Normal file
View file

@ -0,0 +1,36 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Chatman Command Documentation</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/water.css@2/out/dark.css">
</head>
<body>
<h1>Chatman Nightbot Commands</h1>
<h2><code>!chatman start</code> (Mod-Only)</h2>
<p>
Starts a new game of Chatman in the channel.
</p>
<hr>
<h2><code>!chatman show</code></h2>
<p>
Shows the current state of the game.
</p>
<hr>
<h2><code>!chatman guess &lt;letter&gt;</code></h2>
<p>
Guesses a letter in the currently active game. <code>letter</code> can
<b>only</b> be one letter, it doesn't allow guessing the full word.
</p>
<h2><code>!chatman &lt;letter&gt;</code></h2>
<p>
This is an alias for <code>!chatman guess &lt;letter&gt;</code>
</p>
<hr>
</body>
</html>

View file

@ -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;