easy-discord-chatbot

0.0.4 • Public • Published

A basic and easy to use discord chatbot module!

Features

  • Easy to use
  • Beginner friendly
  • Fast
  • Works with any discord.js version!

Example code:

const Discord = require("discord.js");
const client = new Discord.Client();
const Chat = require("easy-discord-chatbot");
const chat = new Chat({ name: "your bot name" });

client.on("ready", () => {
  console.log(`Ready! Logged in as ${client.user.tag}!`);
});

client.on("message", async message => {
  if(message.channel.name === "chat" && !message.author.bot) {    
    let reply = await chat.chat(message.content)
    message.channel.send(reply)
  }
});

client.login("Your Token Here");

Constructor options.

const Chat = require("easy-discord-chatbot");
const chat = new Chat({ name: "your bot name" });
  • name: sets the name of the chatbot to provided name. By default the name is "ChatBot"

Note:

  • If you are facing any type of bugs while using this package, report them here.

Want to contribute? Feel free to make a pull request here and I will be happy to review it.

Package Sidebar

Install

npm i easy-discord-chatbot

Weekly Downloads

20

Version

0.0.4

License

MIT

Unpacked Size

18.8 kB

Total Files

12

Last publish

Collaborators

  • thelastgamer1809