mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 11:33:30 +01:00
Updated, testing something
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
Client Documentation
|
Client Documentation
|
||||||
====================
|
====================
|
||||||
|
|
||||||
|
This page contains documentation on the `Discord.Client` class. This should be used when you want to start creating things with the API.
|
||||||
|
|
||||||
Attributes
|
Attributes
|
||||||
----------
|
----------
|
||||||
|
|
||||||
@@ -17,7 +19,11 @@ An `Object` containing a configuration for the Client. Currently can only be con
|
|||||||
|
|
||||||
token
|
token
|
||||||
~~~~~
|
~~~~~
|
||||||
A `String` that is the token received after logging in. It is used to authorise the Client when joining WebSockets or making HTTP requests.
|
A `String` that is the token received after logging in. It is used to authorise the Client when joining WebSockets or making HTTP requests. Example token:
|
||||||
|
|
||||||
|
.. code-block:: js
|
||||||
|
|
||||||
|
ODAzTOc4MTA2BjQ2MjY4ODg.COmrCA.fEtD_Tc0JU6iZJU_11coEWBOQHE
|
||||||
|
|
||||||
state
|
state
|
||||||
~~~~~
|
~~~~~
|
||||||
@@ -29,5 +35,17 @@ An `Integer` representing what state of connection the Client is in.
|
|||||||
- **3** is ready, meaning the Client is ready to begin listening.
|
- **3** is ready, meaning the Client is ready to begin listening.
|
||||||
- **4** is disconnected, meaning the Client was disconnected due to any reason.
|
- **4** is disconnected, meaning the Client was disconnected due to any reason.
|
||||||
|
|
||||||
|
.. code-block:: js
|
||||||
|
|
||||||
|
if( bot.state === 3 ) // ready to go
|
||||||
|
|
||||||
|
user
|
||||||
|
~~~~
|
||||||
|
A `User`_ object representing the user of the signed in client.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Functions
|
Functions
|
||||||
---------
|
---------
|
||||||
|
|
||||||
|
.. _User : #user
|
||||||
Reference in New Issue
Block a user