From 907f4f4b27fcdd2c375498327dc2fe070d4e51e1 Mon Sep 17 00:00:00 2001 From: abalabahaha Date: Wed, 20 Apr 2016 20:16:18 -0700 Subject: [PATCH] Update readme example to use loginWithToken --- README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 9ba11c549..080d9f0a0 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ [![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest) [![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/) - + discord.js is a node module used as a way of interfacing with [Discord](https://discordapp.com/). It is a very useful module for creating bots. @@ -29,12 +29,14 @@ var Discord = require("discord.js"); var mybot = new Discord.Client(); -mybot.on("message", function(message){ - if(message.content === "ping") +mybot.on("message", function(message) { + if(message.content === "ping") { mybot.reply(message, "pong"); + } }); -mybot.login("email", "password"); +mybot.loginWithToken("token"); +// If you still need to login with email and password, use mybot.login("email", "password"); ``` ---