Skip to content

Commit

Permalink
Stop parsing wiki stuff if there is no query. Lol
Browse files Browse the repository at this point in the history
  • Loading branch information
gausie committed Nov 20, 2023
1 parent 284eecf commit d59c287
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/commands/wiki/wiki.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ async function onMessage(message: Message) {

const queries = matches.map((m) => m[1]).filter((m) => m.length > 0);

if (queries.length === 0) return;

let slashNote = "";
let reaction;
if (
Expand Down Expand Up @@ -110,8 +112,6 @@ async function onMessage(message: Message) {
));
}

if (queries.length === 0) return;

const considered = queries.slice(0, 3);

if (considered.length < queries.length) {
Expand Down

0 comments on commit d59c287

Please sign in to comment.