code: async def change_presence(self, *, activity=None, status=None, afk=False):
          
  
          if status is None:
              status = 'online'
              status_enum = Status.online
          elif status is Status.offline:
              status = 'invisible'
              status_enum = Status.offline
          else:
              status_enum = status
              status = str(status)
  
          await self.ws.change_presence(activity=activity, status=status, afk=afk)
  
          for guild in self._connection.guilds:
              me = guild.me
              if me is None:
                  continue
  
              me.activities = (activity,)
              me.status = status_enum
docs: |coro|
  
          Changes the client's presence.
  
          The activity parameter is a :class:`.Activity` object (not a string) that represents
          the activity being done currently. This could also be the slimmed down versions,
          :class:`.Game` and :class:`.Streaming`.
  
          Example
          ---------
  
          .. code-block:: python3
  
              game = discord.Game("with the API")
              await client.change_presence(status=discord.Status.idle, activity=game)
  
          Parameters
          ----------
          activity: Optional[Union[:class:`.Game`, :class:`.Streaming`, :class:`.Activity`]]
              The activity being done. ``None`` if no currently active activity is done.
          status: Optional[:class:`.Status`]
              Indicates what status to change to. If None, then
              :attr:`.Status.online` is used.
          afk: :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
          ------
          InvalidArgument
              If the ``activity`` parameter is not the proper type.