mirror of
https://github.com/syuilo/ai.git
synced 2025-03-25 21:12:56 +00:00
commit
3d6f6ce50d
3 changed files with 11 additions and 5 deletions
|
@ -143,10 +143,15 @@ export default class extends Module {
|
||||||
text: serifs.reminder.notifyWithThing(remind.thing, friend.name)
|
text: serifs.reminder.notifyWithThing(remind.thing, friend.name)
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
reply = await this.ai.post({
|
try {
|
||||||
renoteId: remind.thing == null && remind.quoteId ? remind.quoteId : remind.id,
|
reply = await this.ai.post({
|
||||||
text: acct(friend.doc.user) + ' ' + serifs.reminder.notify(friend.name)
|
renoteId: remind.thing == null && remind.quoteId ? remind.quoteId : remind.id,
|
||||||
});
|
text: acct(friend.doc.user) + ' ' + serifs.reminder.notify(friend.name)
|
||||||
|
});
|
||||||
|
} catch (err) {
|
||||||
|
// TODO: renote対象が消されていたらリマインダー解除
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.subscribeReply(remind.id, remind.isDm, remind.isDm ? remind.userId : reply.id, {
|
this.subscribeReply(remind.id, remind.isDm, remind.isDm ? remind.userId : reply.id, {
|
||||||
|
|
|
@ -39,7 +39,7 @@ export default class extends Module {
|
||||||
private check() {
|
private check() {
|
||||||
const average = (arr) => arr.reduce((a, b) => a + b) / arr.length;
|
const average = (arr) => arr.reduce((a, b) => a + b) / arr.length;
|
||||||
|
|
||||||
const cpuPercentages = this.statsLogs.map(s => s && s.cpu_usage * 100 || 0);
|
const cpuPercentages = this.statsLogs.map(s => s && (s.cpu_usage || s.cpu) * 100 || 0);
|
||||||
const cpuPercentage = average(cpuPercentages);
|
const cpuPercentage = average(cpuPercentages);
|
||||||
if (cpuPercentage >= 70) {
|
if (cpuPercentage >= 70) {
|
||||||
this.warn();
|
this.warn();
|
||||||
|
|
|
@ -470,6 +470,7 @@ export const items = [
|
||||||
'クラインの壺',
|
'クラインの壺',
|
||||||
'メビウスの輪',
|
'メビウスの輪',
|
||||||
'オリハルコン',
|
'オリハルコン',
|
||||||
|
'ヘドロ',
|
||||||
];
|
];
|
||||||
|
|
||||||
export const and = [
|
export const and = [
|
||||||
|
|
Loading…
Reference in a new issue