1.0.1 • Published 3 years ago
thisiskevin v1.0.1
thisiskevin
A simple chatbot package that I made for a friend.
Install
npm i thisiskevin
Getting started
const Discord = require("discord.js");
const client = new Discord.Client();
const kevin = require("thisiskevin");
client.on("ready", () => {
console.log(`${client.user.tag} is online!`)
});
client.on("message", async (message) => {
let channel = client.channels.cache.get("CHANNEL_ID")
if (message.channel.id == channel.id) {
let text = message.content;
channel.startTyping();
var reply = await kevin.startchatting(`${text}`);
channel.send(`${message.author}, ${reply}`);
message.channel.stopTyping();
}
});
client.login("TOKEN")