From a64b11d586251c8a1f37c8f152401a8428315368 Mon Sep 17 00:00:00 2001 From: Syunngiku0402 Date: Sat, 21 Dec 2024 15:05:11 +0900 Subject: [PATCH] =?UTF-8?q?MEE6=E3=83=AC=E3=83=99=E3=83=AB=E3=82=A2?= =?UTF-8?q?=E3=83=83=E3=83=97=E3=83=A1=E3=83=B3=E3=82=B7=E3=83=A7=E3=83=B3?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3v1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cogs/cmee6level.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cogs/cmee6level.py b/cogs/cmee6level.py index 25be2ac..71d8077 100644 --- a/cogs/cmee6level.py +++ b/cogs/cmee6level.py @@ -25,7 +25,9 @@ async def on_message(self, message: discord.Message): text = "" mee6_channel = await self.bot.fetch_channel(config.mee6.levelup) # 新たに作るmee6通知チャンネル levelupnoticeoff = message.guild.get_role(config.mee6.levelupnoticeoff) - if levelupnoticeoff not in message.author.roles: # mee6levelup無効化ロールを持っているかどうか + lvupuser = await message.guild.fetch_member(userid) + if levelupnoticeoff not in lvupuser.roles: + # if levelupnoticeoff not in message.author.roles: # mee6levelup無効化ロールを持っているかどうか await mee6_channel.send(f"{text}/xp reached <@{userid}> level {level}") else: await mee6_channel.send(f"{text}/xp reached {username} level {level}")