@@ -70,7 +70,14 @@ export default class PermissionManager extends BotComponent {
7070 deny : [ Discord . PermissionsBitField . Flags . EmbedLinks , Discord . PermissionsBitField . Flags . AttachFiles ] ,
7171 } ,
7272 [ this . wheatley . roles . moderators . id ] : {
73- allow : [ Discord . PermissionsBitField . Flags . ManageThreads , Discord . PermissionsBitField . Flags . ViewChannel ] ,
73+ allow : [
74+ Discord . PermissionsBitField . Flags . ViewChannel ,
75+ Discord . PermissionsBitField . Flags . ManageThreads ,
76+ Discord . PermissionsBitField . Flags . Connect ,
77+ Discord . PermissionsBitField . Flags . Speak ,
78+ Discord . PermissionsBitField . Flags . Stream ,
79+ SET_VOICE_STATUS_PERMISSION_BIT ,
80+ ] ,
7481 } ,
7582 } ;
7683 const off_topic_permissions : permission_overwrites = {
@@ -111,32 +118,26 @@ export default class PermissionManager extends BotComponent {
111118 ] ,
112119 } ,
113120 } ;
121+ const acive_voice_permissions = [
122+ Discord . PermissionsBitField . Flags . Speak ,
123+ Discord . PermissionsBitField . Flags . Stream ,
124+ ] ;
114125 const voice_permissions : permission_overwrites = {
115126 ...default_permissions ,
116127 [ this . wheatley . guild . roles . everyone . id ] : {
117- deny : [ SET_VOICE_STATUS_PERMISSION_BIT ] ,
128+ deny : [ ... acive_voice_permissions , SET_VOICE_STATUS_PERMISSION_BIT ] ,
118129 } ,
130+ [ this . wheatley . roles . voice . id ] : { allow : acive_voice_permissions } ,
131+ [ this . wheatley . skill_roles . intermediate . id ] : { allow : acive_voice_permissions } ,
132+ [ this . wheatley . skill_roles . proficient . id ] : { allow : acive_voice_permissions } ,
133+ [ this . wheatley . skill_roles . advanced . id ] : { allow : acive_voice_permissions } ,
134+ [ this . wheatley . skill_roles . expert . id ] : { allow : acive_voice_permissions } ,
135+ [ this . wheatley . roles . server_booster . id ] : { allow : acive_voice_permissions } ,
119136 [ this . wheatley . roles . no_voice . id ] : no_interaction_at_all ,
120137 [ this . wheatley . roles . no_off_topic . id ] : no_interaction_at_all ,
121- [ this . wheatley . roles . moderators . id ] : {
122- allow : [
123- Discord . PermissionsBitField . Flags . ViewChannel ,
124- Discord . PermissionsBitField . Flags . Connect ,
125- SET_VOICE_STATUS_PERMISSION_BIT ,
126- ] ,
127- } ,
128- } ;
129- const member_voice_channel : permission_overwrites = {
130- ...voice_permissions ,
131- [ this . wheatley . guild . roles . everyone . id ] : {
132- deny : [ Discord . PermissionsBitField . Flags . ViewChannel , SET_VOICE_STATUS_PERMISSION_BIT ] ,
138+ [ this . wheatley . roles . voice_deputy . id ] : {
139+ allow : [ ...acive_voice_permissions , SET_VOICE_STATUS_PERMISSION_BIT ] ,
133140 } ,
134- [ this . wheatley . roles . voice_deputy . id ] : { allow : [ Discord . PermissionsBitField . Flags . ViewChannel ] } ,
135- [ this . wheatley . skill_roles . intermediate . id ] : { allow : [ Discord . PermissionsBitField . Flags . ViewChannel ] } ,
136- [ this . wheatley . skill_roles . proficient . id ] : { allow : [ Discord . PermissionsBitField . Flags . ViewChannel ] } ,
137- [ this . wheatley . skill_roles . advanced . id ] : { allow : [ Discord . PermissionsBitField . Flags . ViewChannel ] } ,
138- [ this . wheatley . skill_roles . expert . id ] : { allow : [ Discord . PermissionsBitField . Flags . ViewChannel ] } ,
139- [ this . wheatley . roles . server_booster . id ] : { allow : [ Discord . PermissionsBitField . Flags . ViewChannel ] } ,
140141 } ;
141142 const mod_only_channel : permission_overwrites = {
142143 [ this . wheatley . guild . roles . everyone . id ] : {
@@ -308,9 +309,6 @@ export default class PermissionManager extends BotComponent {
308309 // bot dev overrides
309310 this . add_channel_overwrite ( this . wheatley . channels . bot_dev_internal , mod_only_channel ) ;
310311 // voice overrides
311- this . add_channel_overwrite ( this . wheatley . channels . chill , member_voice_channel ) ;
312- this . add_channel_overwrite ( this . wheatley . channels . work_3 , member_voice_channel ) ;
313- this . add_channel_overwrite ( this . wheatley . channels . work_4 , member_voice_channel ) ;
314312 this . add_channel_overwrite ( this . wheatley . channels . afk , {
315313 [ this . wheatley . guild . roles . everyone . id ] : {
316314 deny : [
0 commit comments