From 3d44d2d0bff32b0d0fcb7ccc0c9c29887558a1e4 Mon Sep 17 00:00:00 2001 From: na2na <49822810+na2na-p@users.noreply.github.com> Date: Tue, 14 Jun 2022 00:00:00 +0900 Subject: [PATCH] =?UTF-8?q?ping=E3=81=AE=E3=81=A8=E3=81=93=E3=82=8D?= =?UTF-8?q?=E3=81=84=E3=81=98=E3=81=A3=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/ping/index.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/modules/ping/index.ts b/src/modules/ping/index.ts index c3bf81c..aea7405 100644 --- a/src/modules/ping/index.ts +++ b/src/modules/ping/index.ts @@ -16,9 +16,13 @@ export default class extends Module { private async mentionHook(msg: Message) { if (msg.text && (msg.text.includes('ping') || msg.text.includes('おい'))) { if (msg.text.includes('おい')) { - msg.reply('はい。。。', { - immediate: true - }); + if (this.ai.isMaster(msg.userId)) { + msg.reply('はい。。。', { + immediate: true + }); + } else { + return false; + } } else { msg.reply('PONG!', { immediate: true