mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 17:43:30 +01:00
partially working autorevive
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
/* global process */
|
||||
|
||||
var Discord = require("../");
|
||||
var client = new Discord.Client();
|
||||
var client = new Discord.Client({autoRevive : true});
|
||||
var request = require("superagent");
|
||||
|
||||
client.on("ready", () => {
|
||||
@@ -10,10 +10,14 @@ client.on("ready", () => {
|
||||
|
||||
setTimeout(() => {
|
||||
client.internal.websocket.close();
|
||||
}, 3000);
|
||||
}, 10000);
|
||||
|
||||
});
|
||||
|
||||
client.on("autoRevive", () => {
|
||||
console.log("auto revived");
|
||||
});
|
||||
|
||||
client.on("message", msg => {
|
||||
|
||||
if(!msg.sender.equals(client.user))
|
||||
@@ -23,6 +27,10 @@ client.on("message", msg => {
|
||||
msg.channel.server.channels.get("type", "voice").join();
|
||||
}
|
||||
|
||||
if (msg.content === "end") {
|
||||
client.destroy();
|
||||
}
|
||||
|
||||
if (msg.content.startsWith("$play")) {
|
||||
var url = msg.content.split(" ")[1];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user