Skip to main content

Module host

Module host 

Source
Expand description

Services PhoenixCord provides to every plugin.

Functions§

clear_timer
Cancel a timeout or interval.
clipboard_read
clipboard_write
close_modal
fetch
Send an HTTP request in the background. The result arrives as event.http with the returned ID.
get_setting
The current value of a setting, or its default. none for unknown keys that were never set.
is_plugin_enabled
Whether a plugin with this name is loaded and running.
log
Write to the PhoenixCord log, attributed to this plugin.
notify
open_modal
Open a modal showing content. Returns its ID.
open_url
Open a URL in the user’s browser.
request_render
Ask the client to call this plugin’s render hooks again, e.g. after its state changed.
set_interval
Deliver event.timer with the returned ID every interval-ms milliseconds.
set_setting
Store a setting and deliver event.setting-changed after the current call returns.
set_timeout
Deliver event.timer with the returned ID once, after delay-ms milliseconds.
show_notice
show_toast
storage_delete
storage_get
Read from this plugin’s persistent key-value storage.
storage_keys
storage_set
update_modal

Type Aliases§

Element
HttpRequest
LogLevel
Notice
Notification
SettingValue
ToastKind