File tree Expand file tree Collapse file tree 1 file changed +14
-12
lines changed
Expand file tree Collapse file tree 1 file changed +14
-12
lines changed Original file line number Diff line number Diff line change @@ -179,18 +179,20 @@ client
179179 . on ( Events . ClientReady , ( ) => logger . info ( 'Client#ready' ) )
180180 . on ( Events . InteractionCreate , async interaction => {
181181 if ( interaction . user . bot ) return ;
182- const blacklisted = ( await db . get < Snowflake [ ] > ( [ DatabaseKeys . Blacklist ] ) )
183- ?. value ;
184- if (
185- ( blacklisted ?? [ ] ) . includes ( interaction . user . id ) &&
186- interaction . isCommand ( )
187- ) {
188- await interaction . reply ( {
189- content : 'You are blacklisted from using this bot.' ,
190- ephemeral : true
191- } ) ;
192- return ;
193- }
182+ try {
183+ const blacklisted = ( await db . get < Snowflake [ ] > ( [ DatabaseKeys . Blacklist ] ) ) ?. value ;
184+ if (
185+ ( blacklisted ?? [ ] ) . includes ( interaction . user . id ) &&
186+ interaction . isCommand ( )
187+ ) {
188+ await interaction . reply ( {
189+ content : 'You are blacklisted from using this bot.' ,
190+ ephemeral : true
191+ } ) ;
192+ return ;
193+ }
194+ } catch ( e ) { logger . error ( e ) ; }
195+
194196 if ( interaction . isChatInputCommand ( ) ) {
195197 const command = client . commands . get ( interaction . commandName ) ;
196198 if ( ! command ) {
You can’t perform that action at this time.
0 commit comments