openblox
Version:
Roblox API Wrapper For Both Classic And OpenCloud APIs.
23 lines (22 loc) • 1.4 kB
TypeScript
import type { Identifier, ObjectPrettify } from "typeforge";
import { type PollConfig } from "../../helpers";
import type { GroupAuditLogActionType, PrettifiedGroupAuditLogsData, PrettifiedGroupJoinRequests, PrettifiedGroupWallPostsData_V2 } from "../../apis/classic/groups/groups.types";
import { PrettifiedGroupTransactionHistoryData } from "../../apis/classic/economy/economy.types";
export type ClassicGroups_Events = {
"auditLog": PrettifiedGroupAuditLogsData<GroupAuditLogActionType>[number];
"joinRequest": ObjectPrettify<PrettifiedGroupJoinRequests[number] & {
accept: VoidFunction;
decline: VoidFunction;
}>;
"wallPost": ObjectPrettify<PrettifiedGroupWallPostsData_V2[number] & {
remove: VoidFunction;
}>;
"transaction:sale": ObjectPrettify<PrettifiedGroupTransactionHistoryData<"Sale">>;
"transaction:advanceRebate": ObjectPrettify<PrettifiedGroupTransactionHistoryData<"PublishingAdvanceRebates">>;
};
type EventType = keyof ClassicGroups_Events;
export declare const ClassicGroups: (groupId: Identifier) => {
on: <Name extends keyof ClassicGroups_Events>(eventName: Name, handlerFn: (data: ClassicGroups_Events[Name]) => any, config?: PollConfig) => Name extends EventType ? Promise<void> : never;
processJoinRequests: (handlerFn: (req: ClassicGroups_Events["joinRequest"]) => Promise<any>) => Promise<void>;
};
export {};