Skip to content
This repository has been archived by the owner on Apr 10, 2018. It is now read-only.

Commit

Permalink
Update run.js
Browse files Browse the repository at this point in the history
  • Loading branch information
NightCrystal169 authored Jan 13, 2018
1 parent 54e08f9 commit 0cbdb17
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions run.js
Original file line number Diff line number Diff line change
@@ -1 +1,26 @@
const Discord = require('discord.js');
const Client = new Discord.Client();
const prefix = "-"

Client.on("ready", () => {
Client.user.setGame('@NightCrystal|-help');
Client.user.setStatus('online');
console.log("online");
});

Client.on("message", message => {
if (message.author.bot) return;
if (!message.content.startsWith(prefix)) return;
let command = message.content.split(" ")[0];
command = command.slice(prefix.length);
let args = message.content.split(" ").slice(1);
if (command === "help") {
const embed = new Discord.RichEmbed().setColor(0x0000FF).setAuthor("HELP", "https://goo.gl/ENFFtn").addField("-help: ", "コマンドリストを表示します。").addField("-ping: ", "通信速度を表示します。").addField("-lobi-allkick", "900人以上居るCorePvPのメンバーを全員Kickします。(機能実装予定)")
message.channel.send(embed);
} else
if (command === "ping") {
message.channel.sendMessage(new Date().getTime() - message.createdTimestamp + "ms");
}
});

Client.login("Token");

0 comments on commit 0cbdb17

Please sign in to comment.