1.3.0 • Published 2 years ago

pop-cat-chat v1.3.0

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

npm version

Installation

npm i pop-cat-chat

Constructor Options

const Chat = require("pop-cat-chat");
const chat = new Chat({ name: "YourChatBotName" })

Test Example

const Chat = require("pop-cat-chat");
const chat = new Chat({ name: "Test" })

async function test(message) {
let reply = await chat.chat(message)
  console.log(reply)
}

test('what is your name')

Response

"You know I'm Test, right?"

Discord Example

const Discord = require("discord.js");
const client = new Discord.Client({intents: ["GUILDS", "GUILD_MESSAGES"]});

const Chat = require("pop-cat-chat");
const chat = new Chat({ name: "Your Bot Name" });

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

client.on("messageCreate", 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");
1.3.0

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.1.1

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago