1.8.6 • Published 5 years ago
stops-djs-prefab v1.8.6
Table of contents
Installation
npm install stops-djs-prefab
Usage
Index
const Discord = require('discord.js')
const client = new Discord.Client()
const botPrefab = require('stops-djs-prefab')
new botPrefab(client, {
commandsDir: 'commands' // Commands Directory
eventsDir: 'events'
})
.setToken('super secret token') // logs your bot in (EXPERIMENTAL!)
.setPrefix('>') // sets prefix
.setMongoURI('MONGOURI') // Must have a mongo server up and running!
.showWarnings(false) // If set to false warnings will not show. Set to true by default.
.showLoadedCommands(false) // If set to false it will not log all commands that were successfully loaded. Set to true by default.
.showLoadedEvents(false) // If set to false it will not log all events that were successfully loaded. Set to true by default.
.setOwners(['123456789123456789']) // Sets bot owners for owneronly commands.Making a command
Command File in Commands Directory:
module.exports = {
name: 'ping',
aliases: 'p',
execute({ message, args, client }) {
message.reply('Pong!!')
}
}Making an event
Event File in Events Directory called (message.js):
module.exports = (client, handler, message) => {
console.log('Successfully cached message!')
message.channel.send('Hello!') // I DO NOT RECOMMEND DOING THIS. IT WILL LEAD TO RATE LIMITS (if there is a very active chat) AND/OR CONFUSION IN ALL PARTIES.
}1.8.6
5 years ago
1.8.5
5 years ago
1.8.4
5 years ago
1.8.3
5 years ago
1.8.2
5 years ago
1.8.1
5 years ago
1.8.0
5 years ago
1.7.3
5 years ago
1.7.2
5 years ago
1.7.1
5 years ago
1.7.0
5 years ago
1.6.1
5 years ago
1.6.0
5 years ago
1.7.7
5 years ago
1.7.6
5 years ago
1.7.5
5 years ago
1.7.4
5 years ago
1.5.1
5 years ago
1.5.0
5 years ago
1.4.7
5 years ago
1.4.6
5 years ago
1.4.5
5 years ago
1.4.3
5 years ago
1.4.2
5 years ago
1.4.1
5 years ago
1.4.0
5 years ago
1.3.2
5 years ago
1.3.1
5 years ago
1.3.0
5 years ago
1.2.0
5 years ago
1.1.3
5 years ago
1.1.2
5 years ago
1.1.1
5 years ago
1.1.0
5 years ago
1.0.3
5 years ago
1.0.2
5 years ago
1.0.1
5 years ago
1.0.0
5 years ago