1.0.1 • Published 12 months ago

moon.djs v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
12 months ago

⭐ 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
1.0.1

12 months ago

1.0.0

12 months ago