From 7f930320a3b95ddb7df955916a24508916f19366 Mon Sep 17 00:00:00 2001 From: n1lsqn Date: Sun, 12 Nov 2023 00:17:29 +0900 Subject: [PATCH 1/3] =?UTF-8?q?feat:=20=E3=82=A8=E3=83=A9=E3=83=BC?= =?UTF-8?q?=E8=90=BD=E3=81=A1=E3=81=97=E3=81=AA=E3=81=84=E3=82=88=E3=81=86?= =?UTF-8?q?=E3=81=AB=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/core/index.ts | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/src/modules/core/index.ts b/src/modules/core/index.ts index 68fb47a..3c00c14 100644 --- a/src/modules/core/index.ts +++ b/src/modules/core/index.ts @@ -66,16 +66,22 @@ export default class extends Module { if (!msg.text.includes('って呼んで')) return false; if (msg.text.startsWith('って呼んで')) return false; - const name = msg.text.match(/^(.+?)って呼んで/)![1]; + const matchResult = msg.text.match(/^(.+?)って呼んで/)![1]; - if (name.length > 10) { - msg.reply(serifs.core.tooLong); - return true; - } + if (matchResult !== null) { + const name = matchResult[1]; - if (!safeForInterpolate(name)) { - msg.reply(serifs.core.invalidName); - return true; + if (name.length > 10) { + msg.reply(serifs.core.tooLong); + return true; + } + + if (!safeForInterpolate(name)) { + msg.reply(serifs.core.invalidName); + return true; + } + } else { + console.log("setName: 一致するものが見つかりませんでした") } const withSan = titles.some(t => name.endsWith(t)); From c9abd5b77dfe541eee2b02f6fd8aca67ca0544f4 Mon Sep 17 00:00:00 2001 From: n1lsqn Date: Sun, 12 Nov 2023 00:22:11 +0900 Subject: [PATCH 2/3] =?UTF-8?q?fix:=20=E6=89=93=E6=B6=88=E3=81=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/core/index.ts | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/src/modules/core/index.ts b/src/modules/core/index.ts index 3c00c14..68fb47a 100644 --- a/src/modules/core/index.ts +++ b/src/modules/core/index.ts @@ -66,22 +66,16 @@ export default class extends Module { if (!msg.text.includes('って呼んで')) return false; if (msg.text.startsWith('って呼んで')) return false; - const matchResult = msg.text.match(/^(.+?)って呼んで/)![1]; + const name = msg.text.match(/^(.+?)って呼んで/)![1]; - if (matchResult !== null) { - const name = matchResult[1]; + if (name.length > 10) { + msg.reply(serifs.core.tooLong); + return true; + } - if (name.length > 10) { - msg.reply(serifs.core.tooLong); - return true; - } - - if (!safeForInterpolate(name)) { - msg.reply(serifs.core.invalidName); - return true; - } - } else { - console.log("setName: 一致するものが見つかりませんでした") + if (!safeForInterpolate(name)) { + msg.reply(serifs.core.invalidName); + return true; } const withSan = titles.some(t => name.endsWith(t)); From 57c49573fbcf7948b5a5427ba502972367d5939d Mon Sep 17 00:00:00 2001 From: n1lsqn Date: Sun, 12 Nov 2023 00:36:15 +0900 Subject: [PATCH 3/3] =?UTF-8?q?feat:=20=E3=81=AA=E3=81=A7=E3=81=AA?= =?UTF-8?q?=E3=81=A7=E6=A9=9F=E8=83=BD=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/emoji-react/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/modules/emoji-react/index.ts b/src/modules/emoji-react/index.ts index e671b4d..786f567 100644 --- a/src/modules/emoji-react/index.ts +++ b/src/modules/emoji-react/index.ts @@ -69,5 +69,8 @@ export default class extends Module { if (includes(note.text, ['寿司', 'sushi']) || note.text === 'すし') return react('🍣'); if (includes(note.text, ['藍'])) return react('🙌'); + if (includes(note.text, ['なでなで'])) return react('y6ymef3aio1q3iwchjx0rwf5'); + if (includes(note.text, ['なでて'])) return react('blobcatpnd_onaka_nade'); + if (includes(note.text, ['撫でて'])) return react('blobcatpnd_onaka_nade'); } }