Skip to content

Defined in: zaun/js/index.d.ts:81

new Community(): Community

Community

readonly bots: Collection<string, BotCard>

Defined in: zaun/js/index.d.ts:108

Installed bots’ public cards, as last heard.


readonly channels: Collection<string, Channel> & object

Defined in: zaun/js/index.d.ts:88

create(name, options?): Promise<Channel>

string

string | Channel

"text" | "announcement" | "voice" | "category"

Promise<Channel>


readonly client: Client

Defined in: zaun/js/index.d.ts:82


readonly commands: Collection<string, ApplicationCommandData>

Defined in: zaun/js/index.d.ts:106

Bot commands in this community, as last heard (each with its bot_id).


readonly data: any

Defined in: zaun/js/index.d.ts:96

The cache as plain data.


readonly description: string

Defined in: zaun/js/index.d.ts:85


readonly dms: Channel[]

Defined in: zaun/js/index.d.ts:137

DM: this member’s open direct messages with bots, from the cache.


readonly id: string

Defined in: zaun/js/index.d.ts:83


readonly isOwner: boolean

Defined in: zaun/js/index.d.ts:86


readonly me: Member

Defined in: zaun/js/index.d.ts:87


readonly members: Collection<string, Member> & object

Defined in: zaun/js/index.d.ts:94

fetch(): Promise<Collection<string, Member>>

Promise<Collection<string, Member>>


readonly name: string

Defined in: zaun/js/index.d.ts:84


readonly presences: (Presence & object)[]

Defined in: zaun/js/index.d.ts:113

presence: every member not offline.


readonly roles: Collection<string, Role> & object

Defined in: zaun/js/index.d.ts:91

create(name, options?): Promise<Role>

string

PermissionResolvable

Promise<Role>

bot(botId): Promise<BotCard>

Defined in: zaun/js/index.d.ts:110

string

Promise<BotCard>


botConfig(bot): Promise<Record<string, string>>

Defined in: zaun/js/index.d.ts:131

Owner only: the values set for a bot’s settings (secrets as "••••"); a key not there uses its card’s default.

string | BotCard

Promise<Record<string, string>>


channel(id): Channel

Defined in: zaun/js/index.d.ts:97

string

Channel


configureBot(bot, values): Promise<Record<string, string>>

Defined in: zaun/js/index.d.ts:128

Owner only: sets or clears (null: back to the card’s default) the values of the settings a bot declares (BotCard.config); resolves with every value the owner has set, a secret one as "••••" (write-only). Rejects with FORBIDDEN (not the owner), NOT_FOUND, or BAD_REQUEST for a key the bot does not declare. zaun-host 0.4.0.

string | BotCard

Record<string, string | null>

Promise<Record<string, string>>


createInvite(options?): Promise<string>

Defined in: zaun/js/index.d.ts:100

number

number

Promise<string>


disableBot(botId): Promise<BotCard>

Defined in: zaun/js/index.d.ts:122

string

Promise<BotCard>


dmSettings(): Promise<DmSettings>

Defined in: zaun/js/index.d.ts:141

DM: whether bots may open DMs with this member.

Promise<DmSettings>


enableBot(botId): Promise<BotCard>

Defined in: zaun/js/index.d.ts:121

string

Promise<BotCard>


fetchBots(): Promise<BotCard[]>

Defined in: zaun/js/index.d.ts:109

Promise<BotCard[]>


fetchDms(): Promise<Channel[]>

Defined in: zaun/js/index.d.ts:139

DM: reloads the open DMs from the host.

Promise<Channel[]>


grantBot(botId, grants): Promise<BotCard>

Defined in: zaun/js/index.d.ts:120

string

BotCapabilities

PermissionResolvable

Promise<BotCard>


installBot(pkg, options?): Promise<BotCard>

Defined in: zaun/js/index.d.ts:118

Owner only: installs the .zbot uploaded as attachment pkg, with the registry source it was verified against, if any.

string

{ capabilities?: BotCapabilities; permissions?: string; }

BotCapabilities

string

number

InstallSource

Promise<BotCard>


leave(): Promise<void>

Defined in: zaun/js/index.d.ts:104

Leaves (the owner cannot). Once the host accepts, the community is forgotten here: its state and member key leave the store, communityDelete follows with { t: "left" }, and a later join of it from the same store starts afresh.

Promise<void>


member(id): Member

Defined in: zaun/js/index.d.ts:98

string

Member


registerBot(member, name?): Promise<BotCard>

Defined in: zaun/js/index.d.ts:133

Owner only: marks a member connected over SimpleX as an external bot.

string | Member

string

Promise<BotCard>


removeBot(botId, options?): Promise<void>

Defined in: zaun/js/index.d.ts:123

string

boolean

Promise<void>


role(id): Role

Defined in: zaun/js/index.d.ts:99

string

Role


setCommands(commands): Promise<ApplicationCommandData[]>

Defined in: zaun/js/index.d.ts:135

As a bot: replaces this bot’s commands.

(ApplicationCommandData | CommandBuilder)[]

Promise<ApplicationCommandData[]>


setDmsFromBots(allow): Promise<DmSettings>

Defined in: zaun/js/index.d.ts:142

boolean

Promise<DmSettings>


setStatusText(text, options?): Promise<any>

Defined in: zaun/js/index.d.ts:115

Sets this member’s custom status here; no text and no emoji clears it.

string

string

number | Date

Promise<any>


updateBot(botId, pkg, options?): Promise<BotCard>

Defined in: zaun/js/index.d.ts:119

string

string

InstallSource

Promise<BotCard>