mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-14 10:33:30 +01:00
Update readme example to use loginWithToken
This commit is contained in:
@@ -29,12 +29,14 @@ var Discord = require("discord.js");
|
|||||||
|
|
||||||
var mybot = new Discord.Client();
|
var mybot = new Discord.Client();
|
||||||
|
|
||||||
mybot.on("message", function(message){
|
mybot.on("message", function(message) {
|
||||||
if(message.content === "ping")
|
if(message.content === "ping") {
|
||||||
mybot.reply(message, "pong");
|
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");
|
||||||
```
|
```
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user