1.1.1 • Published 3 years ago

dbotjs-framework v1.1.1

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
3 years ago

DbotJS Framework

This framework makes creating a bot much easier! With this module you can create a good basis for bot

#💻 Installation

  1. Install module: npm install dbotjs-framework
  2. Make a index.js file. Example:
const DF = require("dbotjs-framework");
let Dbot = new DF.Client({
    prefix: "!", // Bot prefix > !help, !test
    token: "TOKEN" // Bot token
})

Dbot.connect();
  1. Make a coomands folder with the name: "commands". Example:
module.exports = {
    name: "test",
    description: "This is an test command",
    run: async (client, message, args) => {
        // Code here
    },
};

⚙ Options

new DF.Client({
    prefix: "!", // Bot prefix > !help, !test
    token: "TOKEN", // Bot token
    status: "test", // Bot status
    statusType: "WATCHING", // Bot status type
    embedColor: "#ff0000" // Color of a embed
})

🤖 All functions

Embeds

  • Success embed: if (args[0]) message.success("This is a success embed!")

  • Send a automatic error if (!args[0]) return message.error("No args provided")

  • Embed: message.sendEmbed({title: "test", desc: "test", color: "#00ff00"})

  • Find a member:

let member = message.getMember(args[0]);
if (!member) return message.error("No member found!");
  • Find a channel:
let channel = message.getChannel(args[0]);
if (!channel) return message.error("No channel found!");
  • Find a role:
let role = message.getRole(args[0]);
if (!role) return message.error("No role found!");
  • Check user is guild owner: if(!message.member.isOwner()) return message.error("User is no owner!");

  • Check user is admin: if(!message.member.isAdmin()) return message.error("User is no admin!");

📑 License

This project has an Apache 2.0 license

1.1.1

3 years ago

1.1.0

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago