Chgange plugin loakder

This commit is contained in:
7cc5c4f330d47060 2024-08-17 09:56:26 -04:00
parent 1631d3cb9d
commit 3a76b57b33
Signed by: 7cc5c4f330d47060
SSH key fingerprint: SHA256:e+4tcZut1nBpe10PqjaO+Rvie0Q7W4qIvFzcUw+7riA

View file

@ -6,17 +6,18 @@ const fs = require('fs')
module.exports.bot = []
const loadplug = (botno) => {
const botplug = []
const bpl = fs.readdirSync('plugins')
for (const i in bpl) {
if (!bpl[i].endsWith('.js')) {
continue
}
try {
botplug.push(require(`./plugins/${bpl[i]}`))
} catch (e) { console.log(e) }
const botplug = []
const bpl = fs.readdirSync('plugins')
for (const i in bpl) {
if (!bpl[i].endsWith('.js')) {
continue
}
try {
botplug.push(require(`./plugins/${bpl[i]}`))
} catch (e) { console.log(e) }
}
const loadplug = (botno) => {
botplug.forEach((plug) => {
try {
if (plug.load) {