nidhishpackage
Version:
This is a fun package for [Discord](https://discord.com) The library is [Discord.js](https://discord.js.org)
18 lines (15 loc) • 620 B
JavaScript
async function chatbot(message){
require(`../../index`)
const ms = require(`ms`)
const { MessageEmbed } = require(`discord.js`)
if(!message){
throw new ReferenceError('Nidhish Err "message" is not defined');
}
const fetch = require(`node-fetch`)
fetch(`https://api.affiliateplus.xyz/api/chatbot?message=${encodeURIComponent(message.content)}&botname=yourbot&ownername=yourname`)
.then(res => res.json())
.then(data => {
message.noMentionReply(data.message);
}, ms("0.8s"));
}
module.exports = chatbot