moon.djs
v1.0.1
Published
A simple and easy to use discord.js v14 wrapper
Downloads
11
Maintainers
Readme
⭐ Easy Discord Bot Creation
First, we create a file called index.js
and write the following code.
const { ClientLogin, ReadEvents, ReadSlashCommands } = require("moon.djs");
ReadSlashCommands(); // required
ReadEvents(); // required
ClientLogin(); // required
Second, we create a file called .env
and enter the following text.
token = YOUR_BOT_TOKEN
Third, we create a src
folder and create a bot
folder, then create a file called test.js
(optional) and enter the following code.
module.exports = {
name: "test", // Command name (required)
description: "Test command.", // Command description (not required)
async run(client, interaction) {
await interaction.reply({
content: "Test command is working",
ephemeral: true,
});
// ...
},
};
Fourth, we create a bot
folder inside the src
folder, then create a file called test.js
(optional) and write the following code.
const { Events } = require("discord.js");
module.exports = {
name: Events.ClientReady, // Event name (required)
type: "once", // on or once (required)
async run(client) {
console.log("Bot is ready!");
// ...
},
};
🙂 As an extra
Activity System
const { ClientActivity } = require("moon.djs");
const { ActivityType } = require("discord.js");
ClientActivity("easy.djs is best forever!", ActivityType.Playing);
GetData System
const { GetData, GetDataWithKey } = require("moon.djs");
console.log(GetData()); // All object
// or
console.log(GetDataWithKey("token")); // Token value