首页 > 解决方案 > Ascii Tables 没有返回它应该返回的内容

问题描述

(await PG(`${process.cwd()}/Commands/*/*.js`)).map(async (file) => {
        const command = require(file);

        if(!command.name)
        return Table.addRow(file.split("/")[7], "FAILED", "Missing a name.")

        if(!command.description)
        return Table.addRow(command.name, "FAILED", "Missing a description.")

        if(command.permission) {
            if(Perms.includes(command.permission))
            command.defaultPermission = false;
            else 
            return Table.addRow(command.name, "FAILED", "Permission is invalid.")
        }

        client.commands.set(command.name, command);
        CommandsArray.push(command);

        await Table.addRow(command.name, "SUCCESFUL");

    });
    

这是回归

.
||
|
'

基本上,我想记录一个命令处理程序,但它不起作用,也不会加载我的命令。

标签: node.jsdiscord.jsascii

解决方案


推荐阅读