2.1.1 • Published 2 years ago
botbuddy v2.1.1
#What is this?
BotBuddy is a set of tools and features wrapped around regular java script and discord.js, this npm should allow for easy creation of a discord bot as well as many more quick tricks like sorting a java script array from smallest to biggest.
Installation
npm i botbuddy --save
Use
const BotBuddy = require("botbuddy")
//setup settings
BotBuddy.bot.name = 'BotName';
BotBuddy.bot.client = DiscordClientObject;
BotBuddy.bot.invite = 'https://9000inc.com/9k';
BotBuddy.bot.serverinvite = 'https://9000inc.com/Discord';
BotBuddy.bot.image = 'https://9000inc.com/Resources/9kbotlogo.png'
BotBuddy.bot.images = [BotBuddy.bot.image]
BotBuddy.bot.server.id = 440275828509507597;
BotBuddy.bot.website = 'https://9000inc.com';
BotBuddy.debug = false;
BotBuddy.bot.prefix = ['']
BotBuddy.startup = true;
BotBuddy.credits = true;
//Functions
BotBuddy.js.cbs('ReMoVeThIsHello', 'removethis')//returns Hello
BotBuddy.js.strmatch('FindTheKey!', ['Key', 'Another Search'])//returns true on the first key word
BotBuddy.js.stris('key', ['key', 'Another Search'])//returns true on the first key word
BotBuddy.djs.msg(DiscordChannelObject, 'Message').then(Response => {console.log('Just making sure it sent!' + JSON.stringify(Response))})//Sends a message to discord using discord.js api .then verifies the message was sent / allows further actions
//Create Embed Object and edit values
var Embed = {}
Embed.Title = 'This is the title up top!';
Embed.URL = '';//makes title a hyper link leave blank for no link
Embed.Description = `description is a good area to put lots of text! :D`
Embed.Color = BotBuddy.bot.embed.colors.red//based on discord embed colors
//BotBuddy.djs.createembed <- create and return 'proper' discord embed objects
//Embed.forEach <- depending on embed size multiple may be needed to send all the data so we need a for each statement
//BotBuddy.djs.msg <- send each embed as you would a regular message
BotBuddy.djs.createembed(Embed).then(Embed => {
Embed.forEach(function(EMB){BotBuddy.djs.msg(DiscordChannelObject, EMB)})
})
Issues? D:
API / Docs will be hosted at 9000inc - BotBuddy talk directly to the main developer me at my discord :D A pretty cool discord