Small docs changes for consistency (#617)

This commit is contained in:
Schuyler Cebulskie
2016-09-06 16:45:29 -04:00
committed by GitHub
parent 910f47240d
commit 6bfad00229
2 changed files with 6 additions and 6 deletions

View File

@@ -29,19 +29,19 @@ discord.js will automatically prefer node-opus over opusscript.
## Example Usage
```js
const Discord = require('discord.js');
const bot = new Discord.Client();
const client = new Discord.Client();
bot.on('ready', () => {
client.on('ready', () => {
console.log('I am ready!');
});
bot.on('message', message => {
client.on('message', message => {
if (message.content === 'ping') {
message.reply('pong');
}
});
bot.login('your token');
client.login('your token');
```
## Links

View File

@@ -31,13 +31,13 @@ Version 9.0 eschews callbacks in favour of Promises. This means all code relying
For example, the following code:
```js
bot.getChannelLogs(channel, 100, function(messages) {
client.getChannelLogs(channel, 100, function(messages) {
console.log(`${messages.length} messages found`);
});
```
```js
msg.channel.fetchMessages({limit: 100}).then(messages => {
channel.fetchMessages({limit: 100}).then(messages => {
console.log(`${messages.size} messages found`);
});
```