node.js - 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");
});
这是回归
.
||
|
'
基本上,我想记录一个命令处理程序,但它不起作用,也不会加载我的命令。
解决方案
推荐阅读
- kubernetes - 在我使用 helm Charts 安装 k8s 后,LoadBalancer 'EXTERNAL IP" 处于挂起状态
- android - 执行 eSIM 交换
- python - model_dir 属性未使用 Python Sagemaker SDK 将模型发送到 S3 存储桶
- php - PHP在第一个查询中获取最后一个插入ID并在第二个多行查询中执行它
- protocol-buffers - 在 gRPC/proto3 中设置 oneof 请求的更有效方法
- c++ - 在 vscode 中运行时无法暂停或设置断点
- symfony - 从生成的类中加载 Doctrine 实体
- swift - 如何将 Carthage 支持添加到 SPM 依赖项?
- maven - 从 springtestdbunit 收集依赖项失败
- c# - 从集合对象中获取属性值