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

Starting bot #3

Open
Re5pawn404 opened this issue Jan 4, 2023 · 2 comments
Open

Starting bot #3

Re5pawn404 opened this issue Jan 4, 2023 · 2 comments

Comments

@Re5pawn404
Copy link

Hi Locvic,

Not sure if you can help but when I try to start the bot I get an error regarding "intents" in the main.py file,

Is there something I'm missing or something changed in the code?

Thanks.

@jonesph
Copy link

jonesph commented Jun 20, 2023

Same issue. Here is the actual error message.
Traceback (most recent call last):
File "/usr/src/bot/main.py", line 64, in
main()
File "/usr/src/bot/main.py", line 36, in main
bot = commands.Bot(
^^^^^^^^^^^^^
TypeError: BotBase.init() missing 1 required keyword-only argument: 'intents'

@kilgoreandy
Copy link

This is basic discord python syntax.

You have to enable intents both online and in your code.

In your code it should look something like this

intents = discord.Intents().all()
bot = discord.Bot(intents=intents, help_command=None, command_prefix='$')

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

3 participants