1.0.0 • Published 4 years ago
jcords v1.0.0
JCordS
Fork of Eris with discord.js-like syntax
Installing
npm install jcords
Ping Pong Example
const JCordS = require("jscords");
var bot = new JCordS.Client("BOT_TOKEN");
// Replace BOT_TOKEN with your bot account's token
bot.on("ready", () => { // When the bot is ready
console.log("Ready!"); // Log "Ready!"
});
bot.on("message", (message) => { // When a message is created
if(message.content === "!ping") { // If the message content is "!ping"
message.channel.send("Pong!");
// Send a message in the same channel with "Pong!"
} else if(message.content === "!pong") { // Otherwise, if the message is "!pong"
message.channel.send("Ping!")
// Respond with "Ping!"
}
});
bot.connect(); // Get the bot to connect to Discord
License
Refer to the LICENSE file.