This commit is contained in:
n1lsqn 2023-11-12 11:34:32 +09:00
commit 59517a9398
5 changed files with 131 additions and 0 deletions

View file

@ -34,6 +34,7 @@ import SleepReportModule from './modules/sleep-report';
import NotingModule from './modules/noting';
import PollModule from './modules/poll';
import ReminderModule from './modules/reminder';
import RecommendMusicModule from './modules/recommend-music';
console.log(' __ ____ _____ ___ ');
console.log(' /__\\ (_ _)( _ )/ __)');
@ -88,6 +89,7 @@ promiseRetry(retry => {
new NotingModule(),
new PollModule(),
new ReminderModule(),
new RecommendMusicModule(),
]);
}).catch(e => {
log(chalk.red('Failed to fetch the account'));

View file

@ -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');
}
}

View file

@ -0,0 +1,115 @@
import autobind from 'autobind-decorator';
import Module from '@/module';
import Message from '@/message';
import serifs from '@/serifs';
const vocaloidUrls = [
// ボカロ
'https://www.nicovideo.jp/watch/sm31677384',
'https://www.nicovideo.jp/watch/sm19042393',
'https://www.nicovideo.jp/watch/sm24892241',
'https://www.nicovideo.jp/watch/sm20503793',
'https://www.nicovideo.jp/watch/sm23393078',
'https://www.nicovideo.jp/watch/sm24485755',
'https://www.nicovideo.jp/watch/sm25808292',
'https://www.nicovideo.jp/watch/sm20433229',
'https://www.nicovideo.jp/watch/sm8541371',
'https://www.nicovideo.jp/watch/sm34509853',
'https://www.nicovideo.jp/watch/sm26661454',
'https://www.nicovideo.jp/watch/sm9797269',
'https://www.nicovideo.jp/watch/sm42536675',
'https://www.nicovideo.jp/watch/sm10244728',
'https://www.nicovideo.jp/watch/sm24626484',
'https://www.nicovideo.jp/watch/sm39875801',
'https://www.nicovideo.jp/watch/sm31472648',
'https://www.nicovideo.jp/watch/sm22608740',
'https://www.nicovideo.jp/watch/sm30519579',
'https://www.nicovideo.jp/watch/sm28406516',
'https://www.nicovideo.jp/watch/sm21652882',
'https://www.nicovideo.jp/watch/sm32626095',
'https://www.nicovideo.jp/watch/sm32748202',
'https://www.nicovideo.jp/watch/sm19870840',
'https://www.nicovideo.jp/watch/sm13471002',
'https://www.nicovideo.jp/watch/sm13173001',
'https://www.nicovideo.jp/watch/sm12195657',
'https://www.nicovideo.jp/watch/sm38824626',
'https://www.nicovideo.jp/watch/sm27057005',
'https://www.nicovideo.jp/watch/sm21036288',
'https://www.nicovideo.jp/watch/sm23762151',
'https://www.nicovideo.jp/watch/nm14629738',
'https://www.nicovideo.jp/watch/sm6529016',
'https://www.nicovideo.jp/watch/sm19625630',
'https://www.nicovideo.jp/watch/sm11224129',
'https://www.nicovideo.jp/watch/sm11834233',
'https://www.nicovideo.jp/watch/sm30519579',
'https://www.nicovideo.jp/watch/sm32537029',
'https://www.nicovideo.jp/watch/sm38708262',
'https://www.nicovideo.jp/watch/sm10393864',
'https://www.nicovideo.jp/watch/sm8061508',
'https://www.nicovideo.jp/watch/so15313251',
'https://www.nicovideo.jp/watch/sm2651288',
'https://www.nicovideo.jp/watch/sm36787316',
'https://www.nicovideo.jp/watch/sm1715919',
'https://www.nicovideo.jp/watch/sm2397344',
'https://www.nicovideo.jp/watch/sm25943367',
'https://www.nicovideo.jp/watch/sm9714351',
'https://www.nicovideo.jp/watch/sm40554570',
'https://www.nicovideo.jp/watch/sm31533883',
'https://www.nicovideo.jp/watch/sm33510542',
'https://www.nicovideo.jp/watch/sm12825985',
'https://www.nicovideo.jp/watch/sm2937784',
'https://www.nicovideo.jp/watch/sm20296308',
'https://www.nicovideo.jp/watch/sm30067009',
'https://www.nicovideo.jp/watch/sm31606995',
'https://www.nicovideo.jp/watch/sm11809611',
'https://www.nicovideo.jp/watch/sm24536934',
'https://www.nicovideo.jp/watch/sm12441199',
'https://www.nicovideo.jp/watch/sm6119955',
'https://www.nicovideo.jp/watch/sm8082467',
'https://www.nicovideo.jp/watch/sm3504435',
'https://www.nicovideo.jp/watch/sm14330479',
'https://www.nicovideo.jp/watch/sm22960446',
'https://www.nicovideo.jp/watch/sm6909505',
'https://www.nicovideo.jp/watch/sm17910036',
'https://www.nicovideo.jp/watch/sm15630734',
'https://www.nicovideo.jp/watch/sm11956364',
'https://www.nicovideo.jp/watch/sm31791630',
'https://www.nicovideo.jp/watch/sm11398357',
'https://www.nicovideo.jp/watch/sm28576299',
'https://www.nicovideo.jp/watch/sm1097445',
'https://www.nicovideo.jp/watch/sm18100389',
'https://www.nicovideo.jp/watch/sm6529016',
'https://www.nicovideo.jp/watch/nm6049209',
'https://www.nicovideo.jp/watch/sm31807833',
'https://www.nicovideo.jp/watch/sm31388743',
'https://www.nicovideo.jp/watch/sm35761194',
'https://www.nicovideo.jp/watch/sm27529228'
// **
]
const jPopUrls = [
'https://youtu.be/GpADSdd68UI?si=zrmgRShTOO8m1dA7',
'https://www.youtube.com/watch?v=qU-mi_S68Dk'
]
export default class extends Module {
public readonly name = 'recommendMusic';
@autobind
public install() {
return {
mentionHook: this.mentionHook
};
}
@autobind
private async mentionHook(msg: Message) {
if (msg.includes(['音楽', '曲', '曲者'])) {
const music = vocaloidUrls[Math.floor(Math.random() * vocaloidUrls.length)];
msg.reply(serifs.recommendMusic.suggestMusic(music));
return true;
} else {
return false;
}
}
}

View file

@ -313,6 +313,13 @@ export default {
suggest: emoji => `こんなのはどうですか?→${emoji}`,
},
/**
*
*/
recommendMusic: {
suggestMusic: musicUrl => `こんなのはどうでしょう?\n${musicUrl}`
},
/**
*
*/

View file

@ -5,6 +5,10 @@
## プロフィール
[こちら](https://xn--931a.moe/)
## 独自機能
### 曲紹介
「曲」「音楽」などと話しかけると、リストにある中からランダムで曲をおすすめしてくれます。(現在40曲程度)
## 藍の主な機能
### 挨拶
「おはよう」「おやすみ」などと話しかけると反応してくれます。