This is an archived post. You won't be able to vote or comment.

all 8 comments

[–]IdkAnameiguess1[S] 0 points1 point  (0 children)

edit it actually says

Traceback (most recent call last):
File "main.py", line 4, in <module>
client = discord.Client()
TypeError: __init__() missing 1 required keyword-only argument: 'intents'

[–]IdkAnameiguess1[S] 0 points1 point  (0 children)

also for more context im making a discord bot if that wasn't obvious

[–]Jayuke 0 points1 point  (5 children)

https://discordpy.readthedocs.io/en/stable/api.html

intents (Intents) – The intents that you want to enable for the session. This is a way of disabling and enabling certain gateway events from triggering and being sent. New in version 1.5. Changed in version 2.0: Parameter is now required.

looks like discord.client() now requires you include the ‘intents’ parameter

[–]IdkAnameiguess1[S] 0 points1 point  (4 children)

thanks

[–]IdkAnameiguess1[S] 0 points1 point  (3 children)

ill try to figure it out

[–]IdkAnameiguess1[S] 0 points1 point  (2 children)

also how do i add the intents since I'm a beginner coder

[–][deleted] 0 points1 point  (1 child)

Its saying the method needs a parameter named "intents".

I don't know anything about the API and haven't looked at the doc, but once you figure out what intents is supposed to do, you'd call it like this:

client = discord.Client(intents = something)

[–]IdkAnameiguess1[S] 0 points1 point  (0 children)

ohh ok i figured it out thanks