1- import { Message } from "../types/message"
1+ import { Message } from "../types/message" ;
22import log from "../components/utils/log" ;
33import { commands } from "../components/utils/cmd/loader" ;
44
55export const info = {
66 command : "help" ,
77 description : "List available commands and their usage." ,
8- usage : "help [page] | --[ role] | [ command]" ,
9- example : "help -- admin" ,
8+ usage : "help [page| role| command]" ,
9+ example : "help admin" ,
1010 role : "user" ,
1111 cooldown : 5000 ,
1212} ;
@@ -77,7 +77,7 @@ export default async function (msg: Message): Promise<void> {
7777 }
7878
7979 // help admin
80- if ( / ^ - - a d m i n $ / i. test ( query ) ) {
80+ if ( / ^ a d m i n $ / i. test ( query ) ) {
8181 const adminCommands = Object . values ( commands )
8282 . filter ( ( cmd : CommandType ) => cmd . role === "admin" )
8383 . map ( ( cmd : CommandType ) => cmd . command )
@@ -103,10 +103,10 @@ export default async function (msg: Message): Promise<void> {
103103 . map ( ( cmd : CommandType ) => cmd . command )
104104 . sort ( ( a , b ) => a . localeCompare ( b ) ) ;
105105
106- userCommands . unshift ( "-- admin" ) ;
107- userCommands . unshift ( "-- super-admin" ) ;
106+ userCommands . unshift ( "admin" ) ;
107+ userCommands . unshift ( "super-admin" ) ;
108108
109- if ( userCommands . length == 0 ) {
109+ if ( Object . values ( commands ) . length = == 0 ) {
110110 await msg . reply ( `The *${ page } * is obviously is not our bot bounds.` ) ;
111111 return ;
112112 }
0 commit comments