How do I get the discord.py intents to work?

前端 未结 2 1188
北恋
北恋 2021-01-24 19:18

I am trying to make a bot that welcomes people to the server that it\'s in and all of the code works except for the on_member_join event because it utilizes the new intents. I g

相关标签:
2条回答
  • 2021-01-24 20:00

    Try doing this?

    intents = discord.Intents().all()
    client = commands.Bot(command_prefix=',', intents = intents)
    
    0 讨论(0)
  • 2021-01-24 20:14
    intents = discord.Intents.default()
    intents.members = True
    
    client = commands.Bot(command_prefix=',', intents=intents)
    

    You also have to enable privileged intents in the developer portal

    A Primer Gateway to Intents

    0 讨论(0)
提交回复
热议问题