diff --git a/config.example.ts b/config.example.ts index 6087339..74eadb3 100644 --- a/config.example.ts +++ b/config.example.ts @@ -1,6 +1,6 @@ export const config = { "name": "The Artificer", - "version": "1.1.0", + "version": "1.1.1", "token": "the_bot_token", "prefix": "[[", "postfix": "]]", diff --git a/mod.ts b/mod.ts index 4554407..02fe0f7 100644 --- a/mod.ts +++ b/mod.ts @@ -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