Started work on function

This commit is contained in:
hydrabolt
2015-09-27 20:10:15 +01:00
parent 2f52ca50bf
commit 3e9a2bd346
3 changed files with 17 additions and 3 deletions

View File

@@ -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){
});

View File

@@ -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)

View File

@@ -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