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>
|
||||
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>
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue