Remove afk parameter from change_presence

This commit is contained in:
Aaron Hennessey
2021-07-21 07:45:57 +01:00
committed by GitHub
parent 0faf4c8e2b
commit 15eb3d2e5d
3 changed files with 14 additions and 17 deletions

View File

@ -967,7 +967,6 @@ class Client:
*,
activity: Optional[BaseActivity] = None,
status: Optional[Status] = None,
afk: bool = False,
):
"""|coro|
@ -981,6 +980,9 @@ class Client:
game = discord.Game("with the API")
await client.change_presence(status=discord.Status.idle, activity=game)
.. versionchanged:: 2.0
Removed the ``afk`` keyword-only parameter.
Parameters
----------
activity: Optional[:class:`.BaseActivity`]
@ -988,10 +990,6 @@ class Client:
status: Optional[:class:`.Status`]
Indicates what status to change to. If ``None``, then
:attr:`.Status.online` is used.
afk: Optional[:class:`bool`]
Indicates if you are going AFK. This allows the discord
client to know how to handle push notifications better
for you in case you are actually idle and not lying.
Raises
------
@ -1008,7 +1006,7 @@ class Client:
else:
status_str = str(status)
await self.ws.change_presence(activity=activity, status=status_str, afk=afk)
await self.ws.change_presence(activity=activity, status=status_str)
for guild in self._connection.guilds:
me = guild.me