Skip to content

Commit 0378013

Browse files
committed
chore: Actually this is more fun with the prefix allowed
1 parent 40e5839 commit 0378013

1 file changed

Lines changed: 6 additions & 8 deletions

File tree

src/ps/handlers/autores.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,12 @@ export function autoResHandler(message: PSMessage) {
3434
}
3535

3636
if (message.type === 'chat') {
37-
if (!message.content.startsWith(prefix)) {
38-
if (['lunarnewyear'].includes(message.target.id)) {
39-
const HONSE_REGEX = /(\w*)horse(\w*)/i;
40-
if (HONSE_REGEX.test(message.content) && sample(20) === 0) {
41-
const honse = message.content.match(HONSE_REGEX)!;
42-
const honseText = honse[1] || honse[2] ? `*${honse[1]}HONSE${honse[2]}` : '*honse';
43-
message.reply(honseText);
44-
}
37+
if (['lunarnewyear'].includes(message.target.id)) {
38+
const HONSE_REGEX = /(\w*)horse(\w*)/i;
39+
if (HONSE_REGEX.test(message.content) && sample(20) === 0) {
40+
const honse = message.content.match(HONSE_REGEX)!;
41+
const honseText = honse[1] || honse[2] ? `*${honse[1]}HONSE${honse[2]}` : '*honse';
42+
message.reply(honseText);
4543
}
4644
}
4745
}

0 commit comments

Comments
 (0)