我一直试图制造一个不和谐的机器人,但我面临的问题与on_member_join功能。机器人已被授予管理权限,我在控制台中也没有遇到任何错误。client.event print(f'We have logged in as {client.user}')
async def on_member_join
你好,我一直在尝试编辑这段代码,让它工作,但我被困在一个点上,我得到了这个错误: File "main.py", line 24, in on_member_joinAttributeError: 'Client' object has no attribute 'send_message' 我认为这与意图有关,但经过大量研究和时间,我无法修复它client.user.name)
print(c
所以,我试图给我的不一致机器人添加问候效果,但似乎无法发送消息。我知道机器人不会发送消息,因为在使用message.channel.send时没有定义" message“,但我不知道正确的方法。\client.py", line 312, in _run_event File "<string>", line 20, in on_member_joinprint("Username: %s" % (bot.user.na
我正在试用以下代码:async def on_member_join(member): for channel in member.guild.text_channels我以前的on_member_join活动运行得很好,但由于某种原因,现在已经不起作用了。我已经尝试更新到discord.py 1.5。任何帮助都将不胜感激。
我不会犯任何错误。