File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed
Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,13 @@ const handleVcJoin = (async (oldState: VoiceState, newState: VoiceState) => {
1313 type : ChannelType . GuildVoice ,
1414 parent : newState . channel . parentId ?? undefined ,
1515 permissionOverwrites : [
16+ {
17+ id : botConfig . role . memberId ,
18+ allow : [
19+ PermissionFlagsBits . ViewChannel ,
20+ PermissionFlagsBits . Connect
21+ ] ,
22+ } ,
1623 {
1724 id : newState . member ?. id || newState . member ?. user . id || "" ,
1825 allow : [
@@ -22,18 +29,13 @@ const handleVcJoin = (async (oldState: VoiceState, newState: VoiceState) => {
2229 PermissionFlagsBits . ManageChannels ,
2330 ] ,
2431 } ,
25- {
26- id : newState . guild . roles . everyone . id ,
27- deny : [ PermissionFlagsBits . ViewChannel ] ,
28- } ,
29- {
30- id : botConfig . role . memberId ,
31- allow : [ PermissionFlagsBits . ViewChannel , PermissionFlagsBits . Connect ] ,
32- }
3332 ] ,
3433 } ) ;
3534
3635 await newState . member ?. voice . setChannel ( channel ) ;
36+ await channel . permissionOverwrites . create ( newState . guild . roles . everyone , {
37+ ViewChannel : false ,
38+ } ) ;
3739 } catch ( error ) {
3840 console . error ( "vc-join: チャンネル作成に失敗しました:" , error ) ;
3941 }
You can’t perform that action at this time.
0 commit comments