This repository has been archived by the owner on Apr 10, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
54e08f9
commit 0cbdb17
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"); |