2017-09-22 9 views
0

新しいチャネルを作成しようとしましたが、選択した役割だけがチャネルにアクセスできるように、アクセス許可を上書きします。@everyone私が何を試みても、チャンネルのパーミッションは変更されていないようです。最後の2回:discord.jsチャネル許可を作成して上書きする

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

ボットにチャンネルを作成してもらいたいのですが、ロールを持つ人だけが見ることができますか?役割のない人はチャンネルを見ることができません。 – WQYeo

答えて

1

IDフィールドは文字列でなければなりません。

Guild.createChannel(permName, 'text',[{ 
    type: 'role', 
    id:'359999680677019649', 
    deny:0x400 
    }]) 
    .then(channel => console.log(`Created new channel ${channel}`)) 
    .catch(console.error); 
関連する問題