From 817f511df4e9146cf329c4e669258b6daf676d8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=CC=B7O=CC=B7N=CC=B7D=CC=B7O=CC=B7N=CC=B7=E5=B0=91?= =?UTF-8?q?=E6=9E=97?= <22037550+Shivawkes@users.noreply.github.com> Date: Wed, 15 Jan 2025 13:19:22 -0500 Subject: [PATCH] index.ts --- src/modules/emoji-react/index.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/modules/emoji-react/index.ts b/src/modules/emoji-react/index.ts index b131fa1..1603882 100644 --- a/src/modules/emoji-react/index.ts +++ b/src/modules/emoji-react/index.ts @@ -24,7 +24,7 @@ export default class extends Module { private async onNote(note: Note) { if (note.reply != null) return; if (note.text == null) return; - if (note.text.includes('@')) return; // (自分または他人問わず)メンションっぽかったらreject + if (note.text.includes('@')) return; // Reject if it looks like a mention (whether of yourself or someone else) const react = async (reaction: string, immediate = false) => { if (!immediate) { @@ -38,7 +38,7 @@ export default class extends Module { const customEmojis = note.text.match(/:([^\n:]+?):/g); if (customEmojis) { - // カスタム絵文字が複数種類ある場合はキャンセル + // Cancel if there are multiple custom emojis if (!customEmojis.every((val, i, arr) => val === arr[0])) return; this.log(`Custom emoji detected - ${customEmojis[0]}`); @@ -48,7 +48,7 @@ export default class extends Module { const emojis = parse(note.text).map(x => x.text); if (emojis.length > 0) { - // 絵文字が複数種類ある場合はキャンセル + // Cancel if there are multiple emojis if (!emojis.every((val, i, arr) => val === arr[0])) return; this.log(`Emoji detected - ${emojis[0]}`); @@ -64,10 +64,10 @@ export default class extends Module { return react(reaction); } - if (includes(note.text, ['ぴざ'])) return react('🍕'); - if (includes(note.text, ['ぷりん'])) return react('🍮'); - if (includes(note.text, ['寿司', 'sushi']) || note.text === 'すし') return react('🍣'); + if (includes(note.text, ['pizza'])) return react('🍕'); + if (includes(note.text, ['Pudding'])) return react('🍮'); + if (includes(note.text, ['sushi', 'sushi']) || note.text === 'Sushi') return react('🍣'); - if (includes(note.text, ['藍'])) return react('🙌'); + if (includes(note.text, ['Indigo'])) return react('🙌'); } }