From 9dffcb2086349e5225b40896613a1c80be09ff70 Mon Sep 17 00:00:00 2001 From: n1lsqn Date: Mon, 13 Nov 2023 15:17:22 +0900 Subject: [PATCH 01/12] =?UTF-8?q?feat:=20=E7=B7=A9=E5=92=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/core/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/core/index.ts b/src/modules/core/index.ts index a430077..d2c2b96 100644 --- a/src/modules/core/index.ts +++ b/src/modules/core/index.ts @@ -86,7 +86,7 @@ export default class extends Module { const name = matchResult[1]; - if (name.length > 20) { + if (name.length > 30) { console.error("Name length exceeds 10 characters."); msg.reply(serifs.core.tooLong); return true; From 1b07eb4f7a6f50ed49b8d32f05c3828e45728c69 Mon Sep 17 00:00:00 2001 From: n1lsqn Date: Mon, 13 Nov 2023 15:22:24 +0900 Subject: [PATCH 02/12] =?UTF-8?q?feat:=20@ai=E3=82=92=E5=8F=96=E3=82=8A?= =?UTF-8?q?=E9=99=A4=E3=81=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/core/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/core/index.ts b/src/modules/core/index.ts index d2c2b96..67eb272 100644 --- a/src/modules/core/index.ts +++ b/src/modules/core/index.ts @@ -101,12 +101,12 @@ export default class extends Module { const withSan = titles.some(t => name.endsWith(t)); if (withSan) { - msg.friend.updateName(name); + msg.friend.updateName(name.replace("@ai", "")); msg.reply(serifs.core.setNameOk(name)); } else { msg.reply(serifs.core.san).then(reply => { this.subscribeReply(msg.userId, reply.id, { - name: name + name: name.replace("@ai", "") }); }); } From d4a670d107c214183f8063a1e554047a4f4f9c1a Mon Sep 17 00:00:00 2001 From: n1lsqn Date: Mon, 13 Nov 2023 15:47:08 +0900 Subject: [PATCH 03/12] =?UTF-8?q?feat:=20=E5=89=8A=E9=99=A4=E5=88=86?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/core/index.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/modules/core/index.ts b/src/modules/core/index.ts index 67eb272..fbcf5b2 100644 --- a/src/modules/core/index.ts +++ b/src/modules/core/index.ts @@ -101,12 +101,16 @@ export default class extends Module { const withSan = titles.some(t => name.endsWith(t)); if (withSan) { - msg.friend.updateName(name.replace("@ai", "")); + msg.friend.updateName( + name.replace("@ai", "") + .replace("@papi.n1l.dev", "") + ); msg.reply(serifs.core.setNameOk(name)); } else { msg.reply(serifs.core.san).then(reply => { this.subscribeReply(msg.userId, reply.id, { name: name.replace("@ai", "") + .replace("@papi.n1l.dev", "") }); }); } From 66071446a3406a917e08d15eafb2c1f9c721b90e Mon Sep 17 00:00:00 2001 From: n1lsqn Date: Mon, 13 Nov 2023 17:52:28 +0900 Subject: [PATCH 04/12] =?UTF-8?q?feat:=20=E3=83=AA=E3=83=90=E3=83=BC?= =?UTF-8?q?=E3=82=B7=E7=84=A1=E5=8A=B9=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index cff6315..08cdde1 100644 --- a/src/index.ts +++ b/src/index.ts @@ -14,7 +14,7 @@ const pkg = require('../package.json'); import CoreModule from './modules/core'; import TalkModule from './modules/talk'; import BirthdayModule from './modules/birthday'; -import ReversiModule from './modules/reversi'; +// import ReversiModule from './modules/reversi'; import PingModule from './modules/ping'; import EmojiModule from './modules/emoji'; import EmojiReactModule from './modules/emoji-react'; @@ -72,7 +72,7 @@ promiseRetry(retry => { new FortuneModule(), new GuessingGameModule(), new KazutoriModule(), - new ReversiModule(), + // new ReversiModule(), new TimerModule(), new DiceModule(), new TalkModule(), From 9c7bdaa394188c892e88a1543455e9c9e623f022 Mon Sep 17 00:00:00 2001 From: n1lsqn Date: Mon, 13 Nov 2023 18:05:54 +0900 Subject: [PATCH 05/12] =?UTF-8?q?feat:=20=E5=8F=8D=E5=BF=9C=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/emoji-react/index.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/modules/emoji-react/index.ts b/src/modules/emoji-react/index.ts index 52f41be..713376a 100644 --- a/src/modules/emoji-react/index.ts +++ b/src/modules/emoji-react/index.ts @@ -69,8 +69,11 @@ 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:'); + if (includes(note.text, ['ใชใงใฆ', 'ๆ’ซใงใฆ'])) return react(':blobcatpnd_onaka_nade:'); + if (includes(note.text, ['็œ ใ„', 'ๅฏใ‚ˆใ†ใ‹ใช', 'ใญใ‚ˆใ†ใ‹ใช'])) return react(':ahutontabeteagemasyoune:'); + if (includes(note.text, ['ใ•ใ‚€ใ„', 'ๅฏ’ใ„'])) return react(':aa2luvzsqki2jnuq3emlaroc:'); + } } From 76080fc463dbb00ea014fa436c4a8eb910ad17ad Mon Sep 17 00:00:00 2001 From: n1lsqn Date: Mon, 13 Nov 2023 18:06:52 +0900 Subject: [PATCH 06/12] =?UTF-8?q?feat:=20=E5=8F=96=E8=AA=AC=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- torisetu.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/torisetu.md b/torisetu.md index 44bfb76..a66fc6c 100644 --- a/torisetu.md +++ b/torisetu.md @@ -12,6 +12,12 @@ ### ใชใงใชใง ใ€Œใชใงใชใงใ€ใ€Œๆ’ซใงใฆใ€ใ€Œใชใงใฆใ€ใจๆŠ•็จฟใ™ใ‚‹ใจใ€่—ใŒๆ’ซใงใซ่กŒใใพใ™ใ€‚ +### ใญใ‚€ใ„ +ใ€Œใญใ‚€ใ„ใ€ใ€Œ็œ ใ„ใ€ใจๆŠ•็จฟใ™ใ‚‹ใจใ€่—ใŒใŠๅธƒๅ›ฃใ‚’ใ‹ใ‘ใฆใใ‚Œใพใ™ใ€‚ + +### ใ•ใ‚€ใ„ +ใ€Œใ•ใ‚€ใ„ใ€ใ€Œๅฏ’ใ„ใ€ใจๆŠ•็จฟใ™ใ‚‹ใจใ€่—ใŒใŽใ‚…ใƒผใ—ใฆใใ‚Œใพใ™ใ€‚ + ## ่—ใฎไธปใชๆฉŸ่ƒฝ ### ๆŒจๆ‹ถ ใ€ŒใŠใฏใ‚ˆใ†ใ€ใ€ŒใŠใ‚„ใ™ใฟใ€ใชใฉใจ่ฉฑใ—ใ‹ใ‘ใ‚‹ใจๅๅฟœใ—ใฆใใ‚Œใพใ™ใ€‚ From 5e2e700e055a96ecd27f15e9cbc5b0471440af45 Mon Sep 17 00:00:00 2001 From: n1lsqn Date: Mon, 13 Nov 2023 18:18:25 +0900 Subject: [PATCH 07/12] =?UTF-8?q?feat:=20=E3=83=AF=E3=83=BC=E3=83=89?= =?UTF-8?q?=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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/emoji-react/index.ts b/src/modules/emoji-react/index.ts index 713376a..c460d9c 100644 --- a/src/modules/emoji-react/index.ts +++ b/src/modules/emoji-react/index.ts @@ -72,7 +72,7 @@ export default class extends Module { if (includes(note.text, ['ใชใงใชใง'])) return react(':y6ymef3aio1q3iwchjx0rwf5:'); if (includes(note.text, ['ใชใงใฆ', 'ๆ’ซใงใฆ'])) return react(':blobcatpnd_onaka_nade:'); - if (includes(note.text, ['็œ ใ„', 'ๅฏใ‚ˆใ†ใ‹ใช', 'ใญใ‚ˆใ†ใ‹ใช'])) return react(':ahutontabeteagemasyoune:'); + if (includes(note.text, ['ใญใ‚€ใ„', '็œ ใ„', 'ๅฏใ‚ˆใ†ใ‹ใช', 'ใญใ‚ˆใ†ใ‹ใช'])) return react(':ahutontabeteagemasyoune:'); if (includes(note.text, ['ใ•ใ‚€ใ„', 'ๅฏ’ใ„'])) return react(':aa2luvzsqki2jnuq3emlaroc:'); } From fd699e8316c9dca7daa08bc065367f52ddde0c4c Mon Sep 17 00:00:00 2001 From: n1lsqn Date: Mon, 13 Nov 2023 21:41:07 +0900 Subject: [PATCH 08/12] =?UTF-8?q?feat:=20console=E5=87=BA=E5=8A=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/server/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/modules/server/index.ts b/src/modules/server/index.ts index fc9d84c..6bf3285 100644 --- a/src/modules/server/index.ts +++ b/src/modules/server/index.ts @@ -39,6 +39,7 @@ export default class extends Module { private check() { const average = (arr) => arr.reduce((a, b) => a + b) / arr.length; + console.log('statsLogs', this.statsLogs) const cpuPercentages = this.statsLogs.map(s => s && (s.cpu_usage || s.cpu) * 100 || 0); const cpuPercentage = average(cpuPercentages); if (cpuPercentage >= 70) { From 6f42ee0b9265d41bd2f8d14d197a974392596e84 Mon Sep 17 00:00:00 2001 From: n1lsqn Date: Mon, 13 Nov 2023 21:52:18 +0900 Subject: [PATCH 09/12] =?UTF-8?q?fix:=20=E5=87=BA=E5=8A=9B=E5=89=8A?= =?UTF-8?q?=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/server/index.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/modules/server/index.ts b/src/modules/server/index.ts index 6bf3285..7c16392 100644 --- a/src/modules/server/index.ts +++ b/src/modules/server/index.ts @@ -38,8 +38,6 @@ export default class extends Module { @autobind private check() { const average = (arr) => arr.reduce((a, b) => a + b) / arr.length; - - console.log('statsLogs', this.statsLogs) const cpuPercentages = this.statsLogs.map(s => s && (s.cpu_usage || s.cpu) * 100 || 0); const cpuPercentage = average(cpuPercentages); if (cpuPercentage >= 70) { From b0d739b26ea7f2ead0e296a1444d207e3a571fa2 Mon Sep 17 00:00:00 2001 From: n1lsqn Date: Mon, 13 Nov 2023 22:29:46 +0900 Subject: [PATCH 10/12] =?UTF-8?q?fix:=20=E5=87=BA=E5=8A=9B=E5=89=8A?= =?UTF-8?q?=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/server/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/modules/server/index.ts b/src/modules/server/index.ts index 7c16392..fc9d84c 100644 --- a/src/modules/server/index.ts +++ b/src/modules/server/index.ts @@ -38,6 +38,7 @@ export default class extends Module { @autobind private check() { const average = (arr) => arr.reduce((a, b) => a + b) / arr.length; + const cpuPercentages = this.statsLogs.map(s => s && (s.cpu_usage || s.cpu) * 100 || 0); const cpuPercentage = average(cpuPercentages); if (cpuPercentage >= 70) { From 180849c23ca880523ed169c2095956b40a62dace Mon Sep 17 00:00:00 2001 From: n1lsqn Date: Tue, 14 Nov 2023 15:41:01 +0900 Subject: [PATCH 11/12] =?UTF-8?q?fix:=20console.log=E3=81=AE=E5=89=8A?= =?UTF-8?q?=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/core/index.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/modules/core/index.ts b/src/modules/core/index.ts index fbcf5b2..586e312 100644 --- a/src/modules/core/index.ts +++ b/src/modules/core/index.ts @@ -63,37 +63,31 @@ export default class extends Module { @autobind private setName(msg: Message): boolean { if (!msg.text) { - console.error("Message text is empty or undefined."); return false; } if (!msg.text.includes('ใฃใฆๅ‘ผใ‚“ใง')) { - console.error("Message text does not include 'ใฃใฆๅ‘ผใ‚“ใง'."); - return false; + return false; } if (msg.text.startsWith('ใฃใฆๅ‘ผใ‚“ใง')) { - console.error("Message text starts with 'ใฃใฆๅ‘ผใ‚“ใง'."); return false; } const matchResult = msg.text.match(/^(.+?)ใฃใฆๅ‘ผใ‚“ใง/); if (!matchResult) { - console.error("Name not found in the message text."); return false; } const name = matchResult[1]; if (name.length > 30) { - console.error("Name length exceeds 10 characters."); msg.reply(serifs.core.tooLong); return true; } if (safeForInterpolate(name)) { - console.error("Invalid name."); msg.reply(serifs.core.invalidName); return true; } From 1a66d72a3f18abf7fe81528451f113176be8350d Mon Sep 17 00:00:00 2001 From: n1lsqn Date: Sun, 26 Nov 2023 12:40:54 +0900 Subject: [PATCH 12/12] =?UTF-8?q?feat:=20=E6=9B=B2=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/recommend-music/index.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/modules/recommend-music/index.ts b/src/modules/recommend-music/index.ts index e0dbc0e..c2ba48a 100644 --- a/src/modules/recommend-music/index.ts +++ b/src/modules/recommend-music/index.ts @@ -104,7 +104,10 @@ const vocaloidUrls = [ 'https://www.nicovideo.jp/watch/sm12850213', 'https://www.nicovideo.jp/watch/sm10150980', 'https://www.youtube.com/watch?v=CoL42lnNtp8', - 'https://www.nicovideo.jp/watch/sm39853779' + 'https://www.nicovideo.jp/watch/sm39853779', + 'https://www.nicovideo.jp/watch/sm19466301', + 'https://www.nicovideo.jp/watch/sm17520775', + 'https://www.nicovideo.jp/watch/sm8089993' // ** ]