Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing 1 required keyword-only argument: 'intents' #19

Open
ghost opened this issue Apr 22, 2023 · 1 comment
Open

missing 1 required keyword-only argument: 'intents' #19

ghost opened this issue Apr 22, 2023 · 1 comment

Comments

@ghost
Copy link

ghost commented Apr 22, 2023

I tried to run my code but this error comes up

Traceback (most recent call last):
File "C:\Users\Tom\Downloads\music_bot-main\main.py", line 9, in
bot = commands.Bot(command_prefix='/')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: BotBase.init() missing 1 required keyword-only argument: 'intents'

@Carlover101
Copy link

This is because of a recent update in discord where bots now require intents to be enabled in order for commands to work in servers. There are two things you need to do to fix this:

  1. After command_prefix='/', and before the parentheses, add the following: ,intents=discord.Intents.all()
  2. Go to https://discord.com/developers/applications
    • Click on your bot of choice
    • Navigate to the "Bot" tab on the left side
    • Scroll to "Privileged Gateway Intents"
    • Turn the "Presence Intent", "Server Members Intent", and "Message Content Intent" to on.
  3. Done! You should no longer get this error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant