1.0.0-fix • Published 4 years ago

discord.js-noobs v1.0.0-fix

Weekly downloads
18
License
ISC
Repository
github
Last release
4 years ago

discord.js-noobs

NPM

GitHub package.json version GitHub issues GitHub stars

Install

npm i discord.js-noobs

Client

create new Client

const { Client } = require("discord.js-noobs");
const client = new Client({
  prefix: ["!"],
  readyMessage: (client) => `User : ${client.users.cache.size}`,
  token: "your token",
});

add command

//Simple command
client.command("ping", (msg) => {
  msg.reply("pong!");
});

//add options
client.command(
  "hello",
  (msg, args) => {
    msg.reply(`hello ${args.join(" ")}`);
  },
  {
    practicable: ["user id"],
  }
);

load command

//index.js
client.commandDir("./command");

//command/ping.js
const { Command } = require("discord.js-noobs");

module.exports = new Command("ping").run((msg) => {
  msg.reply("pong!");
});

NoobsEmbed

const { Client, NoobsEmbed } = require("discord.js-noobs");
const client = new Client({
  prefix: ["!"],
  token: "your token",
});

//Simple embed
client.command("help", (msg) => {
  msg.channel.send(
    new NoobsEmbed()
      .setTitle("title")
      .addField("name", "value")
      .setColor("RANDOM")
      .setTimestamp()
  );
});

//Pagination
client.command("help", (msg) => {
  new NoobsEmbed({
    type: "book",
    client: client,
  }).addPages([
    new NoobsEmbed().setTitle("1/2").addField("help", "open help"),
    new NoobsEmbed().setTitle("2/2").addField("ping", "pong"),
  ]);
});
1.0.0-fix

4 years ago

1.0.1-fix

4 years ago

1.0.3-alpha

4 years ago

1.0.1-alpha

4 years ago

1.0.2-alpha

4 years ago

1.0.0-alpha

4 years ago

1.0.0

4 years ago

0.9.2

4 years ago

0.4.4

5 years ago

0.4.1

5 years ago

0.4.3

5 years ago

0.4.2

5 years ago

0.1.0

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago