diff --git a/examples/config.ts b/examples/config.ts index 889e1cb..e052582 100644 --- a/examples/config.ts +++ b/examples/config.ts @@ -46,7 +46,7 @@ const config: configTypes = { // 管理者情報設定 admin: { name: "あどみん", // BOT管理者名 - showMail: true, // メールアドレスを公開するか(emergency.mail.toが使用されます) + showMail: false, // メールアドレスを公開するか(false:非公開/文字列:メールアドレス) }, // uwuzuサーバー設定 uwuzu: { diff --git a/package.json b/package.json index c9411cc..9f3ca17 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "notice-uwuzu", - "version": "v7.3@uwuzu1.5.4", - "tag": "v7.3", + "version": "v7.5@uwuzu1.5.4", + "tag": "v7.5", "description": "Notice Bot for uwuzu", "main": "dist/main.js", "scripts": { diff --git a/scripts/commands/help.ts b/scripts/commands/help.ts index 8f0d43c..fb249ba 100644 --- a/scripts/commands/help.ts +++ b/scripts/commands/help.ts @@ -10,6 +10,7 @@ const helpsMin = { "weather": "天気を返信します。", "report": "運営者に不具合などを報告します。", "birthday": "誕生日を設定・削除できます。", + "legal terms": "利用規約を返信します。", "legal privacy": "プライバシーポリシーを返信します。", } as { [key: string]: string }; @@ -46,6 +47,9 @@ const helpsFull = { 追記にyyyy/MM/ddの形式で誕生日を入力することで誕生日を設定できます。 また、追記に\`delete\`と入力することで誕生日のデータを削除できます。 `, + "legal terms": ` + 利用規約を返信します。 + `, "legal privacy": ` プライバシーポリシーを返信します。 `, diff --git a/scripts/commands/info.ts b/scripts/commands/info.ts index 8e13016..3993fb2 100644 --- a/scripts/commands/info.ts +++ b/scripts/commands/info.ts @@ -15,18 +15,10 @@ export default async function Info(data: ueuse) { let adminMail; - if ( - config.admin.showMail && - config.emergency.mail.to !== undefined - ) { - adminMail = config.emergency.mail.to; - } else if ( - config.admin.showMail && - config.emergency.mail.to === undefined - ) { - adminMail = "未設定"; - } else { + if (config.admin.showMail === false) { adminMail = "非公開"; + } else { + adminMail = config.admin.showMail; } let isReport; diff --git a/types/config.d.ts b/types/config.d.ts index 9c6de31..e65b698 100644 --- a/types/config.d.ts +++ b/types/config.d.ts @@ -41,7 +41,7 @@ interface legalTypes { interface adminTypes { name: string; - showMail: boolean; + showMail: string | false; } interface uwuzuTypes { diff --git a/types/types.d.ts b/types/types.d.ts index 9fbeac5..c7f6c5a 100644 --- a/types/types.d.ts +++ b/types/types.d.ts @@ -25,18 +25,21 @@ export interface meApi { export interface ueuse { uniqid: string; + relpyid: string; + reuseid: string; text: string; account: { username: string; userid: string; user_icon: string; user_header: string; + is_bot: boolean; }; - photo1: Base64URLString; - photo2: Base64URLString; - photo3: Base64URLString; - photo4: Base64URLString; - video1: Base64URLString; + photo1: string; + photo2: string; + photo3: string; + photo4: string; + video1: string; favorite: Array; favorite_cnt: string; datetime: string;