This commit is contained in:
syuilo 2018-08-11 12:34:24 +09:00
parent dbae24bcc8
commit 72ed4edf10
2 changed files with 8 additions and 8 deletions

View file

@ -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) => {

View file

@ -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, {