Сообщество IT-специалистов
Ответы на любые вопросы об IT
Профессиональное развитие в IT
Удаленная работа для IT-специалистов
@bot.listener() async def on_member_update(before, after): if before.status == after.status: return print(before.status, after.status)
@bot.listener() AttributeError: 'Bot' object has no attribute 'listener' AttributeError: 'Bot' object has no attribute 'listener'
server members
intents = discord.Intents.default() intents.members = True client = commands.Bot( command_prefix = config.bot_prefix, Intents = intents)
# https://discordpy.readthedocs.io/en/stable/ext/commands/api.html#discord.ext.commands.Bot.listen @bot.listen() async def on_member_update(before, after): if before.status == after.status: return print(after.name, after.guild.name, before.status, after.status, sep="\t")
client = commands.Bot( command_prefix = config.bot_prefix, Intents = intents)