mirror of
https://github.com/syuilo/ai.git
synced 2024-11-09 23:48:01 +00:00
✌️
This commit is contained in:
parent
dbae24bcc8
commit
72ed4edf10
14
src/index.ts
14
src/index.ts
|
@ -79,6 +79,8 @@ export default class 藍 {
|
|||
}
|
||||
|
||||
private onMention = (msg: MessageLike) => {
|
||||
console.log(`mention received: ${msg.id}`);
|
||||
|
||||
// リアクションする
|
||||
if (!msg.isMessage) {
|
||||
setTimeout(() => {
|
||||
|
@ -98,17 +100,13 @@ export default class 藍 {
|
|||
}
|
||||
|
||||
public post = (param: any) => {
|
||||
setTimeout(() => {
|
||||
request.post('notes/create', param);
|
||||
}, 2000);
|
||||
request.post('notes/create', param);
|
||||
}
|
||||
|
||||
public sendMessage = (userId: any, param: any) => {
|
||||
setTimeout(() => {
|
||||
this.api('messages/create', Object.assign({
|
||||
userId: userId,
|
||||
}, param));
|
||||
}, 2000);
|
||||
this.api('messages/create', Object.assign({
|
||||
userId: userId,
|
||||
}, param));
|
||||
}
|
||||
|
||||
public api = (endpoint: string, param) => {
|
||||
|
|
|
@ -24,6 +24,8 @@ export default class MessageLike {
|
|||
}
|
||||
|
||||
public reply = (text: string) => {
|
||||
console.log(`sending reply of ${this.id} ...`);
|
||||
|
||||
setTimeout(() => {
|
||||
if (this.isMessage) {
|
||||
this.ai.sendMessage(this.messageOrNote.userId, {
|
||||
|
|
Loading…
Reference in a new issue