mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-19 15:36:02 +00:00
Update set "Playing" status FAQ
This commit is contained in:
parent
1da6962580
commit
5ec3875ec8
15
docs/faq.rst
15
docs/faq.rst
@ -74,11 +74,18 @@ General questions regarding library usage belong here.
|
||||
How do I set the "Playing" status?
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
There is a method for this under :class:`Client` called :meth:`Client.change_presence`. The relevant aspect of this is its
|
||||
``game`` keyword argument which takes in a :class:`Game` object. Putting both of these pieces of info together, you get the
|
||||
following: ::
|
||||
There is a method for this under :class:`Client` called :meth:`Client.change_presence`.
|
||||
The relevant aspect of this is its ``activity`` keyword argument which takes in an :class:`Activity` object.
|
||||
|
||||
await client.change_presence(game=discord.Game(name='my game'))
|
||||
The status type (playing, listening, streaming, watching) can be set using the :class:`ActivityType` enum.
|
||||
For memory optimisation purposes, some activities are offered in slimmed down versions:
|
||||
|
||||
- :class:`Game`
|
||||
- :class:`Streaming`
|
||||
|
||||
Putting both of these pieces of info together, you get the following: ::
|
||||
|
||||
await client.change_presence(activity=discord.Game(name='my game'))
|
||||
|
||||
How do I send a message to a specific channel?
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
Loading…
x
Reference in New Issue
Block a user