Try changing the positional argument you have in change_presence
to a keyword argument: according to the docs, that would be game
.
Hence
client.change_presence(discord.Game(name="use !commands"))
to
client.change_presence(game=discord.Game(name="use !commands")).
In addition if we check out the source code for discord.py
, we can see the exact reason for your error.
Line 409 in this file defines change_presence
as
def change_presence(self, *, game=None, status=None, afk=False, since=0.0, idle=None)
we can see the asterisk (*
) right after the self
argument which is Python 3 semantics for accepting only keyword arguments after the asterisk.
You can see this StackOverflow answer for some more information.
That means that all arguments after self
are purely keyword arguments (need an identifier), you are passing an argument which coupled with self
(passed in automatically) makes two positional arguments when the maximum positional arguments are just one (which is self
). So you must change your positional argument to a keyword one.