0
0
Fork 0

Add the ability for Nightbot to end a game through the command (mod only)

This commit is contained in:
Oliver-Akins 2023-09-03 11:49:29 -06:00
parent 35d36aa06b
commit c74c635ce0
2 changed files with 14 additions and 0 deletions

View file

@ -13,6 +13,11 @@
<p>
Starts a new game of Chatman in the channel.
</p>
<h2><code>!chatman end</code> (Mod-Only)</h2>
<p>
Stops the current game of Chatman in the channel.
</p>
<hr>
<h2><code>!chatman show</code></h2>

View file

@ -33,6 +33,15 @@ const subcommands: {[index: string]: subcommand} = {
})).payload;
},
},
"end": {
modOnly: true,
async handler(meta, req) {
return (await req.server.inject({
method: `DELETE`,
url: `/${meta.channel}/game`
})).payload;
},
},
"show": {
modOnly: false,
async handler(meta, req) {