Add the ability for Nightbot to end a game through the command (mod only)
This commit is contained in:
parent
35d36aa06b
commit
c74c635ce0
2 changed files with 14 additions and 0 deletions
|
|
@ -13,6 +13,11 @@
|
||||||
<p>
|
<p>
|
||||||
Starts a new game of Chatman in the channel.
|
Starts a new game of Chatman in the channel.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<h2><code>!chatman end</code> (Mod-Only)</h2>
|
||||||
|
<p>
|
||||||
|
Stops the current game of Chatman in the channel.
|
||||||
|
</p>
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<h2><code>!chatman show</code></h2>
|
<h2><code>!chatman show</code></h2>
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,15 @@ const subcommands: {[index: string]: subcommand} = {
|
||||||
})).payload;
|
})).payload;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
"end": {
|
||||||
|
modOnly: true,
|
||||||
|
async handler(meta, req) {
|
||||||
|
return (await req.server.inject({
|
||||||
|
method: `DELETE`,
|
||||||
|
url: `/${meta.channel}/game`
|
||||||
|
})).payload;
|
||||||
|
},
|
||||||
|
},
|
||||||
"show": {
|
"show": {
|
||||||
modOnly: false,
|
modOnly: false,
|
||||||
async handler(meta, req) {
|
async handler(meta, req) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue