File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ export const command: PSCommand[] = IS_ENABLED.DB
5959 perms,
6060 async run ( { message, arg, checkPermissions, $T } ) {
6161 const userList = arg . split ( ',' ) ;
62- const users = userList . map ( toId ) ;
62+ const users = userList . map ( toId ) . filter ( Boolean ) ;
6363 if ( ! users . length ) throw new ChatError ( 'Who do you want to promote?' as ToTranslate ) ;
6464 const roomConfig = PSRoomConfigs [ message . target . id ] ;
6565 if ( roomConfig ?. auth ) {
@@ -93,7 +93,7 @@ export const command: PSCommand[] = IS_ENABLED.DB
9393 category : [ 'utility' ] ,
9494 async run ( { message, arg, checkPermissions, $T } ) {
9595 const userList = arg . split ( ',' ) ;
96- const users = userList . map ( toId ) ;
96+ const users = userList . map ( toId ) . filter ( Boolean ) ;
9797 if ( ! users . length ) throw new ChatError ( 'Who do you want to promote?' as ToTranslate ) ;
9898 const roomConfig = PSRoomConfigs [ message . target . id ] ;
9999 if ( roomConfig ?. auth ) {
You can’t perform that action at this time.
0 commit comments