1.8.6 • Published 3 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
3 years ago
1.8.5
3 years ago
1.8.4
3 years ago
1.8.3
3 years ago
1.8.2
3 years ago
1.8.1
3 years ago
1.8.0
3 years ago
1.7.3
3 years ago
1.7.2
3 years ago
1.7.1
3 years ago
1.7.0
3 years ago
1.6.1
3 years ago
1.6.0
3 years ago
1.7.7
3 years ago
1.7.6
3 years ago
1.7.5
3 years ago
1.7.4
3 years ago
1.5.1
3 years ago
1.5.0
3 years ago
1.4.7
3 years ago
1.4.6
3 years ago
1.4.5
3 years ago
1.4.3
3 years ago
1.4.2
3 years ago
1.4.1
3 years ago
1.4.0
3 years ago
1.3.2
3 years ago
1.3.1
3 years ago
1.3.0
3 years ago
1.2.0
3 years ago
1.1.3
3 years ago
1.1.2
3 years ago
1.1.1
3 years ago
1.1.0
3 years ago
1.0.3
3 years ago
1.0.2
3 years ago
1.0.1
3 years ago
1.0.0
3 years ago