@rbxts/zircon
Version:
<div> <img src="https://i.imgur.com/YgpbX7G.png" align="left" width="128"/> <h1>ZIRCON</h1> <h3>A clean, sleek, runtime debugging console for Roblox</h3> <a href="https://npmjs.com/package/@rbxts/zircon"><img src="https://badge.fury.io
64 lines (63 loc) • 2.21 kB
TypeScript
/// <reference types="@rbxts/compiler-types" />
import { ZirconPermissions } from "../Server/Class/ZirconGroup";
import { ZirconConfigurationBuilder } from "./ZirconConfigurationBuilder";
export interface ZirconGroupLink {
readonly GroupId: number;
readonly GroupRoleOrRank: string | number;
}
export declare enum ZirconBindingType {
Creator = 1,
Group = 2,
UserIds = 4,
Everyone = 1073741824
}
export interface ZirconGroupConfiguration {
readonly Id: string;
readonly Rank: number;
readonly Permissions: ZirconPermissions;
readonly BindType: ZirconBindingType;
readonly Groups: readonly ZirconGroupLink[];
readonly UserIds: number[];
}
export declare class ZirconGroupBuilder {
private parent;
private rank;
private id;
permissions: ZirconPermissions;
groupLink: ZirconGroupLink[];
userIds: number[];
bindType: ZirconBindingType;
constructor(parent: ZirconConfigurationBuilder, rank: number, id: string);
/** @deprecated @hidden */
SetPermission<K extends keyof ZirconPermissions>(key: K, value: ZirconPermissions[K]): this;
/**
* Sets the permissions applicable to this group
* @param permissions The permissions to override
*/
SetPermissions(permissions: Partial<ZirconPermissions>): this;
/**
* Binds this group to the specified group, and the role
* @param groupId The group id
* @param groupRole The role (string)
*/
BindToGroupRole(groupId: number, groupRole: string): this;
/**
* Binds this group to the specified user ids
* @param userIds The user ids
*/
BindToUserIds(userIds: readonly number[]): this;
/**
* Binds this group to _all players_.
*/
BindToEveryone(): this;
/**
* Binds the group to the creator of this game - either the group owner (if a group game) or the place owner.
*/
BindToCreator(): this;
/**
* Binds this group to the specified group role and rank
* @param groupId The group id
* @param groupRank The group rank (number)
*/
BindToGroupRank(groupId: number, groupRank: number): this;
}