Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Объявление настроек, типы контролов, чтение через getSetting
BYM.register({ id: 'my-plugin', settings: [ { key, type, label, default, description? }, ], }, ...)
key
string
getSetting(key)
type
label
default
description
{ key: 'showToast', type: 'boolean', label: 'Показывать уведомления', default: true }
{ key: 'speed', type: 'number', label: 'Скорость', default: 1.5, min: 0.25, max: 4, step: 0.05, description: 'Скорость воспроизведения при запуске', }
{ key: 'prefix', type: 'string', label: 'Префикс', default: '🎵' }
{ key: 'format', type: 'select', label: 'Формат', options: ['artist — title', 'title — artist', 'title'], default: 'artist — title', }
(api, getSetting) => ({ start() { const speed = getSetting('speed') ?? 1.5; const toast = getSetting('showToast') ?? true; const format = getSetting('format') ?? 'artist — title'; }, })
null
?? default