OneSDK
Preparing search index...
types/Plugin
OnePlugin
Interface OnePlugin
interface
OnePlugin
{
author
?:
string
;
defaultState
:
Record
<
string
,
any
>
;
migrations
?:
Record
<
string
,
any
>
;
name
:
string
;
permissions
:
(
PluginFilterEvent
|
SendType
)
[]
;
uid
:
string
;
url
?:
string
;
version
:
string
;
destroy
()
:
void
;
filterComment
(
comment
:
Comment
,
service
:
Service
,
userData
:
null
|
UserNameData
,
)
:
Promise
<
false
|
Comment
>
;
filterSpeech
(
text
:
string
,
userData
:
null
|
UserNameData
,
config
:
Partial
<
SpeechConfig
>
,
comment
?:
CommentNotification
|
Comment
,
)
:
Promise
<
string
|
false
>
;
init
(
api
:
PluginAPI
,
initialData
:
Partial
<
ConnectedData
>
)
:
void
;
request
(
req
:
PluginRequest
)
:
Promise
<
PluginResponse
>
;
subscribe
(
type
:
SendType
,
...
args
:
any
[]
)
:
void
;
[
key
:
string
]:
any
;
}
Indexable
[
key
:
string
]:
any
Index
Properties
author?
default
State
migrations?
name
permissions
uid
url?
version
Methods
destroy?
filter
Comment?
filter
Speech?
init?
request?
subscribe?
Properties
Optional
author
author
?:
string
default
State
defaultState
:
Record
<
string
,
any
>
Optional
migrations
migrations
?:
Record
<
string
,
any
>
name
name
:
string
permissions
permissions
:
(
PluginFilterEvent
|
SendType
)
[]
uid
uid
:
string
Optional
url
url
?:
string
version
version
:
string
Methods
Optional
destroy
destroy
()
:
void
Returns
void
Optional
filter
Comment
filterComment
(
comment
:
Comment
,
service
:
Service
,
userData
:
null
|
UserNameData
,
)
:
Promise
<
false
|
Comment
>
Parameters
comment
:
Comment
service
:
Service
userData
:
null
|
UserNameData
Returns
Promise
<
false
|
Comment
>
Optional
filter
Speech
filterSpeech
(
text
:
string
,
userData
:
null
|
UserNameData
,
config
:
Partial
<
SpeechConfig
>
,
comment
?:
CommentNotification
|
Comment
,
)
:
Promise
<
string
|
false
>
Parameters
text
:
string
userData
:
null
|
UserNameData
config
:
Partial
<
SpeechConfig
>
Optional
comment
:
CommentNotification
|
Comment
Returns
Promise
<
string
|
false
>
Optional
init
init
(
api
:
PluginAPI
,
initialData
:
Partial
<
ConnectedData
>
)
:
void
Parameters
api
:
PluginAPI
initialData
:
Partial
<
ConnectedData
>
Returns
void
Optional
request
request
(
req
:
PluginRequest
)
:
Promise
<
PluginResponse
>
Parameters
req
:
PluginRequest
Returns
Promise
<
PluginResponse
>
Optional
subscribe
subscribe
(
type
:
SendType
,
...
args
:
any
[]
)
:
void
Parameters
type
:
SendType
...
args
:
any
[]
Returns
void
Settings
Theme
OS
Light
Dark
On This Page
Properties
author
default
State
migrations
name
permissions
uid
url
version
Methods
destroy
filter
Comment
filter
Speech
init
request
subscribe
OneSDK
Loading...