docs(WIP): Bring the main doc pages up to date, and add more examples (#2094)

* Bring some docs up to date, as well as add a new example

* Missed an exclamation mark

* Do requested changes

* Do suggestions

* Same suggestions for the other examples

* Show people that they can also use reply with embeds

* Typos in embed.js example

* Remove object example from embeds, too complex
Suggested by Yukine

* Some changes, some requested changes

* Add moderation examples!

* Add attachment examples

* Missing dot

* Fix spacing

* Requested Changes

* Quote consistency

* Tfw you break the syntax
This commit is contained in:
Frangu Vlad
2018-02-28 04:04:53 +02:00
committed by Isabella
parent 35babc706d
commit 9f8925226d
11 changed files with 391 additions and 37 deletions

View File

@@ -1,6 +1,6 @@
/*
A ping pong bot, whenever you send "ping", it replies "pong".
*/
/**
* A ping pong bot, whenever you send "ping", it replies "pong".
*/
// Import the discord.js module
const Discord = require('discord.js');
@@ -8,11 +8,10 @@ const Discord = require('discord.js');
// Create an instance of a Discord client
const client = new Discord.Client();
// The token of your bot - https://discordapp.com/developers/applications/me
const token = 'your bot token here';
// The ready event is vital, it means that your bot will only start reacting to information
// from Discord _after_ ready is emitted
/**
* The ready event is vital, it means that only _after_ this will your bot start reacting to information
* received from Discord
*/
client.on('ready', () => {
console.log('I am ready!');
});
@@ -26,5 +25,5 @@ client.on('message', message => {
}
});
// Log our bot in
client.login(token);
// Log our bot in using the token from https://discordapp.com/developers/applications/me
client.login('your token here');