webpresence
Version:
Discord Rich Presence for websites - Show your browsing activity in Discord
37 lines (35 loc) • 1.23 kB
TypeScript
/**
* Autostart utilities for WebPresence server (BETA)
*
* Provides functionality for configuring the server to start automatically on system boot
* Supports multiple methods for different operating systems and Linux distributions
*/
/**
* Autostart method types
*/
type AutostartMethod = "auto" | "xdg" | "systemd";
/**
* Check if autostart is enabled
* @param method Optional autostart method to check
* @returns True if autostart is enabled, false otherwise
*/
declare function isAutostartEnabled(method?: AutostartMethod): boolean;
/**
* Enable autostart for the current platform
* @param method Optional autostart method to use
* @returns Promise that resolves with the result of enabling autostart
*/
declare function enableAutostart(method?: AutostartMethod): Promise<{
success: boolean;
message: string;
}>;
/**
* Disable autostart for the current platform
* @param method Optional autostart method to disable
* @returns Promise that resolves with the result of disabling autostart
*/
declare function disableAutostart(method?: AutostartMethod): Promise<{
success: boolean;
message: string;
}>;
export { type AutostartMethod, disableAutostart, enableAutostart, isAutostartEnabled };