File tree Expand file tree Collapse file tree 1 file changed +1
-14
lines changed
src/modules/voiceOnDemand Expand file tree Collapse file tree 1 file changed +1
-14
lines changed Original file line number Diff line number Diff line change @@ -84,29 +84,16 @@ export const voiceOnDemand = createModule({
84
84
}
85
85
86
86
const lobbyIds = await cache . get ( 'lobbyIds' , [ ] ) ;
87
- const onDemandChannels = await cache . get ( 'onDemandChannels' , [ ] ) ;
88
-
89
87
const isLobbyChannel = lobbyIds . includes ( channel . id ) ;
90
- const isOnDemandChannel = onDemandChannels . includes ( channel . id ) ;
91
88
92
- if ( ! isOnDemandChannel && ! isLobbyChannel ) {
89
+ if ( ! isLobbyChannel ) {
93
90
return ;
94
91
}
95
92
96
93
await cache . set (
97
94
'lobbyIds' ,
98
95
lobbyIds . filter ( ( lobbyId ) => lobbyId !== channel . id ) ,
99
96
) ;
100
-
101
- await Promise . all (
102
- onDemandChannels . map ( async ( id ) => {
103
- const updatedChannel = await channel . guild . channels . fetch ( id ) . catch ( ( ) => null ) ;
104
- if ( updatedChannel !== null ) {
105
- await channel . guild . channels . delete ( id ) ;
106
- channel . guild . channels . cache . delete ( id ) ;
107
- }
108
- } ) ,
109
- ) ;
110
97
} ,
111
98
} ) ,
112
99
intents : [ 'GuildVoiceStates' , 'GuildMembers' ] ,
You can’t perform that action at this time.
0 commit comments