F
register
Registers an image generated at runtime, such as a data: URI or a file the plugin wrote, with
Discord's asset registry, so <Image source={id}> and Discord's icon props draw it. Images a plugin imports
are registered for it. A plugin's names never collide with another's, and its registrations end when it stops.
function register(options: AssetRegistration): RegisteredAssetParameters
| Name | Type | Description |
|---|---|---|
| options | AssetRegistration | The image: its name, |
Returns
RegisteredAssetThe asset's id, and unregister.