From 25b88148414ce27b2e6493b2b1db5689e509261e Mon Sep 17 00:00:00 2001 From: Mizuno Kosei <84858257+AzelT3T@users.noreply.github.com> Date: Mon, 3 Jul 2023 03:06:06 +0900 Subject: [PATCH] Update discordbot.py --- discordbot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/discordbot.py b/discordbot.py index 8e4a65d..d987113 100644 --- a/discordbot.py +++ b/discordbot.py @@ -64,8 +64,8 @@ async def on_command_error(ctx, error): async def on_message(message): if message.author == bot.user: return - if bot.user.id in [member.id for member in message.mentions]: - user_message = message.content.split('>')[1].lstrip() + if message.channel.name == '質問': + user_message = message.content response = check_with_openai(user_message) if response is None: response = "該当するfaqが見つかりません。"