Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/35.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js 错误:EACCES:权限被拒绝,打开'/giveaways.json';启动discord.js bot时_Node.js_Permissions_Bots_Discord.js - Fatal编程技术网

Node.js 错误:EACCES:权限被拒绝,打开'/giveaways.json';启动discord.js bot时

Node.js 错误:EACCES:权限被拒绝,打开'/giveaways.json';启动discord.js bot时,node.js,permissions,bots,discord.js,Node.js,Permissions,Bots,Discord.js,我正在编写discord.js bot,对于我的一个命令,我有以下错误: 错误:EACCES:权限被拒绝,打开“/givaways.json” 这是我的密码: const fs=require(“fs”); const{join}=require('path'); //const Giveaway=require(“../structure/Giveaway.js”); //const cache=require(“../cache.json”); 赠品=要求(“不和谐赠品”); const g

我正在编写discord.js bot,对于我的一个命令,我有以下错误:

错误:EACCES:权限被拒绝,打开“/givaways.json”

这是我的密码:

const fs=require(“fs”);
const{join}=require('path');
//const Giveaway=require(“../structure/Giveaway.js”);
//const cache=require(“../cache.json”);
赠品=要求(“不和谐赠品”);
const giveJson=require(“../giveaways.json”);
module.exports=class{
建造商(客户){
this.client=client;
}
运行(){
试一试{
this.client.user.setPresence({
游戏:{
名称:“地雷船地球”,
类型:“播放”,
},
状态:“在线”,
});
log(`${this.client.user.tag}connecté!`);
发布(this.client{
更新计数每小时:5000,
博茨坎温:错,
ignoreIfHasPermission:[],
嵌入颜色:“1A61BB”,

反应:“包含您发送的代码的文件是什么?代码在“ready.js”中。请尝试使用文件的完整路径(
/Users/LePtitMetalleux/bot/../givaways.json
)谢谢,我的问题现在已经解决了。bot我有:未处理的退出错误:未定义:c我会自己找到谢谢