customdjs
v1.0.3-ud
Published
A custom version of discord.js v11
Downloads
8
Maintainers
Readme
About
Note this is been tested and is a custon version of discord.js v11
Examples
Embed
const embed = new Discord.RichEmbed()
.setTitle("This is your title, it can hold 256 characters")
.setAuthor("Author Name", "https://i.imgur.com/lm8s41J.png")
.setColor(0x00AE86)
.setDescription("This is the main body of text, it can hold 2048 characters.")
.setFooter("This is the footer text, it can hold 2048 characters", "http://i.imgur.com/w1vhFSR.png")
.setImage("http://i.imgur.com/yVpymuV.png")
.setThumbnail("http://i.imgur.com/p2qNFag.png")
.setTimestamp()
.setURL("https://www.npmjs.com/package/customdjs")
.addField("This is a field title, it can hold 256 characters",
"This is a field value, it can hold 1024 characters.")
.addField("Inline Field", "They can also be inline.", true)
.addBlankField(true)
.addField("Inline Field 3", "You can have a maximum of 25 fields.", true);
message.channel.send(embed);
Ping
if(command === "ping") {
const m = await message.channel.send("Pong!");
m.edit(`Pong! Latency ${m.createdTimestamp - message.createdTimestamp}ms`);
}
Basic Bot
const Discord = require('customdjs');
const client = new Discord.Client();
client.on("ready", () => {
console.log(`
Logged in as ${client.user.tag}
Running on ${client.guilds.size} guilds
Detected ${client.users.size} Users
Watching ${client.channels.size} Channels
`);
client.user.setPresence({ status: 'dnd', activity: { name: 'customdjs Demo bot', type: 'PLAYING'} });
});
client.on("message", async message => {
if (message.content === '!ping') {
const m = await message.channel.send("Pong!");
m.edit(`Pong! Latency ${m.createdTimestamp - message.createdTimestamp}ms`);
}
});
client.login('Token');