UNPKG

@aituber-onair/kizuna

Version:

A sophisticated bond system (絆 - Kizuna) for managing relationships between users and AI characters in AITuber OnAir.

37 lines (36 loc) 942 B
/** * Utilities for user ID generation and parsing */ import type { UserType, ChatType } from "../types"; /** * Generate user ID from platform and username * * @param platform Platform (ChatType) * @param userName Username * @param isOwner Whether owner * @returns Generated user ID */ export declare function generateUserId(platform: ChatType, userName: string, isOwner?: boolean): string; /** * Parse user ID to get platform and username * * @param userId User ID * @returns Parse result */ export declare function parseUserId(userId: string): { platform: UserType; userName: string; isOwner: boolean; }; /** * Check user ID validity */ export declare function isValidUserId(userId: string): boolean; /** * Generate anonymous user ID */ export declare function generateAnonymousUserId(platform: ChatType): string; /** * Get display username */ export declare function getDisplayName(userId: string): string;