Skip to main content

RootServer

RootServer = object

This type is your entry point to most of the Root server-side APIs. Root automatically creates an instance of this type and provides it for your use. You import the instance and access its properties.

Properties​

appId​

appId: AppGuid

Your app or bot's globally unique identifier, matching the id in your root-manifest.json. Use this when you need to reference your own application, for example when filtering results or correlating data that includes an AppGuid.


community​

community: object

Represents the community where your code is installed. Provides an API to manipulate the community (e.g., create channels or send messages) and events to notify you when things in the community change (e.g., message sent or new member joins).

accessRules​

accessRules: AccessRuleClient

channelDirectories​

channelDirectories: ChannelDirectoryClient

channelFiles​

channelFiles: ChannelFileClient

channelGroups​

channelGroups: ChannelGroupClient

channelMessages​

channelMessages: ChannelMessageClient

channels​

channels: ChannelClient

channelWebRtcs​

channelWebRtcs: ChannelWebRtcClient

communities​

communities: CommunityClient

communityEmojis​

communityEmojis: CommunityEmojiClient

communityLinks: CommunityLinkClient

communityMemberBans​

communityMemberBans: CommunityMemberBanClient

communityMemberInvites​

communityMemberInvites: CommunityMemberInviteClient

communityMemberRoles​

communityMemberRoles: CommunityMemberRoleClient

communityMembers​

communityMembers: CommunityMemberClient

communityRoles​

communityRoles: CommunityRoleClient

notifications​

notifications: NotificationClient


dataStore​

dataStore: object

This property groups together all your server-side persistence APIs. All the options store data on the server side except the logs. The messages you write to the logs will be available to community admins.

appData​

appData: KeyValueStore

config​

config: RootDatabaseConfig

logs​

logs: object

logs.community​

community: CommunityAppLogClient


globalSettings​

globalSettings: GlobalSettings | undefined

Settings configured by the community in the Root client. Your server reads the current values and listens for changes via update and button events. This property is undefined when your manifest does not declare global settings.


jobScheduler​

jobScheduler: JobScheduler

A service for scheduling tasks that need to execute at future date(s). The job scheduler notifies you via an event when it's time for your job to run.


lifecycle​

lifecycle: RootBotLifecycle

Lifecycle methods for your server-side component.


memberGroups​

memberGroups: MemberGroupClient

Manages custom groups of community members and roles. Use member groups to define broadcast audiences or organize access control.