UNPKG

openblox

Version:

Roblox API Wrapper For Both Classic And OpenCloud APIs.

23 lines (22 loc) 1.41 kB
import type { Identifier, ObjectPrettify } from "typeforge"; import type { GroupAuditLogActionType, PrettifiedGroupAuditLogsData, PrettifiedGroupJoinRequests, PrettifiedGroupWallPostsData_V2 } from "../../apis/classic/groups/groups.types"; import { PrettifiedGroupTransactionHistoryData } from "../../apis/classic/economy/economy.types"; import { OpenbloxConfig } from "../../config"; 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: (this: OpenbloxConfig | void, groupId: Identifier) => Promise<{ on: <Name extends keyof ClassicGroups_Events>(eventName: Name, handlerFn: (data: ClassicGroups_Events[Name]) => any) => Name extends EventType ? Promise<void> : never; processJoinRequests: (handlerFn: (req: ClassicGroups_Events["joinRequest"]) => Promise<any>) => Promise<void>; }>; export {};