shevdev
v1.1.11
Published
<a href="https://discord.com/invite/aKeMQtzabu"><img src="https://img.shields.io/discord/780753544537178112?color=7289da&logo=discord&logoColor=white" alt="Discord server" /></a> <a href="https://www.patreon.com/shevdev"><img src="https://img.shields.io/
Downloads
2
Readme
shevdev 🚀
shevdev is a module for Discord.JS with wide functionality to enrich your bot with unique systems. Such as artificial intelligence, distribution of quotes and much more thanks to our community.
Table of Contents 💡
- Community - get closer to this project.
- Installation - loading module shevdev.
- Setup - connection to MongoDB
- ChatBot - saving phrases and generating their own.
- QuotesGenerate - will display quotes from popular people.
- AllMethods - list of all methods at the moment.
Community ❤️
Feel free and land with our community of programmers: https://discord.com/invite/aKeMQtzabu
Installation
First of all, install Node.JS
npm install shevdev
Setup
// import a shevdev module
const shevdev = require('shevdev')
// connection to MongoDB
new shevdev({
mongoDB: 'your connection'
})
ChatBot
Example for update AI chatbot:
Be sure to start with this so that you have a database created.
// import a shevdev module
const shevdev = require("shevdev")
// Using message event
client.on('message', (message) => {
// Checking that the bot's sentences
// are not entered into the database
if(message.author.bot) return
// Using the updateAI method,
// we enter the necessary proposals into the database.
shevdev.updateAI(message.guild.id, message.content)
})
Communicating with guild members:
// import a shevdev module
const shevdev = require('shevdev')
// I am using WOKCommands framework.
module.exports = {
name: 'chatbot',
callback: async({message}) => {
// Using the chatbot method
// we generate text from the database
// for the appropriate context.
const chatBot = await shevdev.chatbot(message.guild.id, message)
message.channel.send(chatBot)
}
}
QuotesGenerate
Example for generate a random quotes:
// import a shevdev module
// Now only supports Russian quotes.
const shevdev = require('shevdev')
// I am using WOKCommands framework
module.exports = {
name: 'quotes',
callback: async({message}) => {
// Now we can get a quote from
// a famous person and not only
const quot = await shevdev.quotes()
message.reply(quot)
}
}
AllMethods
.updateAI
// Update AI your bot.
shevdev.updateAI(guildID, message)
.chatbot
// Makes a kind and smart sentences.
shevdev.chatbot(guildID, message)
.quotes
// Generate a random popular quotes.
shevdev.quotes()