我正在尝试创建新频道并覆盖@everyone
的权限,以便只有所选角色才能访问该频道。无论我尝试什么,似乎通道权限保持不变。最近2次尝试:
Guild.createChannel(permName, 'text',[{
type: 'role',
id:359999680677019649,
deny:0x400
}])
.then(channel => console.log(`Created new channel ${channel}`))
.catch(console.error);
/////////
Guild.createChannel(permName, 'text',[{
type: 'role',
id:359999680677019649,
permissions:1024
}])
.then(channel => console.log(`Created new channel ${channel}`))
.catch(console.error);
答案 0 :(得分:2)
ID字段必须是字符串。
Guild.createChannel(permName, 'text',[{
type: 'role',
id:'359999680677019649',
deny:0x400
}])
.then(channel => console.log(`Created new channel ${channel}`))
.catch(console.error);