2.1.1 • Published 2 years ago

botbuddy v2.1.1

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

#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

2.0.3

2 years ago

2.1.1

2 years ago

2.0.2

2 years ago

2.0.5

2 years ago

2.0.4

2 years ago

2.0.7

2 years ago

2.0.6

2 years ago

2.0.9

2 years ago

2.0.10

2 years ago

2.0.8

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.0.1

3 years ago

1.0.0

3 years ago