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}")