Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug #3

Open
Bubbleyur opened this issue Mar 21, 2023 · 3 comments
Open

Bug #3

Bubbleyur opened this issue Mar 21, 2023 · 3 comments

Comments

@Bubbleyur
Copy link

Bubbleyur commented Mar 21, 2023

just change the loadDatabase.js and loadCommand.js

---------for loadDatabase.js

const mongoose = require('mongoose');
const { MONGO_URI } = require('../settings/config.js');
const { white, green } = require('chalk');

mongoose.set('strictQuery', true)
module.exports = async () => {
    try {
        await mongoose.connect(MONGO_URI);
        console.log(white('[') + green('INFO') + white('] ') + green('Database ') + white('Events') + green(' Loaded!'));
    } catch (error) {
        console.log(error);
    }
} 

---------for loadCommand.js

const { white, green } = require("chalk");
const { readdirSync } = require('fs');

module.exports = async (client) => {
    readdirSync("./commands/").map(async dir => {
        const commands = readdirSync(`./commands/${dir}/`).map(async (cmd) => {
            const pull = require(`../commands/${dir}/${cmd}`)
            client.slash.set(pull.name, pull);
            if (pull.aliases) {
                pull.aliases.map(x => client.slash.set(x, pull));
            }
        });
    })
    console.log(white('[') + green('INFO') + white('] ') + green('SlashCommand ') + white('Events') + green(' Loaded!'));
}
@Adivise
Copy link
Owner

Adivise commented Mar 21, 2023

what do you mean?

@Bubbleyur
Copy link
Author

so something bugged when I started the bot and I just fixed the bug myself. the problem is at the loadDatabase.js(strictQuery:true) and loadCommand.js(wrong capitalize)

@Adivise
Copy link
Owner

Adivise commented Mar 23, 2023

here i rest now, if i have a time i will release the big update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants