mirror of
https://github.com/nullnyat/NullcatChan.git
synced 2025-04-29 08:57:16 +09:00
30 lines
530 B
TypeScript
30 lines
530 B
TypeScript
import 藍 from '../../ai';
|
|
import IModule from '../../module';
|
|
|
|
export default class WelcomeModule implements IModule {
|
|
public name = 'welcome';
|
|
|
|
private ai: 藍;
|
|
|
|
public install = (ai: 藍) => {
|
|
this.ai = ai;
|
|
}
|
|
|
|
public onLocalNote = (note: any) => {
|
|
if (note.isFirstNote) {
|
|
setTimeout(() => {
|
|
this.ai.api('notes/create', {
|
|
renoteId: note.id
|
|
});
|
|
}, 3000);
|
|
|
|
setTimeout(() => {
|
|
this.ai.api('notes/reactions/create', {
|
|
noteId: note.id,
|
|
reaction: 'congrats'
|
|
});
|
|
}, 5000);
|
|
}
|
|
}
|
|
}
|