mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
Started work on function
This commit is contained in:
@@ -100,4 +100,16 @@ messages
|
||||
An `Array` of Message_ objects the client has received over its uptime.
|
||||
|
||||
Functions
|
||||
---------
|
||||
---------
|
||||
|
||||
.. note :: Any functions used here that take callbacks as an optional parameter can also be used as Promises_. For example, you can do:
|
||||
|
||||
.. code-block:: js
|
||||
|
||||
bot.login(email, password).then(success).catch(err);
|
||||
|
||||
// OR use callbacks:
|
||||
|
||||
bot.login(email, password, function(err, token){
|
||||
|
||||
});
|
||||
@@ -12,7 +12,7 @@ A Channel Resolvable is data that can be resolved to a channel ID. Here is what
|
||||
|
||||
- A Channel_ object
|
||||
- A Server_ object (the #general channel of the server will be used)
|
||||
- A String_ representing the channel ID
|
||||
- A `String` representing the channel ID
|
||||
- A Message_ (the channel the message was sent in will be used)
|
||||
- A User_ (will get the PM channel with the specified user)
|
||||
|
||||
|
||||
@@ -3,4 +3,6 @@
|
||||
.. _Server : #server
|
||||
.. _Channel : #channel
|
||||
.. _Message : #message
|
||||
.. _PMChannel : #PMChannel
|
||||
.. _PMChannel : #PMChannel
|
||||
.. _Channel Resolvable : ./docs_resolvable.html#channel-resolvable
|
||||
.. _Promises : https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise
|
||||
Reference in New Issue
Block a user