@japofc/baileys - v2.4.7
GitHub
npm
Preparing search index...
Router
Interface Router
interface
Router
{
attach
(
sock
:
any
)
:
()
=>
void
;
command
(
names
:
string
|
string
[]
,
handler
:
(
ctx
:
RouterContext
)
=>
any
,
opts
?:
RouterCommandOptions
,
)
:
Router
;
handle
(
sock
:
any
,
webMessage
:
any
)
:
Promise
<
boolean
>
;
list
()
:
{
adminOnly
:
boolean
;
category
:
string
;
cooldownMs
:
number
;
desc
:
string
;
dmOnly
:
boolean
;
groupOnly
:
boolean
;
hidden
:
boolean
;
names
:
string
[]
;
ownerOnly
:
boolean
;
}
[]
;
remove
(
name
:
string
)
:
boolean
;
use
(
mw
:
(
ctx
:
RouterContext
,
next
:
()
=>
Promise
<
void
>
)
=>
any
)
:
Router
;
}
Index
Methods
attach
command
handle
list
remove
use
Methods
attach
attach
(
sock
:
any
)
:
()
=>
void
Parameters
sock
:
any
Returns
()
=>
void
command
command
(
names
:
string
|
string
[]
,
handler
:
(
ctx
:
RouterContext
)
=>
any
,
opts
?:
RouterCommandOptions
,
)
:
Router
Parameters
names
:
string
|
string
[]
handler
:
(
ctx
:
RouterContext
)
=>
any
Optional
opts
:
RouterCommandOptions
Returns
Router
handle
handle
(
sock
:
any
,
webMessage
:
any
)
:
Promise
<
boolean
>
Parameters
sock
:
any
webMessage
:
any
Returns
Promise
<
boolean
>
list
list
()
:
{
adminOnly
:
boolean
;
category
:
string
;
cooldownMs
:
number
;
desc
:
string
;
dmOnly
:
boolean
;
groupOnly
:
boolean
;
hidden
:
boolean
;
names
:
string
[]
;
ownerOnly
:
boolean
;
}
[]
Returns
{
adminOnly
:
boolean
;
category
:
string
;
cooldownMs
:
number
;
desc
:
string
;
dmOnly
:
boolean
;
groupOnly
:
boolean
;
hidden
:
boolean
;
names
:
string
[]
;
ownerOnly
:
boolean
;
}
[]
remove
remove
(
name
:
string
)
:
boolean
Unregister a command and all its aliases.
Parameters
name
:
string
Returns
boolean
use
use
(
mw
:
(
ctx
:
RouterContext
,
next
:
()
=>
Promise
<
void
>
)
=>
any
)
:
Router
Parameters
mw
:
(
ctx
:
RouterContext
,
next
:
()
=>
Promise
<
void
>
)
=>
any
Returns
Router
Settings
Member Visibility
Protected
Inherited
Theme
OS
Light
Dark
On This Page
Methods
attach
command
handle
list
remove
use
GitHub
npm
@japofc/baileys - v2.4.7
Loading...
Unregister a command and all its aliases.