mirror of
https://github.com/syuilo/ai.git
synced 2024-11-22 21:27:58 +00:00
Message#replyのオーバーロードを定義
This commit is contained in:
parent
a2ebc9401c
commit
11493a9009
|
@ -8,6 +8,7 @@ import includes from '@/utils/includes.js';
|
||||||
import or from '@/utils/or.js';
|
import or from '@/utils/or.js';
|
||||||
import config from '@/config.js';
|
import config from '@/config.js';
|
||||||
import { sleep } from '@/utils/sleep.js';
|
import { sleep } from '@/utils/sleep.js';
|
||||||
|
import { Note } from './misskey/note.js';
|
||||||
|
|
||||||
export default class Message {
|
export default class Message {
|
||||||
private ai: 藍;
|
private ai: 藍;
|
||||||
|
@ -68,13 +69,27 @@ export default class Message {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async reply(text: string, opts?: {
|
||||||
|
file?: any;
|
||||||
|
cw?: string;
|
||||||
|
renote?: string;
|
||||||
|
immediate?: boolean;
|
||||||
|
}): Promise<Note>;
|
||||||
|
|
||||||
|
public async reply(text: string | null, opts?: {
|
||||||
|
file?: any;
|
||||||
|
cw?: string;
|
||||||
|
renote?: string;
|
||||||
|
immediate?: boolean;
|
||||||
|
}): Promise<void>;
|
||||||
|
|
||||||
@bindThis
|
@bindThis
|
||||||
public async reply(text: string | null, opts?: {
|
public async reply(text: string | null, opts?: {
|
||||||
file?: any;
|
file?: any;
|
||||||
cw?: string;
|
cw?: string;
|
||||||
renote?: string;
|
renote?: string;
|
||||||
immediate?: boolean;
|
immediate?: boolean;
|
||||||
}) {
|
}): Promise<Note | void> {
|
||||||
if (text == null) return;
|
if (text == null) return;
|
||||||
|
|
||||||
this.ai.log(`>>> Sending reply to ${chalk.underline(this.id)}`);
|
this.ai.log(`>>> Sending reply to ${chalk.underline(this.id)}`);
|
||||||
|
|
Loading…
Reference in a new issue