Discord.py: Can't set Intent.members to True

Created on 6 Nov 2020  路  2Comments  路  Source: Rapptz/discord.py

Summary

Reproduction Steps

intent = discord.Intents(messages=True,members = True, guilds=True)
bot = commands.Bot(command_prefix = '-',intent = intent)
print(intent.members)
print(bot.intents.members)

Expected Results

Both prints displaying True, bot intent.members be set to true and my bot being able to use functions like guild.chunk()

Actual Results

True
False
The Bot is ready.
Ignoring exception in command ajuda:
Traceback (most recent call last):
File "C:\Users\jpdeo.virtualenvs\JboTSeries-_H1W6chR\lib\site-packages\discord\ext\commands\core.py", line 85, in wrapped
ret = await coro(args, *kwargs)
File "C:/JboTSeries/discord_files/bot.py", line 30, in ajuda
print(len(await ctx.guild.chunk()))
File "C:\Users\jpdeo.virtualenvs\JboTSeries-_H1W6chR\lib\site-packages\discord\guild.py", line 2073, in chunk
raise ClientException('Intents.members must be enabled to use this.')
discord.errors.ClientException: Intents.members must be enabled to use this.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "C:\Users\jpdeo.virtualenvs\JboTSeries-_H1W6chR\lib\site-packages\discord\ext\commands\bot.py", line 903, in invoke
await ctx.command.invoke(ctx)
File "C:\Users\jpdeo.virtualenvs\JboTSeries-_H1W6chR\lib\site-packages\discord\ext\commands\core.py", line 859, in invoke
await injected(ctx.args, *ctx.kwargs)
File "C:\Users\jpdeo.virtualenvs\JboTSeries-_H1W6chR\lib\site-packages\discord\ext\commands\core.py", line 94, in wrapped
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: ClientException: Intents.members must be enabled to use this.

Intents

intent = discord.Intents(messages=True,members = True, guilds=True)
bot = commands.Bot(command_prefix = '-',intent = intent)

Checklist

  • [x] I have searched the open issues for duplicates.
  • [x] I have shown the entire traceback, if possible.
  • [x] I have removed my token from display, if visible.
  • [x] I have provided the intents that my bot is using.

System Information

  • Python v3.8.5-final
  • discord.py v1.5.1-final
  • aiohttp v3.6.3
  • system info: Windows 10 10.0.19041
bug intents related invalid

Most helpful comment

The kwarg is called intents not intent.

All 2 comments

The kwarg is called intents not intent.

Omg im so dumb lol, thanks for the reply

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JackL0 picture JackL0  路  3Comments

MrBrahm picture MrBrahm  路  3Comments

Be4Vision picture Be4Vision  路  3Comments

AraHaan picture AraHaan  路  3Comments

Rimmy50 picture Rimmy50  路  3Comments