Search
Preparing search index...
The search index is not available
Sociably
Options
All
Public
Public/Protected
All
Inherited
Externals
Menu
Sociably
websocket
WebSocketBot
Class WebSocketBot
Hierarchy
WebSocketBot
Implements
SociablyBot
<
WebSocketDispatchChannel
,
WebSocketJob
,
WebSocketResult
>
Index
Constructors
constructor
Properties
engine
platform
Methods
disconnect
render
send
send
Topic
send
User
start
stop
subscribe
Topic
unsubscribe
Topic
Constructors
constructor
new
Web
Socket
Bot
(
server
:
ServerP
<
any
,
unknown
>
, initScope
?:
InitScopeFn
, dispatchWrapper
?:
DispatchWrapper
<
WebSocketJob
,
WebSocketDispatchFrame
,
WebSocketResult
>
)
:
WebSocketBot
Parameters
server:
ServerP
<
any
,
unknown
>
Optional
initScope:
InitScopeFn
Optional
dispatchWrapper:
DispatchWrapper
<
WebSocketJob
,
WebSocketDispatchFrame
,
WebSocketResult
>
Returns
WebSocketBot
Properties
engine
engine
:
default
<
WebSocketDispatchChannel
,
EventInput
,
WebSocketComponent
,
WebSocketJob
,
WebSocketResult
>
platform
platform
:
"websocket"
= WEBSOCKET
Methods
disconnect
disconnect
(
connection
:
WebSocketConnection
, reason
?:
string
)
:
Promise
<
boolean
>
Parameters
connection:
WebSocketConnection
Optional
reason:
string
Returns
Promise
<
boolean
>
render
render
(
channel
:
WebSocketDispatchChannel
, message
:
SociablyNode
)
:
Promise
<
null
|
WebSocketDispatchResponse
>
Parameters
channel:
WebSocketDispatchChannel
message:
SociablyNode
Returns
Promise
<
null
|
WebSocketDispatchResponse
>
send
send
(
channel
:
WebSocketConnection
, content
:
EventInput
|
EventInput
[]
)
:
Promise
<
SendResult
>
Parameters
channel:
WebSocketConnection
content:
EventInput
|
EventInput
[]
Returns
Promise
<
SendResult
>
send
Topic
send
Topic
(
topic
:
string
, content
:
EventInput
|
EventInput
[]
)
:
Promise
<
SendResult
>
Parameters
topic:
string
content:
EventInput
|
EventInput
[]
Returns
Promise
<
SendResult
>
send
User
send
User
(
user
:
SociablyUser
, content
:
EventInput
|
EventInput
[]
)
:
Promise
<
SendResult
>
Parameters
user:
SociablyUser
content:
EventInput
|
EventInput
[]
Returns
Promise
<
SendResult
>
start
start
(
)
:
Promise
<
void
>
Returns
Promise
<
void
>
stop
stop
(
)
:
Promise
<
void
>
Returns
Promise
<
void
>
subscribe
Topic
subscribe
Topic
(
connection
:
WebSocketConnection
, topic
:
string
)
:
Promise
<
boolean
>
Parameters
connection:
WebSocketConnection
topic:
string
Returns
Promise
<
boolean
>
unsubscribe
Topic
unsubscribe
Topic
(
connection
:
WebSocketConnection
, topic
:
string
)
:
Promise
<
boolean
>
Parameters
connection:
WebSocketConnection
topic:
string
Returns
Promise
<
boolean
>
Modules
auth
core
create-
app
dev-
tools
dialogflow
http
line
messenger
next
redis-
state
script
stream
telegram
twitter
websocket
websocket/broker/
Local
Only
Broker
websocket/client
websocket/utils
default
webview
Web
Socket
Bot
constructor
engine
platform
disconnect
render
send
send
Topic
send
User
start
stop
subscribe
Topic
unsubscribe
Topic
Generated using
TypeDoc