Don't include G2G and OK in sherlock

This commit is contained in:
Lea 2023-04-17 16:09:22 +02:00
parent c0826f2396
commit e7cd1b98fd
Signed by: Lea
GPG key ID: 1BAFFE8347019C42

View file

@ -5,6 +5,7 @@ import { SendableEmbed } from "revolt-api";
import FormData from 'form-data'; import FormData from 'form-data';
import axios from "axios"; import axios from "axios";
let IGNORED = ["OK", "G2G"];
let RUNNING: string[] = []; let RUNNING: string[] = [];
export default async function sherlock(message: Message, args: string[], nsfw: boolean) { export default async function sherlock(message: Message, args: string[], nsfw: boolean) {
@ -142,7 +143,9 @@ export default async function sherlock(message: Message, args: string[], nsfw: b
if (line.startsWith('[+]')) { if (line.startsWith('[+]')) {
line = line.substring(3).trimStart(); line = line.substring(3).trimStart();
const [name, url] = line.split(': '); const [name, url] = line.split(': ');
matches.push({ user: currentUser, name, url }); if (!IGNORED.includes(name)) {
matches.push({ user: currentUser, name, url });
}
} }
else if (line.startsWith('[*] Checking username')) { else if (line.startsWith('[*] Checking username')) {
line = line.substring('[*] Checking username'.length, line.length - 'on:'.length).trim(); line = line.substring('[*] Checking username'.length, line.length - 'on:'.length).trim();