Missed a couple breaks
This commit is contained in:
Ean Milligan (Bastion) 2021-01-11 03:46:34 -05:00
parent 30455af88c
commit 3be12086b1
2 changed files with 4 additions and 1 deletions

View File

@ -1,6 +1,6 @@
export const config = {
"name": "The Artificer",
"version": "1.1.0",
"version": "1.1.1",
"token": "the_bot_token",
"prefix": "[[",
"postfix": "]]",

3
mod.ts
View File

@ -320,6 +320,7 @@ if (config.api.enable) {
if (query.has("n") && query.has("m")) {
// Alert API user that they shouldn't be doing this
request.respond({ status: Status.BadRequest, body: STATUS_TEXT.get(Status.BadRequest) });
break;
}
// Super secure authorization
@ -336,6 +337,7 @@ if (config.api.enable) {
if (rollCmd.length === 0) {
// Alert API user that they messed up
request.respond({ status: Status.BadRequest, body: STATUS_TEXT.get(Status.BadRequest) });
break;
}
// Clip off the leading prefix. API calls must be formatted with a prefix at the start to match how commands are sent in Discord
@ -376,6 +378,7 @@ if (config.api.enable) {
if (gms.length === 0) {
// Alert API user that they messed up
request.respond({ status: Status.BadRequest, body: STATUS_TEXT.get(Status.BadRequest) });
break;
}
// Make a new return line to be sent to the roller