1.1.1 • Published 3 years ago
dbotjs-framework v1.1.1
DbotJS Framework
This framework makes creating a bot much easier! With this module you can create a good basis for bot
#💻 Installation
- Install module:
npm install dbotjs-framework
- 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();
- 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