Issues with getting VoiceChannel.members and Guild.members to return a full list

后端 未结 1 654
眼角桃花
眼角桃花 2020-12-12 07:22

Any time I try to use VoiceChannel.members or Guild.members it does not give me a full list of applicable members. I\'m grabbing both the VoiceChannel and the Guild from the

相关标签:
1条回答
  • 2020-12-12 08:21

    As of October 7th, Discord has changed their API to require bots to declare gateway intents. Make sure your discord.py is updated to at least version 1.5 and enable the members intent:

    import discord
    from discord.ext import commands
    
    intents = discord.Intents.default()
    intents.members = True 
    
    bot = commands.Bot(command_prefix='!', intents=intents)
    
    0 讨论(0)
提交回复
热议问题