File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -6,17 +6,19 @@ import type { PSCommand } from '@/types/chat';
66
77export const command : PSCommand = {
88 name : 'alts' ,
9- help : 'Testing command' ,
10- syntax : 'CMD USERNAME? ' ,
9+ help : "Lists a user's alts. Requires trusted perms to view beyond your own." ,
10+ syntax : 'CMD [user?] ' ,
1111 aliases : [ 'getalts' ] ,
1212 categories : [ 'utility' ] ,
1313 async run ( { message, arg, $T, checkPermissions } ) {
1414 let lookup = message . author . userid ;
1515 if ( arg ) {
16- if ( ! checkPermissions ( [ 'room' , 'driver' ] ) ) throw new ChatError ( $T ( 'ACCESS_DENIED' ) ) ;
16+ // TODO: Change this to use _any_ room
17+ if ( ! checkPermissions ( [ 'room' , 'driver' ] ) && ! checkPermissions ( [ 'global' , 'voice' ] ) ) throw new ChatError ( $T ( 'ACCESS_DENIED' ) ) ;
1718 lookup = toId ( arg ) ;
1819 }
1920 const altsList = await getAlts ( lookup ) ;
20- message . reply ( $T ( 'COMMANDS.ALTS' , { alts : altsList . join ( ', ' ) } ) ) ;
21+ // TODO: Handle no-alts case
22+ message . privateReply ( $T ( 'COMMANDS.ALTS' , { alts : altsList . join ( ', ' ) } ) ) ;
2123 } ,
2224} ;
You can’t perform that action at this time.
0 commit comments