Promise<boolean>:按钮状态,true启用,false禁用
PluginManager
getButtonState
获取插件按钮启用状态。
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
获取插件按钮启用状态。
getButtonState(id: number): Promise<boolean>;
Promise<boolean>:按钮状态,true 启用,false 禁用import { PluginManager } from 'sn-plugin-lib';
/**
* 获取按钮状态的示例。
*/
export async function exampleGetButtonState() {
const enabled = await PluginManager.getButtonState(1);
return enabled;
}